From 25428b6619765b1a9c77d22c4e0383ddb7b78fbe Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Mon, 5 Jul 2021 13:39:50 -0400 Subject: [PATCH] feat: initial generation --- .github/.OwlBot.lock.yaml | 3 + .github/.OwlBot.yaml | 32 + .github/CODEOWNERS | 10 + .github/ISSUE_TEMPLATE/bug_report.md | 51 + .github/ISSUE_TEMPLATE/feature_request.md | 21 + .github/ISSUE_TEMPLATE/support_request.md | 7 + .github/PULL_REQUEST_TEMPLATE.md | 7 + .github/blunderbuss.yml | 7 + .github/generated-files-bot.yml | 12 + .github/readme/synth.py | 19 + .github/release-please.yml | 3 + .github/snippet-bot.yml | 0 .github/sync-repo-settings.yaml | 49 + .github/trusted-contribution.yml | 2 + .github/workflows/approve-readme.yaml | 54 + .github/workflows/auto-release.yaml | 88 + .github/workflows/ci.yaml | 79 + .github/workflows/samples.yaml | 14 + .gitignore | 17 + .kokoro/build.bat | 3 + .kokoro/build.sh | 125 + .kokoro/coerce_logs.sh | 37 + .kokoro/common.cfg | 13 + .kokoro/common.sh | 58 + .kokoro/continuous/common.cfg | 25 + .kokoro/continuous/java8.cfg | 12 + .kokoro/continuous/readme.cfg | 55 + .kokoro/dependencies.sh | 91 + .kokoro/nightly/common.cfg | 25 + .kokoro/nightly/integration.cfg | 37 + .kokoro/nightly/java11.cfg | 7 + .kokoro/nightly/java7.cfg | 7 + .kokoro/nightly/java8-osx.cfg | 3 + .kokoro/nightly/java8-win.cfg | 3 + .kokoro/nightly/java8.cfg | 12 + .kokoro/nightly/samples.cfg | 38 + .kokoro/populate-secrets.sh | 43 + .kokoro/presubmit/clirr.cfg | 13 + .kokoro/presubmit/common.cfg | 34 + .kokoro/presubmit/dependencies.cfg | 12 + .kokoro/presubmit/integration.cfg | 33 + .kokoro/presubmit/java11.cfg | 7 + .kokoro/presubmit/java7.cfg | 7 + .kokoro/presubmit/java8-osx.cfg | 3 + .kokoro/presubmit/java8-win.cfg | 3 + .kokoro/presubmit/java8.cfg | 12 + .kokoro/presubmit/linkage-monitor.cfg | 12 + .kokoro/presubmit/lint.cfg | 13 + .kokoro/presubmit/samples.cfg | 33 + .kokoro/readme.sh | 45 + .kokoro/release/bump_snapshot.cfg | 53 + .kokoro/release/common.cfg | 49 + .kokoro/release/common.sh | 50 + .kokoro/release/drop.cfg | 6 + .kokoro/release/drop.sh | 32 + .kokoro/release/promote.cfg | 6 + .kokoro/release/promote.sh | 34 + .kokoro/release/publish_javadoc.cfg | 23 + .kokoro/release/publish_javadoc.sh | 53 + .kokoro/release/publish_javadoc11.cfg | 30 + .kokoro/release/publish_javadoc11.sh | 67 + .kokoro/release/snapshot.cfg | 6 + .kokoro/release/snapshot.sh | 33 + .kokoro/release/stage.cfg | 19 + .kokoro/release/stage.sh | 45 + .kokoro/trampoline.sh | 26 + .repo-metadata.json | 16 + CODE_OF_CONDUCT.md | 94 + CONTRIBUTING.md | 139 + LICENSE | 201 + SECURITY.md | 7 + codecov.yaml | 4 + google-cloud-network-management-bom/pom.xml | 95 + google-cloud-network-management/pom.xml | 120 + .../v1/ReachabilityServiceClient.java | 979 +++ .../v1/ReachabilityServiceSettings.java | 313 + .../networkmanagement/v1/gapic_metadata.json | 36 + .../networkmanagement/v1/package-info.java | 43 + ...rpcReachabilityServiceCallableFactory.java | 113 + .../v1/stub/GrpcReachabilityServiceStub.java | 438 ++ .../v1/stub/ReachabilityServiceStub.java | 108 + .../stub/ReachabilityServiceStubSettings.java | 706 ++ .../v1beta1/ReachabilityServiceClient.java | 815 +++ .../v1beta1/ReachabilityServiceSettings.java | 314 + .../v1beta1/gapic_metadata.json | 36 + .../v1beta1/package-info.java | 44 + ...rpcReachabilityServiceCallableFactory.java | 115 + .../stub/GrpcReachabilityServiceStub.java | 440 ++ .../v1beta1/stub/ReachabilityServiceStub.java | 110 + .../stub/ReachabilityServiceStubSettings.java | 707 ++ .../v1/MockReachabilityService.java | 59 + .../v1/MockReachabilityServiceImpl.java | 188 + .../v1/ReachabilityServiceClientTest.java | 409 ++ .../v1beta1/MockReachabilityService.java | 59 + .../v1beta1/MockReachabilityServiceImpl.java | 188 + .../ReachabilityServiceClientTest.java | 445 ++ .../pom.xml | 69 + .../v1/ReachabilityServiceGrpc.java | 1129 +++ .../pom.xml | 69 + .../v1beta1/ReachabilityServiceGrpc.java | 1131 +++ java.header | 15 + license-checks.xml | 10 + owlbot.py | 24 + pom.xml | 200 + .../clirr-ignored-differences.xml | 19 + .../pom.xml | 46 + .../cloud/networkmanagement/v1/AbortInfo.java | 1242 ++++ .../v1/AbortInfoOrBuilder.java | 75 + .../v1/CloudSQLInstanceInfo.java | 1539 ++++ .../v1/CloudSQLInstanceInfoOrBuilder.java | 177 + .../v1/ConnectivityTest.java | 3673 ++++++++++ .../v1/ConnectivityTestName.java | 192 + .../v1/ConnectivityTestOrBuilder.java | 531 ++ .../v1/CreateConnectivityTestRequest.java | 1179 +++ ...reateConnectivityTestRequestOrBuilder.java | 130 + .../v1/DeleteConnectivityTestRequest.java | 655 ++ ...eleteConnectivityTestRequestOrBuilder.java | 52 + .../networkmanagement/v1/DeliverInfo.java | 1019 +++ .../v1/DeliverInfoOrBuilder.java | 75 + .../cloud/networkmanagement/v1/DropInfo.java | 1423 ++++ .../v1/DropInfoOrBuilder.java | 75 + .../cloud/networkmanagement/v1/Endpoint.java | 2039 ++++++ .../networkmanagement/v1/EndpointInfo.java | 1536 ++++ .../v1/EndpointInfoOrBuilder.java | 176 + .../v1/EndpointOrBuilder.java | 240 + .../networkmanagement/v1/FirewallInfo.java | 2593 +++++++ .../v1/FirewallInfoOrBuilder.java | 329 + .../networkmanagement/v1/ForwardInfo.java | 1041 +++ .../v1/ForwardInfoOrBuilder.java | 75 + .../v1/ForwardingRuleInfo.java | 1711 +++++ .../v1/ForwardingRuleInfoOrBuilder.java | 200 + .../networkmanagement/v1/GKEMasterInfo.java | 1175 +++ .../v1/GKEMasterInfoOrBuilder.java | 125 + .../v1/GetConnectivityTestRequest.java | 651 ++ .../GetConnectivityTestRequestOrBuilder.java | 52 + .../networkmanagement/v1/InstanceInfo.java | 1997 +++++ .../v1/InstanceInfoOrBuilder.java | 253 + .../v1/ListConnectivityTestsRequest.java | 1387 ++++ ...ListConnectivityTestsRequestOrBuilder.java | 170 + .../v1/ListConnectivityTestsResponse.java | 1431 ++++ ...istConnectivityTestsResponseOrBuilder.java | 153 + .../v1/LoadBalancerBackend.java | 1736 +++++ .../v1/LoadBalancerBackendOrBuilder.java | 207 + .../v1/LoadBalancerInfo.java | 2061 ++++++ .../v1/LoadBalancerInfoOrBuilder.java | 182 + .../networkmanagement/v1/NetworkInfo.java | 994 +++ .../v1/NetworkInfoOrBuilder.java | 100 + .../v1/OperationMetadata.java | 1811 +++++ .../v1/OperationMetadataOrBuilder.java | 210 + .../v1/ReachabilityDetails.java | 1919 +++++ .../v1/ReachabilityDetailsOrBuilder.java | 182 + .../v1/ReachabilityServiceProto.java | 259 + .../v1/RerunConnectivityTestRequest.java | 655 ++ ...RerunConnectivityTestRequestOrBuilder.java | 52 + .../cloud/networkmanagement/v1/RouteInfo.java | 2647 +++++++ .../v1/RouteInfoOrBuilder.java | 270 + .../cloud/networkmanagement/v1/Step.java | 6441 ++++++++++++++++ .../networkmanagement/v1/StepOrBuilder.java | 650 ++ .../networkmanagement/v1/TestOuterClass.java | 182 + .../cloud/networkmanagement/v1/Trace.java | 1372 ++++ .../networkmanagement/v1/TraceOrBuilder.java | 141 + .../networkmanagement/v1/TraceProto.java | 522 ++ .../v1/UpdateConnectivityTestRequest.java | 1067 +++ ...pdateConnectivityTestRequestOrBuilder.java | 107 + .../networkmanagement/v1/VpnGatewayInfo.java | 1545 ++++ .../v1/VpnGatewayInfoOrBuilder.java | 179 + .../networkmanagement/v1/VpnTunnelInfo.java | 2230 ++++++ .../v1/VpnTunnelInfoOrBuilder.java | 250 + .../v1/connectivity_test.proto | 225 + .../networkmanagement/v1/reachability.proto | 275 + .../cloud/networkmanagement/v1/trace.proto | 891 +++ .../clirr-ignored-differences.xml | 19 + .../pom.xml | 46 + .../networkmanagement/v1beta1/AbortInfo.java | 1247 ++++ .../v1beta1/AbortInfoOrBuilder.java | 75 + .../v1beta1/CloudSQLInstanceInfo.java | 1546 ++++ .../CloudSQLInstanceInfoOrBuilder.java | 177 + .../v1beta1/ConnectivityTest.java | 4020 ++++++++++ .../v1beta1/ConnectivityTestName.java | 192 + .../v1beta1/ConnectivityTestOrBuilder.java | 581 ++ .../CreateConnectivityTestRequest.java | 1188 +++ ...reateConnectivityTestRequestOrBuilder.java | 130 + .../DeleteConnectivityTestRequest.java | 660 ++ ...eleteConnectivityTestRequestOrBuilder.java | 52 + .../v1beta1/DeliverInfo.java | 1020 +++ .../v1beta1/DeliverInfoOrBuilder.java | 75 + .../networkmanagement/v1beta1/DropInfo.java | 1429 ++++ .../v1beta1/DropInfoOrBuilder.java | 75 + .../networkmanagement/v1beta1/Endpoint.java | 2050 ++++++ .../v1beta1/EndpointInfo.java | 1537 ++++ .../v1beta1/EndpointInfoOrBuilder.java | 176 + .../v1beta1/EndpointOrBuilder.java | 242 + .../v1beta1/FirewallInfo.java | 2597 +++++++ .../v1beta1/FirewallInfoOrBuilder.java | 331 + .../v1beta1/ForwardInfo.java | 1042 +++ .../v1beta1/ForwardInfoOrBuilder.java | 75 + .../v1beta1/ForwardingRuleInfo.java | 1715 +++++ .../v1beta1/ForwardingRuleInfoOrBuilder.java | 200 + .../v1beta1/GKEMasterInfo.java | 1176 +++ .../v1beta1/GKEMasterInfoOrBuilder.java | 125 + .../v1beta1/GetConnectivityTestRequest.java | 655 ++ .../GetConnectivityTestRequestOrBuilder.java | 52 + .../v1beta1/InstanceInfo.java | 1998 +++++ .../v1beta1/InstanceInfoOrBuilder.java | 253 + .../v1beta1/LatencyDistribution.java | 1033 +++ .../v1beta1/LatencyDistributionOrBuilder.java | 89 + .../v1beta1/LatencyPercentile.java | 648 ++ .../v1beta1/LatencyPercentileOrBuilder.java | 53 + .../v1beta1/ListConnectivityTestsRequest.java | 1391 ++++ ...ListConnectivityTestsRequestOrBuilder.java | 170 + .../ListConnectivityTestsResponse.java | 1444 ++++ ...istConnectivityTestsResponseOrBuilder.java | 154 + .../v1beta1/LoadBalancerBackend.java | 1744 +++++ .../v1beta1/LoadBalancerBackendOrBuilder.java | 207 + .../v1beta1/LoadBalancerInfo.java | 2087 ++++++ .../v1beta1/LoadBalancerInfoOrBuilder.java | 185 + .../v1beta1/NetworkInfo.java | 995 +++ .../v1beta1/NetworkInfoOrBuilder.java | 100 + .../v1beta1/OperationMetadata.java | 1814 +++++ .../v1beta1/OperationMetadataOrBuilder.java | 210 + .../v1beta1/ProbingDetails.java | 2477 +++++++ .../v1beta1/ProbingDetailsOrBuilder.java | 250 + .../v1beta1/ReachabilityDetails.java | 1929 +++++ .../v1beta1/ReachabilityDetailsOrBuilder.java | 182 + .../v1beta1/ReachabilityServiceProto.java | 260 + .../v1beta1/RerunConnectivityTestRequest.java | 659 ++ ...RerunConnectivityTestRequestOrBuilder.java | 52 + .../networkmanagement/v1beta1/RouteInfo.java | 2655 +++++++ .../v1beta1/RouteInfoOrBuilder.java | 270 + .../cloud/networkmanagement/v1beta1/Step.java | 6499 +++++++++++++++++ .../v1beta1/StepOrBuilder.java | 654 ++ .../v1beta1/TestOuterClass.java | 253 + .../networkmanagement/v1beta1/Trace.java | 1378 ++++ .../v1beta1/TraceOrBuilder.java | 141 + .../networkmanagement/v1beta1/TraceProto.java | 526 ++ .../UpdateConnectivityTestRequest.java | 1076 +++ ...pdateConnectivityTestRequestOrBuilder.java | 107 + .../v1beta1/VpnGatewayInfo.java | 1546 ++++ .../v1beta1/VpnGatewayInfoOrBuilder.java | 179 + .../v1beta1/VpnTunnelInfo.java | 2241 ++++++ .../v1beta1/VpnTunnelInfoOrBuilder.java | 252 + .../v1beta1/connectivity_test.proto | 313 + .../v1beta1/reachability.proto | 270 + .../networkmanagement/v1beta1/trace.proto | 891 +++ renovate.json | 73 + samples/install-without-bom/pom.xml | 84 + samples/pom.xml | 56 + samples/snapshot/pom.xml | 83 + samples/snippets/pom.xml | 47 + versions.txt | 8 + 250 files changed, 135105 insertions(+) create mode 100644 .github/.OwlBot.lock.yaml create mode 100644 .github/.OwlBot.yaml create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/support_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/blunderbuss.yml create mode 100644 .github/generated-files-bot.yml create mode 100644 .github/readme/synth.py create mode 100644 .github/release-please.yml create mode 100644 .github/snippet-bot.yml create mode 100644 .github/sync-repo-settings.yaml create mode 100644 .github/trusted-contribution.yml create mode 100644 .github/workflows/approve-readme.yaml create mode 100644 .github/workflows/auto-release.yaml create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/samples.yaml create mode 100644 .gitignore create mode 100644 .kokoro/build.bat create mode 100755 .kokoro/build.sh create mode 100755 .kokoro/coerce_logs.sh create mode 100644 .kokoro/common.cfg create mode 100644 .kokoro/common.sh create mode 100644 .kokoro/continuous/common.cfg create mode 100644 .kokoro/continuous/java8.cfg create mode 100644 .kokoro/continuous/readme.cfg create mode 100755 .kokoro/dependencies.sh create mode 100644 .kokoro/nightly/common.cfg create mode 100644 .kokoro/nightly/integration.cfg create mode 100644 .kokoro/nightly/java11.cfg create mode 100644 .kokoro/nightly/java7.cfg create mode 100644 .kokoro/nightly/java8-osx.cfg create mode 100644 .kokoro/nightly/java8-win.cfg create mode 100644 .kokoro/nightly/java8.cfg create mode 100644 .kokoro/nightly/samples.cfg create mode 100755 .kokoro/populate-secrets.sh create mode 100644 .kokoro/presubmit/clirr.cfg create mode 100644 .kokoro/presubmit/common.cfg create mode 100644 .kokoro/presubmit/dependencies.cfg create mode 100644 .kokoro/presubmit/integration.cfg create mode 100644 .kokoro/presubmit/java11.cfg create mode 100644 .kokoro/presubmit/java7.cfg create mode 100644 .kokoro/presubmit/java8-osx.cfg create mode 100644 .kokoro/presubmit/java8-win.cfg create mode 100644 .kokoro/presubmit/java8.cfg create mode 100644 .kokoro/presubmit/linkage-monitor.cfg create mode 100644 .kokoro/presubmit/lint.cfg create mode 100644 .kokoro/presubmit/samples.cfg create mode 100755 .kokoro/readme.sh create mode 100644 .kokoro/release/bump_snapshot.cfg create mode 100644 .kokoro/release/common.cfg create mode 100755 .kokoro/release/common.sh create mode 100644 .kokoro/release/drop.cfg create mode 100755 .kokoro/release/drop.sh create mode 100644 .kokoro/release/promote.cfg create mode 100755 .kokoro/release/promote.sh create mode 100644 .kokoro/release/publish_javadoc.cfg create mode 100755 .kokoro/release/publish_javadoc.sh create mode 100644 .kokoro/release/publish_javadoc11.cfg create mode 100755 .kokoro/release/publish_javadoc11.sh create mode 100644 .kokoro/release/snapshot.cfg create mode 100755 .kokoro/release/snapshot.sh create mode 100644 .kokoro/release/stage.cfg create mode 100755 .kokoro/release/stage.sh create mode 100644 .kokoro/trampoline.sh create mode 100644 .repo-metadata.json create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 SECURITY.md create mode 100644 codecov.yaml create mode 100644 google-cloud-network-management-bom/pom.xml create mode 100644 google-cloud-network-management/pom.xml create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceClient.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceSettings.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/gapic_metadata.json create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/package-info.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/GrpcReachabilityServiceCallableFactory.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/GrpcReachabilityServiceStub.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/ReachabilityServiceStub.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/ReachabilityServiceStubSettings.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceClient.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceSettings.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/gapic_metadata.json create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/package-info.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/GrpcReachabilityServiceCallableFactory.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/GrpcReachabilityServiceStub.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/ReachabilityServiceStub.java create mode 100644 google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/ReachabilityServiceStubSettings.java create mode 100644 google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/MockReachabilityService.java create mode 100644 google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/MockReachabilityServiceImpl.java create mode 100644 google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceClientTest.java create mode 100644 google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/MockReachabilityService.java create mode 100644 google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/MockReachabilityServiceImpl.java create mode 100644 google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceClientTest.java create mode 100644 grpc-google-cloud-network-management-v1/pom.xml create mode 100644 grpc-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceGrpc.java create mode 100644 grpc-google-cloud-network-management-v1beta1/pom.xml create mode 100644 grpc-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceGrpc.java create mode 100644 java.header create mode 100644 license-checks.xml create mode 100644 owlbot.py create mode 100644 pom.xml create mode 100644 proto-google-cloud-network-management-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-network-management-v1/pom.xml create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/AbortInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/AbortInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CloudSQLInstanceInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CloudSQLInstanceInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTest.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTestName.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CreateConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CreateConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeleteConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeleteConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeliverInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeliverInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DropInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DropInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/Endpoint.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardingRuleInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardingRuleInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GKEMasterInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GKEMasterInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GetConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GetConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/InstanceInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/InstanceInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsRequest.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsResponse.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsResponseOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerBackend.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerBackendOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/NetworkInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/NetworkInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/OperationMetadata.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/OperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityDetails.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityDetailsOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceProto.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RerunConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RerunConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RouteInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RouteInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/Step.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/StepOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TestOuterClass.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/Trace.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TraceOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TraceProto.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/UpdateConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/UpdateConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnGatewayInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnGatewayInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnTunnelInfo.java create mode 100644 proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnTunnelInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/connectivity_test.proto create mode 100644 proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/reachability.proto create mode 100644 proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/trace.proto create mode 100644 proto-google-cloud-network-management-v1beta1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-network-management-v1beta1/pom.xml create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/AbortInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/AbortInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CloudSQLInstanceInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CloudSQLInstanceInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTest.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTestName.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CreateConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CreateConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeleteConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeleteConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Endpoint.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardingRuleInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardingRuleInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GKEMasterInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GKEMasterInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GetConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GetConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyDistribution.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyDistributionOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyPercentile.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyPercentileOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsRequest.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsResponse.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsResponseOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerBackend.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerBackendOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/NetworkInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/NetworkInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/OperationMetadata.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/OperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ProbingDetails.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ProbingDetailsOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityDetails.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityDetailsOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceProto.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RerunConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RerunConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Step.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/StepOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TestOuterClass.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Trace.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TraceOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TraceProto.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/UpdateConnectivityTestRequest.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/UpdateConnectivityTestRequestOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnGatewayInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnGatewayInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnTunnelInfo.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnTunnelInfoOrBuilder.java create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/connectivity_test.proto create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/reachability.proto create mode 100644 proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto create mode 100644 renovate.json create mode 100644 samples/install-without-bom/pom.xml create mode 100644 samples/pom.xml create mode 100644 samples/snapshot/pom.xml create mode 100644 samples/snippets/pom.xml create mode 100644 versions.txt diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 00000000..5f0e5d39 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:a9b83a276c82987d284b733713fe86a3c8a2cc457933767eeb2688b882e54c6a + image: gcr.io/repo-automation-bots/owlbot-java:latest \ No newline at end of file diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml new file mode 100644 index 00000000..bbe51c04 --- /dev/null +++ b/.github/.OwlBot.yaml @@ -0,0 +1,32 @@ +# 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 +# +# 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. + +docker: + image: "gcr.io/repo-automation-bots/owlbot-java:latest" + +deep-remove-regex: +- "/grpc-google-.*/src" +- "/proto-google-.*/src" +- "/google-.*/src" + +deep-preserve-regex: +- "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/networkmanagement/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-network-management-$1/src" +- source: "/google/cloud/networkmanagement/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-network-management-$1/src" +- source: "/google/cloud/networkmanagement/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-network-management/src" \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..30fdb7b9 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,10 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. + +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +* @googleapis/yoshi-java + +# The java-samples-reviewers team is the default owner for samples changes +samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..a2e9a97e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,51 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/java-network-management/issues + - Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform + +If you are still having issues, please include as much information as possible: + +#### Environment details + +1. Specify the API at the beginning of the title. For example, "BigQuery: ..."). + General, Core, and Other are also allowed as types +2. OS type and version: +3. Java version: +4. network-management version(s): + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```java +// example +``` + +#### Stack trace +``` +Any relevant stacktrace here. +``` + +#### External references such as API reference guides + +- ? + +#### Any additional information below + + +Following these steps guarantees the quickest resolution possible. + +Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..754e30c6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 00000000..99586903 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..f89a14c5 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-network-management/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 00000000..1a23ea42 --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +# Configuration for the Blunderbuss GitHub app. For more info see +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +assign_prs_by: +- labels: + - samples + to: + - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml new file mode 100644 index 00000000..c644a24e --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,12 @@ +externalManifests: +- type: json + file: 'synth.metadata' + jsonpath: '$.generatedFiles[*]' +- type: json + file: '.github/readme/synth.metadata/synth.metadata' + jsonpath: '$.generatedFiles[*]' +ignoreAuthors: +- 'renovate-bot' +- 'yoshi-automation' +- 'release-please[bot]' +- 'gcf-owl-bot[bot]' diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 00000000..7b48cc28 --- /dev/null +++ b/.github/readme/synth.py @@ -0,0 +1,19 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +"""This script is used to synthesize generated the README for this library.""" + +from synthtool.languages import java + +java.custom_templates(["java_library/README.md"]) diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000..8ca7f9ca --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,3 @@ +bumpMinorPreMajor: true +handleGHRelease: true +releaseType: java-yoshi diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 00000000..e69de29b diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 00000000..e100454f --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,49 @@ + +# Whether or not rebase-merging is enabled on this repository. +# Defaults to `true` +rebaseMergeAllowed: false + +# Whether or not squash-merging is enabled on this repository. +# Defaults to `true` +squashMergeAllowed: true + +# Whether or not PRs are merged with a merge commit on this repository. +# Defaults to `false` +mergeCommitAllowed: false + +# Rules for master branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `master` +- pattern: master + # Can admins overwrite branch protection. + # Defaults to `true` + isAdminEnforced: true + # Number of approving reviews required to update matching branches. + # Defaults to `1` + requiredApprovingReviewCount: 1 + # Are reviews from code owners required to update matching branches. + # Defaults to `false` + requiresCodeOwnerReviews: true + # Require up to date branches + requiresStrictStatusChecks: false + # List of required status check contexts that must pass for commits to be accepted to matching branches. + requiredStatusCheckContexts: + - "dependencies (8)" + - "dependencies (11)" + - "linkage-monitor" + - "lint" + - "clirr" + - "units (7)" + - "units (8)" + - "units (11)" + - "Kokoro - Test: Integration" + - "cla/google" +# List of explicit permissions to add (additive only) +permissionRules: +- team: yoshi-admins + permission: admin +- team: yoshi-java-admins + permission: admin +- team: yoshi-java + permission: push diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 00000000..f247d5c7 --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,2 @@ +trustedContributors: +- renovate-bot \ No newline at end of file diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 00000000..7513acae --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +on: + pull_request: +name: auto-merge-readme +jobs: + approve: + runs-on: ubuntu-latest + if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + script: | + // only approve PRs from yoshi-automation + if (context.payload.pull_request.user.login !== "yoshi-automation") { + return; + } + + // only approve PRs like "chore: release " + if (!context.payload.pull_request.title === "chore: regenerate README") { + return; + } + + // only approve PRs with README.md and synth.metadata changes + const files = new Set( + ( + await github.paginate( + github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }) + ) + ).map(file => file.filename) + ); + if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { + return; + } + + // approve README regeneration PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped PR!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach automerge label + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['automerge'] + }); diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml new file mode 100644 index 00000000..9b4fd4d8 --- /dev/null +++ b/.github/workflows/auto-release.yaml @@ -0,0 +1,88 @@ +on: + pull_request: +name: auto-release +jobs: + approve: + runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-please') + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + debug: true + script: | + // only approve PRs from release-please[bot] + if (context.payload.pull_request.user.login !== "release-please[bot]") { + return; + } + + // only approve PRs like "chore: release " + if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + return; + } + + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const changed_files = await github.paginate(filesPromise) + + if ( changed_files.length < 1 ) { + console.log( "Not proceeding since PR is empty!" ) + return; + } + + if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { + console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) + return; + } + + // trigger auto-release when + // 1) it is a SNAPSHOT release (auto-generated post regular release) + // 2) there are dependency updates only + // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) + if ( + context.payload.pull_request.body.includes("Fix") || + context.payload.pull_request.body.includes("Build") || + context.payload.pull_request.body.includes("Documentation") || + context.payload.pull_request.body.includes("BREAKING CHANGES") || + context.payload.pull_request.body.includes("Features") + ) { + console.log( "Not auto-releasing since it is not a dependency-update-only release." ); + return; + } + + const promise = github.pulls.list.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + const open_pulls = await github.paginate(promise) + + if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { + for ( const pull of open_pulls ) { + if ( pull.title.startsWith("deps: update dependency") ) { + console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); + return; + } + } + } + + // approve release PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped release!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach kokoro:force-run and automerge labels + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['kokoro:force-run', 'automerge'] + }); diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..0195b32f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,79 @@ +on: + push: + branches: + - master + pull_request: +name: ci +jobs: + units: + runs-on: ubuntu-latest + strategy: + matrix: + java: [7, 8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.bat + env: + JOB_TYPE: test + dependencies: + runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/dependencies.sh + linkage-monitor: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - name: Install artifacts to local Maven repository + run: .kokoro/build.sh + shell: bash + - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) + uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: lint + clirr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: clirr diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml new file mode 100644 index 00000000..c46230a7 --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run checkstyle + run: mvn -P lint --quiet --batch-mode checkstyle:check + working-directory: samples/snippets diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..069d08fc --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# Maven +target/ + +# Eclipse +.classpath +.project +.settings + +# Intellij +*.iml +.idea/ + +# python utilities +*.pyc +__pycache__ + +.flattened-pom.xml diff --git a/.kokoro/build.bat b/.kokoro/build.bat new file mode 100644 index 00000000..05826ad9 --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 00000000..f2dab759 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,125 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Maven & Java version +mvn -version +echo ${JOB_TYPE} + +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C + +# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it +if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) +fi + +RETURN_CODE=0 +set +e + +case ${JOB_TYPE} in +test) + mvn test -B -Dclirr.skip=true -Denforcer.skip=true + RETURN_CODE=$? + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ + -Penable-integration-tests \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + ;; +samples) + SAMPLES_DIR=samples + # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. + if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] + then + SAMPLES_DIR=samples/snapshot + fi + + if [[ -f ${SAMPLES_DIR}/pom.xml ]] + then + for FILE in ${KOKORO_GFILE_DIR}/secret_manager/*-samples-secrets; do + [[ -f "$FILE" ]] || continue + source "$FILE" + done + + pushd ${SAMPLES_DIR} + mvn -B \ + -Penable-samples \ + -ntp \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + popd + else + echo "no sample pom.xml found - skipping sample tests" + fi + ;; +clirr) + mvn -B -Denforcer.skip=true clirr:check + RETURN_CODE=$? + ;; +*) + ;; +esac + +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi + +# fix output location of logs +bash .kokoro/coerce_logs.sh + +if [[ "${ENABLE_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-network-management +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100755 index 00000000..46edbf7f --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# This script finds and moves sponge logs so that they can be found by placer +# and are not flagged as flaky by sponge. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +job=$(basename ${KOKORO_JOB_NAME}) + +echo "coercing sponge logs..." +for xml in `find . -name *-sponge_log.xml` +do + class=$(basename ${xml} | cut -d- -f2) + dir=$(dirname ${xml})/${job}/${class} + text=$(dirname ${xml})/${class}-sponge_log.txt + mkdir -p ${dir} + mv ${xml} ${dir}/sponge_log.xml + mv ${text} ${dir}/sponge_log.txt +done diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg new file mode 100644 index 00000000..cb66612b --- /dev/null +++ b/.kokoro/common.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# All builds use the trampoline script to run in docker. +build_file: "java-network-management/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 00000000..ace89f45 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + + # store current flag state + flags=$- + + # allow a failures to continue + set +e + ${command} + exit_code=$? + + # restore "e" flag + if [[ ${flags} =~ e ]] + then set -e + else set +e + fi + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} + +## Helper functionss +function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } +function msg() { println "$*" >&2; } +function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 00000000..cfa8f1bf --- /dev/null +++ b/.kokoro/continuous/common.cfg @@ -0,0 +1,25 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-network-management/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/continuous/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 00000000..5a17f575 --- /dev/null +++ b/.kokoro/continuous/readme.cfg @@ -0,0 +1,55 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 00000000..9030ba8f --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,91 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail +shopt -s nullglob + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +# this should run maven enforcer +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + -Dclirr.skip=true + +mvn -B dependency:analyze -DfailOnWarning=true + +echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" +## Run dependency list completeness check +function completenessCheck() { + # Output dep list with compile scope generated using the original pom + # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. + # This is stripped from the output as it is not present in the flattened pom. + # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. + msg "Generating dependency list using original pom..." + mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt + + # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) + msg "Generating dependency list using flattened pom..." + mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + + # Compare two dependency lists + msg "Comparing dependency lists..." + diff .org-list.txt .new-list.txt >.diff.txt + if [[ $? == 0 ]] + then + msg "Success. No diff!" + else + msg "Diff found. See below: " + msg "You can also check .diff.txt file located in $1." + cat .diff.txt + return 1 + fi +} + +# Allow failures to continue running the script +set +e + +error_count=0 +for path in **/.flattened-pom.xml +do + # Check flattened pom in each dir that contains it for completeness + dir=$(dirname "$path") + pushd "$dir" + completenessCheck "$dir" + error_count=$(($error_count + $?)) + popd +done + +if [[ $error_count == 0 ]] +then + msg "All checks passed." + exit 0 +else + msg "Errors found. See log statements above." + exit 1 +fi diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg new file mode 100644 index 00000000..cfa8f1bf --- /dev/null +++ b/.kokoro/nightly/common.cfg @@ -0,0 +1,25 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-network-management/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 00000000..0048c8ec --- /dev/null +++ b/.kokoro/nightly/integration.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/nightly/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/nightly/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 00000000..e48e197b --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-network-management/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 00000000..0a312c58 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-network-management/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/nightly/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg new file mode 100644 index 00000000..f2542931 --- /dev/null +++ b/.kokoro/nightly/samples.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 00000000..f5251425 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2020 Google LLC. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret ${key} > \ + "${SECRET_LOCATION}/${key}" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg new file mode 100644 index 00000000..ec572442 --- /dev/null +++ b/.kokoro/presubmit/clirr.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "clirr" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 00000000..884dc306 --- /dev/null +++ b/.kokoro/presubmit/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-network-management/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 00000000..4dded9a1 --- /dev/null +++ b/.kokoro/presubmit/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 00000000..dded67a9 --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/presubmit/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/presubmit/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 00000000..e48e197b --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-network-management/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 00000000..0a312c58 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-network-management/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/presubmit/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 00000000..b19a01ec --- /dev/null +++ b/.kokoro/presubmit/linkage-monitor.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/linkage-monitor.sh" +} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg new file mode 100644 index 00000000..6d323c8a --- /dev/null +++ b/.kokoro/presubmit/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg new file mode 100644 index 00000000..01e09600 --- /dev/null +++ b/.kokoro/presubmit/samples.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} \ No newline at end of file diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100755 index 00000000..dc9fe223 --- /dev/null +++ b/.kokoro/readme.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +cd ${KOKORO_ARTIFACTS_DIR}/github/java-network-management + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Kokoro exposes this as a file, but the scripts expect just a plain variable. +export GITHUB_TOKEN=$(cat ${KOKORO_KEYSTORE_DIR}/73713_yoshi-automation-github-key) + +# Setup git credentials +echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials +git config --global credential.helper 'store --file ~/.git-credentials' + +python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool + +set +e +python3.6 -m autosynth.synth \ + --repository=googleapis/java-network-management \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" + +# autosynth returns 28 to signal there are no changes +RETURN_CODE=$? +if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] +then + exit ${RETURN_CODE} +fi diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 00000000..ed8e237f --- /dev/null +++ b/.kokoro/release/bump_snapshot.cfg @@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-network-management/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 00000000..4373d66c --- /dev/null +++ b/.kokoro/release/common.cfg @@ -0,0 +1,49 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-network-management/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100755 index 00000000..6e3f6599 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +# Get secrets from keystore and set and environment variables +setup_environment_secrets() { + export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_TTY=$(tty) + export GPG_HOMEDIR=/gpg + mkdir $GPG_HOMEDIR + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg + export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') +} + +create_settings_xml_file() { + echo " + + + ossrh + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-staging + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-snapshots + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + +" > $1 +} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg new file mode 100644 index 00000000..8d5b71b3 --- /dev/null +++ b/.kokoro/release/drop.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 00000000..5c4551ef --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:drop -B \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg new file mode 100644 index 00000000..ffe89986 --- /dev/null +++ b/.kokoro/release/promote.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 00000000..1fa95fa5 --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg new file mode 100644 index 00000000..fbc298a7 --- /dev/null +++ b/.kokoro/release/publish_javadoc.cfg @@ -0,0 +1,23 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/doc-templates/" + +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/release/publish_javadoc.sh" +} + + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh new file mode 100755 index 00000000..3fd86311 --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET}" ]]; then + echo "Need to set STAGING_BUCKET environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-network-management +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B -q + +pushd target/site/apidocs + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 00000000..df704c95 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# cloud-rad production +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 00000000..93e3b999 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# Copyright 2021 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-network-management +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +# copy README to docfx-yml dir and rename index.md +cp README.md target/docfx-yml/index.md +# copy CHANGELOG to docfx-yml dir and rename history.md +cp CHANGELOG.md target/docfx-yml/history.md + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --xrefs devsite://java/gax \ + --xrefs devsite://java/google-cloud-core \ + --xrefs devsite://java/api-common \ + --xrefs devsite://java/proto-google-common-protos \ + --xrefs devsite://java/google-api-client \ + --xrefs devsite://java/google-http-client \ + --xrefs devsite://java/protobuf \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 00000000..cff62507 --- /dev/null +++ b/.kokoro/release/snapshot.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/release/snapshot.sh" +} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh new file mode 100755 index 00000000..1f55b770 --- /dev/null +++ b/.kokoro/release/snapshot.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +# ensure we're trying to push a snapshot (no-result returns non-zero exit code) +grep SNAPSHOT versions.txt + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 00000000..7e152805 --- /dev/null +++ b/.kokoro/release/stage.cfg @@ -0,0 +1,19 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-network-management/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-network-management/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-network-management" + } +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 00000000..8a103384 --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +source $(dirname "$0")/common.sh +source $(dirname "$0")/../common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +# attempt to stage 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn clean deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh new file mode 100644 index 00000000..9da0f839 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. +set -eo pipefail +# Always run the cleanup script, regardless of the success of bouncing into +# the container. +function cleanup() { + chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + echo "cleanup"; +} +trap cleanup EXIT + +$(dirname $0)/populate-secrets.sh # Secret Manager secrets. +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json new file mode 100644 index 00000000..0235d47d --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "name": "network-management", + "name_pretty": "Network Management API", + "product_documentation": "https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest/", + "api_description": "provides a collection of network performance monitoring and diagnostic capabilities.", + "client_documentation": "https://googleapis.dev/java/google-cloud-network-management/latest/index.html", + "release_level": "beta", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-network-management", + "repo_short": "java-network-management", + "distribution_name": "com.google.cloud:google-cloud-network-management", + "api_id": "network-management.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..2add2547 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..f2dbdee0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,139 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). + +## Building the project + +To build, package, and run all unit tests run the command + +``` +mvn clean verify +``` + +### Running Integration tests + +To include integration tests when building the project, you need access to +a GCP Project with a valid service account. + +For instructions on how to generate a service account and corresponding +credentials JSON see: [Creating a Service Account][1]. + +Then run the following to build, package, run all unit tests and run all +integration tests. + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-integration-tests clean verify +``` + +## Code Samples + +Code Samples must be bundled in separate Maven modules, and guarded by a +Maven profile with the name `enable-samples`. + +The samples must be separate from the primary project for a few reasons: +1. Primary projects have a minimum Java version of Java 7 whereas samples have + a minimum Java version of Java 8. Due to this we need the ability to + selectively exclude samples from a build run. +2. Many code samples depend on external GCP services and need + credentials to access the service. +3. Code samples are not released as Maven artifacts and must be excluded from + release builds. + +### Building + +```bash +mvn -Penable-samples clean verify +``` + +Some samples require access to GCP services and require a service account: + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-samples clean verify +``` + +### Profile Config + +1. To add samples in a profile to your Maven project, add the following to your +`pom.xml` + + ```xml + + [...] + + + enable-samples + + sample + + + + [...] + + ``` + +2. [Activate](#profile-activation) the profile. +3. Define your samples in a normal Maven project in the `samples/` directory. + +### Code Formatting + +Code in this repo is formatted with +[google-java-format](https://github.com/google/google-java-format). +To run formatting on your project, you can run: +``` +mvn com.coveo:fmt-maven-plugin:format +``` + +### Profile Activation + +To include code samples when building and testing the project, enable the +`enable-samples` Maven profile. + +#### Command line + +To activate the Maven profile on the command line add `-Penable-samples` to your +Maven command. + +#### Maven `settings.xml` + +To activate the Maven profile in your `~/.m2/settings.xml` add an entry of +`enable-samples` following the instructions in [Active Profiles][2]. + +This method has the benefit of applying to all projects you build (and is +respected by IntelliJ IDEA) and is recommended if you are going to be +contributing samples to several projects. + +#### IntelliJ IDEA + +To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in +[Activate Maven profiles][3] to activate `enable-samples`. + +[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account +[2]: https://maven.apache.org/settings.html#Active_Profiles +[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.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. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..8b58ae9c --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). + +The Google Security Team will respond within 5 working days of your report on g.co/vulnz. + +We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 00000000..5724ea94 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-cloud-network-management-bom/pom.xml b/google-cloud-network-management-bom/pom.xml new file mode 100644 index 00000000..43efa7d3 --- /dev/null +++ b/google-cloud-network-management-bom/pom.xml @@ -0,0 +1,95 @@ + + + 4.0.0 + com.google.cloud + google-cloud-network-management-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 0.11.0 + + + Google Network Management API BOM + https://github.com/googleapis/java-network-management + + BOM for Network Management API + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-network-management.git + scm:git:git@github.com:googleapis/java-network-management.git + https://github.com/googleapis/java-network-management + + + + true + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.cloud + google-cloud-network-management + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-network-management-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-network-management-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-network-management-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-network-management-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + diff --git a/google-cloud-network-management/pom.xml b/google-cloud-network-management/pom.xml new file mode 100644 index 00000000..4e00a14a --- /dev/null +++ b/google-cloud-network-management/pom.xml @@ -0,0 +1,120 @@ + + + 4.0.0 + com.google.cloud + google-cloud-network-management + 0.0.1-SNAPSHOT + jar + Google Network Management API + https://github.com/googleapis/java-network-management + Network Management API provides a collection of network performance monitoring and diagnostic capabilities. + + com.google.cloud + google-cloud-network-management-parent + 0.0.1-SNAPSHOT + + + google-cloud-network-management + + + + 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-network-management-v1beta1 + + + com.google.api.grpc + proto-google-cloud-network-management-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + org.threeten + threetenbp + + + + + junit + junit + test + 4.13.2 + + + + com.google.api.grpc + grpc-google-cloud-network-management-v1beta1 + test + + + com.google.api.grpc + grpc-google-cloud-network-management-v1 + test + + + + com.google.api + gax-grpc + testlib + test + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceClient.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceClient.java new file mode 100644 index 00000000..34c0111a --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceClient.java @@ -0,0 +1,979 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1; + +import com.google.api.core.ApiFunction; +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.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.networkmanagement.v1.stub.ReachabilityServiceStub; +import com.google.cloud.networkmanagement.v1.stub.ReachabilityServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +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: The Reachability service in the Google Cloud Network Management API provides + * services that analyze the reachability within a single Google Virtual Private Cloud (VPC) + * network, between peered VPC networks, between VPC and on-premises networks, or between VPC + * networks and internet hosts. A reachability analysis is based on Google Cloud network + * configurations. + * + *

You can use the analysis results to verify these configurations and to troubleshoot + * connectivity issues. + * + *

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

{@code
+ * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+ *   String name = "name3373707";
+ *   ConnectivityTest response = reachabilityServiceClient.getConnectivityTest(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ReachabilityServiceClient 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 ReachabilityServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * ReachabilityServiceSettings reachabilityServiceSettings =
+ *     ReachabilityServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ReachabilityServiceClient reachabilityServiceClient =
+ *     ReachabilityServiceClient.create(reachabilityServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ReachabilityServiceSettings reachabilityServiceSettings =
+ *     ReachabilityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ReachabilityServiceClient reachabilityServiceClient =
+ *     ReachabilityServiceClient.create(reachabilityServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ReachabilityServiceClient implements BackgroundResource { + private final ReachabilityServiceSettings settings; + private final ReachabilityServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of ReachabilityServiceClient with default settings. */ + public static final ReachabilityServiceClient create() throws IOException { + return create(ReachabilityServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ReachabilityServiceClient, 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 ReachabilityServiceClient create(ReachabilityServiceSettings settings) + throws IOException { + return new ReachabilityServiceClient(settings); + } + + /** + * Constructs an instance of ReachabilityServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(ReachabilityServiceSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ReachabilityServiceClient create(ReachabilityServiceStub stub) { + return new ReachabilityServiceClient(stub); + } + + /** + * Constructs an instance of ReachabilityServiceClient, 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 ReachabilityServiceClient(ReachabilityServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ReachabilityServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ReachabilityServiceClient(ReachabilityServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final ReachabilityServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ReachabilityServiceStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Connectivity Tests owned by a project. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (ConnectivityTest element :
+   *       reachabilityServiceClient.listConnectivityTests(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConnectivityTestsPagedResponse listConnectivityTests(String parent) { + ListConnectivityTestsRequest request = + ListConnectivityTestsRequest.newBuilder().setParent(parent).build(); + return listConnectivityTests(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Connectivity Tests owned by a project. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   ListConnectivityTestsRequest request =
+   *       ListConnectivityTestsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ConnectivityTest element :
+   *       reachabilityServiceClient.listConnectivityTests(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 ListConnectivityTestsPagedResponse listConnectivityTests( + ListConnectivityTestsRequest request) { + return listConnectivityTestsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Connectivity Tests owned by a project. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   ListConnectivityTestsRequest request =
+   *       ListConnectivityTestsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.listConnectivityTestsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ConnectivityTest element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConnectivityTestsPagedCallable() { + return stub.listConnectivityTestsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Connectivity Tests owned by a project. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   ListConnectivityTestsRequest request =
+   *       ListConnectivityTestsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListConnectivityTestsResponse response =
+   *         reachabilityServiceClient.listConnectivityTestsCallable().call(request);
+   *     for (ConnectivityTest element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConnectivityTestsCallable() { + return stub.listConnectivityTestsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Connectivity Test. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   String name = "name3373707";
+   *   ConnectivityTest response = reachabilityServiceClient.getConnectivityTest(name);
+   * }
+   * }
+ * + * @param name Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConnectivityTest getConnectivityTest(String name) { + GetConnectivityTestRequest request = + GetConnectivityTestRequest.newBuilder().setName(name).build(); + return getConnectivityTest(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Connectivity Test. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   GetConnectivityTestRequest request =
+   *       GetConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ConnectivityTest response = reachabilityServiceClient.getConnectivityTest(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 ConnectivityTest getConnectivityTest(GetConnectivityTestRequest request) { + return getConnectivityTestCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Connectivity Test. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   GetConnectivityTestRequest request =
+   *       GetConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.getConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectivityTest response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getConnectivityTestCallable() { + return stub.getConnectivityTestCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Connectivity Test. After you create a test, the reachability analysis is + * performed as part of the long running operation, which completes when the analysis completes. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing + * non-existent resources in the network, or you don't have read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of <code>AMBIGUOUS</code>. For more information, see the + * Connectivity Test documentation. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   String testId = "testId-877170355";
+   *   ConnectivityTest resource = ConnectivityTest.newBuilder().build();
+   *   ConnectivityTest response =
+   *       reachabilityServiceClient.createConnectivityTestAsync(parent, testId, resource).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * @param testId Required. The logical name of the Connectivity Test in your project with the + * following restrictions: + *
    + *
  • Must contain only lowercase letters, numbers, and hyphens. + *
  • Must start with a letter. + *
  • Must be between 1-40 characters. + *
  • Must end with a number or a letter. + *
  • Must be unique within the customer project + *
+ * + * @param resource Required. A `ConnectivityTest` resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createConnectivityTestAsync( + String parent, String testId, ConnectivityTest resource) { + CreateConnectivityTestRequest request = + CreateConnectivityTestRequest.newBuilder() + .setParent(parent) + .setTestId(testId) + .setResource(resource) + .build(); + return createConnectivityTestAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Connectivity Test. After you create a test, the reachability analysis is + * performed as part of the long running operation, which completes when the analysis completes. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing + * non-existent resources in the network, or you don't have read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of <code>AMBIGUOUS</code>. For more information, see the + * Connectivity Test documentation. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   CreateConnectivityTestRequest request =
+   *       CreateConnectivityTestRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setTestId("testId-877170355")
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   ConnectivityTest response =
+   *       reachabilityServiceClient.createConnectivityTestAsync(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 createConnectivityTestAsync( + CreateConnectivityTestRequest request) { + return createConnectivityTestOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Connectivity Test. After you create a test, the reachability analysis is + * performed as part of the long running operation, which completes when the analysis completes. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing + * non-existent resources in the network, or you don't have read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of <code>AMBIGUOUS</code>. For more information, see the + * Connectivity Test documentation. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   CreateConnectivityTestRequest request =
+   *       CreateConnectivityTestRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setTestId("testId-877170355")
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       reachabilityServiceClient.createConnectivityTestOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectivityTest response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createConnectivityTestOperationCallable() { + return stub.createConnectivityTestOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Connectivity Test. After you create a test, the reachability analysis is + * performed as part of the long running operation, which completes when the analysis completes. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing + * non-existent resources in the network, or you don't have read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of <code>AMBIGUOUS</code>. For more information, see the + * Connectivity Test documentation. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   CreateConnectivityTestRequest request =
+   *       CreateConnectivityTestRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setTestId("testId-877170355")
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.createConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createConnectivityTestCallable() { + return stub.createConnectivityTestCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of an existing `ConnectivityTest`. After you update a test, the + * reachability analysis is performed as part of the long running operation, which completes when + * the analysis completes. The Reachability state in the test resource is updated with the new + * result. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain + * non-existent resources in the network, or the user does not have read permissions to the + * network configurations of listed projects), then the reachability result returns a value of + * <code>UNKNOWN</code>. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more + * details. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ConnectivityTest resource = ConnectivityTest.newBuilder().build();
+   *   ConnectivityTest response =
+   *       reachabilityServiceClient.updateConnectivityTestAsync(updateMask, resource).get();
+   * }
+   * }
+ * + * @param updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param resource Required. Only fields specified in update_mask are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateConnectivityTestAsync( + FieldMask updateMask, ConnectivityTest resource) { + UpdateConnectivityTestRequest request = + UpdateConnectivityTestRequest.newBuilder() + .setUpdateMask(updateMask) + .setResource(resource) + .build(); + return updateConnectivityTestAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of an existing `ConnectivityTest`. After you update a test, the + * reachability analysis is performed as part of the long running operation, which completes when + * the analysis completes. The Reachability state in the test resource is updated with the new + * result. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain + * non-existent resources in the network, or the user does not have read permissions to the + * network configurations of listed projects), then the reachability result returns a value of + * <code>UNKNOWN</code>. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more + * details. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   UpdateConnectivityTestRequest request =
+   *       UpdateConnectivityTestRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   ConnectivityTest response =
+   *       reachabilityServiceClient.updateConnectivityTestAsync(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 updateConnectivityTestAsync( + UpdateConnectivityTestRequest request) { + return updateConnectivityTestOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of an existing `ConnectivityTest`. After you update a test, the + * reachability analysis is performed as part of the long running operation, which completes when + * the analysis completes. The Reachability state in the test resource is updated with the new + * result. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain + * non-existent resources in the network, or the user does not have read permissions to the + * network configurations of listed projects), then the reachability result returns a value of + * <code>UNKNOWN</code>. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more + * details. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   UpdateConnectivityTestRequest request =
+   *       UpdateConnectivityTestRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       reachabilityServiceClient.updateConnectivityTestOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectivityTest response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateConnectivityTestOperationCallable() { + return stub.updateConnectivityTestOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of an existing `ConnectivityTest`. After you update a test, the + * reachability analysis is performed as part of the long running operation, which completes when + * the analysis completes. The Reachability state in the test resource is updated with the new + * result. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain + * non-existent resources in the network, or the user does not have read permissions to the + * network configurations of listed projects), then the reachability result returns a value of + * <code>UNKNOWN</code>. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more + * details. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   UpdateConnectivityTestRequest request =
+   *       UpdateConnectivityTestRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.updateConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateConnectivityTestCallable() { + return stub.updateConnectivityTestCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability + * analysis is performed as part of the long running operation, which completes when the analysis + * completes. + * + *

Even though the test configuration remains the same, the reachability result may change due + * to underlying network configuration changes. + * + *

If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified + * resources are deleted in the network, or you lost read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   RerunConnectivityTestRequest request =
+   *       RerunConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ConnectivityTest response =
+   *       reachabilityServiceClient.rerunConnectivityTestAsync(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 rerunConnectivityTestAsync( + RerunConnectivityTestRequest request) { + return rerunConnectivityTestOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability + * analysis is performed as part of the long running operation, which completes when the analysis + * completes. + * + *

Even though the test configuration remains the same, the reachability result may change due + * to underlying network configuration changes. + * + *

If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified + * resources are deleted in the network, or you lost read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   RerunConnectivityTestRequest request =
+   *       RerunConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       reachabilityServiceClient.rerunConnectivityTestOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectivityTest response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + rerunConnectivityTestOperationCallable() { + return stub.rerunConnectivityTestOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability + * analysis is performed as part of the long running operation, which completes when the analysis + * completes. + * + *

Even though the test configuration remains the same, the reachability result may change due + * to underlying network configuration changes. + * + *

If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified + * resources are deleted in the network, or you lost read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   RerunConnectivityTestRequest request =
+   *       RerunConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.rerunConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + rerunConnectivityTestCallable() { + return stub.rerunConnectivityTestCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific `ConnectivityTest`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   String name = "name3373707";
+   *   reachabilityServiceClient.deleteConnectivityTestAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteConnectivityTestAsync(String name) { + DeleteConnectivityTestRequest request = + DeleteConnectivityTestRequest.newBuilder().setName(name).build(); + return deleteConnectivityTestAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific `ConnectivityTest`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   DeleteConnectivityTestRequest request =
+   *       DeleteConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   reachabilityServiceClient.deleteConnectivityTestAsync(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 deleteConnectivityTestAsync( + DeleteConnectivityTestRequest request) { + return deleteConnectivityTestOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific `ConnectivityTest`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   DeleteConnectivityTestRequest request =
+   *       DeleteConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       reachabilityServiceClient.deleteConnectivityTestOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteConnectivityTestOperationCallable() { + return stub.deleteConnectivityTestOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific `ConnectivityTest`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   DeleteConnectivityTestRequest request =
+   *       DeleteConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.deleteConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteConnectivityTestCallable() { + return stub.deleteConnectivityTestCallable(); + } + + @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 ListConnectivityTestsPagedResponse + extends AbstractPagedListResponse< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ConnectivityTest, + ListConnectivityTestsPage, + ListConnectivityTestsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListConnectivityTestsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListConnectivityTestsPagedResponse apply(ListConnectivityTestsPage input) { + return new ListConnectivityTestsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListConnectivityTestsPagedResponse(ListConnectivityTestsPage page) { + super(page, ListConnectivityTestsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListConnectivityTestsPage + extends AbstractPage< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ConnectivityTest, + ListConnectivityTestsPage> { + + private ListConnectivityTestsPage( + PageContext + context, + ListConnectivityTestsResponse response) { + super(context, response); + } + + private static ListConnectivityTestsPage createEmptyPage() { + return new ListConnectivityTestsPage(null, null); + } + + @Override + protected ListConnectivityTestsPage createPage( + PageContext + context, + ListConnectivityTestsResponse response) { + return new ListConnectivityTestsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListConnectivityTestsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ConnectivityTest, + ListConnectivityTestsPage, + ListConnectivityTestsFixedSizeCollection> { + + private ListConnectivityTestsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListConnectivityTestsFixedSizeCollection createEmptyCollection() { + return new ListConnectivityTestsFixedSizeCollection(null, 0); + } + + @Override + protected ListConnectivityTestsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListConnectivityTestsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceSettings.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceSettings.java new file mode 100644 index 00000000..3eee7a21 --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceSettings.java @@ -0,0 +1,313 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1; + +import static com.google.cloud.networkmanagement.v1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +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.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.networkmanagement.v1.stub.ReachabilityServiceStubSettings; +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 ReachabilityServiceClient}. + * + *

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

    + *
  • The default service address (networkmanagement.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 getConnectivityTest to 30 seconds: + * + *

{@code
+ * ReachabilityServiceSettings.Builder reachabilityServiceSettingsBuilder =
+ *     ReachabilityServiceSettings.newBuilder();
+ * reachabilityServiceSettingsBuilder
+ *     .getConnectivityTestSettings()
+ *     .setRetrySettings(
+ *         reachabilityServiceSettingsBuilder
+ *             .getConnectivityTestSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ReachabilityServiceSettings reachabilityServiceSettings =
+ *     reachabilityServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ReachabilityServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listConnectivityTests. */ + public PagedCallSettings< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).listConnectivityTestsSettings(); + } + + /** Returns the object with the settings used for calls to getConnectivityTest. */ + public UnaryCallSettings + getConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).getConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to createConnectivityTest. */ + public UnaryCallSettings + createConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).createConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to createConnectivityTest. */ + public OperationCallSettings + createConnectivityTestOperationSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()) + .createConnectivityTestOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateConnectivityTest. */ + public UnaryCallSettings + updateConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).updateConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to updateConnectivityTest. */ + public OperationCallSettings + updateConnectivityTestOperationSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()) + .updateConnectivityTestOperationSettings(); + } + + /** Returns the object with the settings used for calls to rerunConnectivityTest. */ + public UnaryCallSettings + rerunConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).rerunConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to rerunConnectivityTest. */ + public OperationCallSettings + rerunConnectivityTestOperationSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()) + .rerunConnectivityTestOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteConnectivityTest. */ + public UnaryCallSettings + deleteConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).deleteConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to deleteConnectivityTest. */ + public OperationCallSettings + deleteConnectivityTestOperationSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()) + .deleteConnectivityTestOperationSettings(); + } + + public static final ReachabilityServiceSettings create(ReachabilityServiceStubSettings stub) + throws IOException { + return new ReachabilityServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ReachabilityServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ReachabilityServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ReachabilityServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ReachabilityServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ReachabilityServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ReachabilityServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ReachabilityServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 ReachabilityServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ReachabilityServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ReachabilityServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ReachabilityServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ReachabilityServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ReachabilityServiceStubSettings.newBuilder()); + } + + public ReachabilityServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ReachabilityServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * 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) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listConnectivityTests. */ + public PagedCallSettings.Builder< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings() { + return getStubSettingsBuilder().listConnectivityTestsSettings(); + } + + /** Returns the builder for the settings used for calls to getConnectivityTest. */ + public UnaryCallSettings.Builder + getConnectivityTestSettings() { + return getStubSettingsBuilder().getConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to createConnectivityTest. */ + public UnaryCallSettings.Builder + createConnectivityTestSettings() { + return getStubSettingsBuilder().createConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to createConnectivityTest. */ + public OperationCallSettings.Builder< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationSettings() { + return getStubSettingsBuilder().createConnectivityTestOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateConnectivityTest. */ + public UnaryCallSettings.Builder + updateConnectivityTestSettings() { + return getStubSettingsBuilder().updateConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to updateConnectivityTest. */ + public OperationCallSettings.Builder< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationSettings() { + return getStubSettingsBuilder().updateConnectivityTestOperationSettings(); + } + + /** Returns the builder for the settings used for calls to rerunConnectivityTest. */ + public UnaryCallSettings.Builder + rerunConnectivityTestSettings() { + return getStubSettingsBuilder().rerunConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to rerunConnectivityTest. */ + public OperationCallSettings.Builder< + RerunConnectivityTestRequest, ConnectivityTest, OperationMetadata> + rerunConnectivityTestOperationSettings() { + return getStubSettingsBuilder().rerunConnectivityTestOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConnectivityTest. */ + public UnaryCallSettings.Builder + deleteConnectivityTestSettings() { + return getStubSettingsBuilder().deleteConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConnectivityTest. */ + public OperationCallSettings.Builder + deleteConnectivityTestOperationSettings() { + return getStubSettingsBuilder().deleteConnectivityTestOperationSettings(); + } + + @Override + public ReachabilityServiceSettings build() throws IOException { + return new ReachabilityServiceSettings(this); + } + } +} diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/gapic_metadata.json b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/gapic_metadata.json new file mode 100644 index 00000000..96c7a9cd --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/gapic_metadata.json @@ -0,0 +1,36 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.networkmanagement.v1", + "libraryPackage": "com.google.cloud.networkmanagement.v1", + "services": { + "ReachabilityService": { + "clients": { + "grpc": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "CreateConnectivityTest": { + "methods": ["createConnectivityTestAsync", "createConnectivityTestAsync", "createConnectivityTestOperationCallable", "createConnectivityTestCallable"] + }, + "DeleteConnectivityTest": { + "methods": ["deleteConnectivityTestAsync", "deleteConnectivityTestAsync", "deleteConnectivityTestOperationCallable", "deleteConnectivityTestCallable"] + }, + "GetConnectivityTest": { + "methods": ["getConnectivityTest", "getConnectivityTest", "getConnectivityTestCallable"] + }, + "ListConnectivityTests": { + "methods": ["listConnectivityTests", "listConnectivityTests", "listConnectivityTestsPagedCallable", "listConnectivityTestsCallable"] + }, + "RerunConnectivityTest": { + "methods": ["rerunConnectivityTestAsync", "rerunConnectivityTestOperationCallable", "rerunConnectivityTestCallable"] + }, + "UpdateConnectivityTest": { + "methods": ["updateConnectivityTestAsync", "updateConnectivityTestAsync", "updateConnectivityTestOperationCallable", "updateConnectivityTestCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/package-info.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/package-info.java new file mode 100644 index 00000000..e66bf27d --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/package-info.java @@ -0,0 +1,43 @@ +/* + * 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. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= ReachabilityServiceClient ======================= + * + *

Service Description: The Reachability service in the Google Cloud Network Management API + * provides services that analyze the reachability within a single Google Virtual Private Cloud + * (VPC) network, between peered VPC networks, between VPC and on-premises networks, or between VPC + * networks and internet hosts. A reachability analysis is based on Google Cloud network + * configurations. + * + *

You can use the analysis results to verify these configurations and to troubleshoot + * connectivity issues. + * + *

Sample for ReachabilityServiceClient: + * + *

{@code
+ * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+ *   String name = "name3373707";
+ *   ConnectivityTest response = reachabilityServiceClient.getConnectivityTest(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.networkmanagement.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/GrpcReachabilityServiceCallableFactory.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/GrpcReachabilityServiceCallableFactory.java new file mode 100644 index 00000000..b8765e69 --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/GrpcReachabilityServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.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 ReachabilityService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcReachabilityServiceCallableFactory 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/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/GrpcReachabilityServiceStub.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/GrpcReachabilityServiceStub.java new file mode 100644 index 00000000..9c8284f7 --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/GrpcReachabilityServiceStub.java @@ -0,0 +1,438 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1.stub; + +import static com.google.cloud.networkmanagement.v1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.networkmanagement.v1.ConnectivityTest; +import com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; +import com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; +import com.google.cloud.networkmanagement.v1.OperationMetadata; +import com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; +import com.google.common.collect.ImmutableMap; +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.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ReachabilityService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcReachabilityServiceStub extends ReachabilityServiceStub { + private static final MethodDescriptor + listConnectivityTestsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1.ReachabilityService/ListConnectivityTests") + .setRequestMarshaller( + ProtoUtils.marshaller(ListConnectivityTestsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListConnectivityTestsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1.ReachabilityService/GetConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(GetConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ConnectivityTest.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1.ReachabilityService/CreateConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1.ReachabilityService/UpdateConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + rerunConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1.ReachabilityService/RerunConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(RerunConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1.ReachabilityService/DeleteConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + listConnectivityTestsCallable; + private final UnaryCallable + listConnectivityTestsPagedCallable; + private final UnaryCallable + getConnectivityTestCallable; + private final UnaryCallable + createConnectivityTestCallable; + private final OperationCallable< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationCallable; + private final UnaryCallable + updateConnectivityTestCallable; + private final OperationCallable< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationCallable; + private final UnaryCallable + rerunConnectivityTestCallable; + private final OperationCallable + rerunConnectivityTestOperationCallable; + private final UnaryCallable + deleteConnectivityTestCallable; + private final OperationCallable + deleteConnectivityTestOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcReachabilityServiceStub create(ReachabilityServiceStubSettings settings) + throws IOException { + return new GrpcReachabilityServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcReachabilityServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcReachabilityServiceStub( + ReachabilityServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcReachabilityServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcReachabilityServiceStub( + ReachabilityServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcReachabilityServiceStub, 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 GrpcReachabilityServiceStub( + ReachabilityServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcReachabilityServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcReachabilityServiceStub, 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 GrpcReachabilityServiceStub( + ReachabilityServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listConnectivityTestsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listConnectivityTestsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListConnectivityTestsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "resource.name", String.valueOf(request.getResource().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + rerunConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rerunConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RerunConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listConnectivityTestsCallable = + callableFactory.createUnaryCallable( + listConnectivityTestsTransportSettings, + settings.listConnectivityTestsSettings(), + clientContext); + this.listConnectivityTestsPagedCallable = + callableFactory.createPagedCallable( + listConnectivityTestsTransportSettings, + settings.listConnectivityTestsSettings(), + clientContext); + this.getConnectivityTestCallable = + callableFactory.createUnaryCallable( + getConnectivityTestTransportSettings, + settings.getConnectivityTestSettings(), + clientContext); + this.createConnectivityTestCallable = + callableFactory.createUnaryCallable( + createConnectivityTestTransportSettings, + settings.createConnectivityTestSettings(), + clientContext); + this.createConnectivityTestOperationCallable = + callableFactory.createOperationCallable( + createConnectivityTestTransportSettings, + settings.createConnectivityTestOperationSettings(), + clientContext, + operationsStub); + this.updateConnectivityTestCallable = + callableFactory.createUnaryCallable( + updateConnectivityTestTransportSettings, + settings.updateConnectivityTestSettings(), + clientContext); + this.updateConnectivityTestOperationCallable = + callableFactory.createOperationCallable( + updateConnectivityTestTransportSettings, + settings.updateConnectivityTestOperationSettings(), + clientContext, + operationsStub); + this.rerunConnectivityTestCallable = + callableFactory.createUnaryCallable( + rerunConnectivityTestTransportSettings, + settings.rerunConnectivityTestSettings(), + clientContext); + this.rerunConnectivityTestOperationCallable = + callableFactory.createOperationCallable( + rerunConnectivityTestTransportSettings, + settings.rerunConnectivityTestOperationSettings(), + clientContext, + operationsStub); + this.deleteConnectivityTestCallable = + callableFactory.createUnaryCallable( + deleteConnectivityTestTransportSettings, + settings.deleteConnectivityTestSettings(), + clientContext); + this.deleteConnectivityTestOperationCallable = + callableFactory.createOperationCallable( + deleteConnectivityTestTransportSettings, + settings.deleteConnectivityTestOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listConnectivityTestsCallable() { + return listConnectivityTestsCallable; + } + + @Override + public UnaryCallable + listConnectivityTestsPagedCallable() { + return listConnectivityTestsPagedCallable; + } + + @Override + public UnaryCallable getConnectivityTestCallable() { + return getConnectivityTestCallable; + } + + @Override + public UnaryCallable createConnectivityTestCallable() { + return createConnectivityTestCallable; + } + + @Override + public OperationCallable + createConnectivityTestOperationCallable() { + return createConnectivityTestOperationCallable; + } + + @Override + public UnaryCallable updateConnectivityTestCallable() { + return updateConnectivityTestCallable; + } + + @Override + public OperationCallable + updateConnectivityTestOperationCallable() { + return updateConnectivityTestOperationCallable; + } + + @Override + public UnaryCallable rerunConnectivityTestCallable() { + return rerunConnectivityTestCallable; + } + + @Override + public OperationCallable + rerunConnectivityTestOperationCallable() { + return rerunConnectivityTestOperationCallable; + } + + @Override + public UnaryCallable deleteConnectivityTestCallable() { + return deleteConnectivityTestCallable; + } + + @Override + public OperationCallable + deleteConnectivityTestOperationCallable() { + return deleteConnectivityTestOperationCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @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/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/ReachabilityServiceStub.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/ReachabilityServiceStub.java new file mode 100644 index 00000000..d090a7e8 --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/ReachabilityServiceStub.java @@ -0,0 +1,108 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1.stub; + +import static com.google.cloud.networkmanagement.v1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +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.networkmanagement.v1.ConnectivityTest; +import com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; +import com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; +import com.google.cloud.networkmanagement.v1.OperationMetadata; +import com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; +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 ReachabilityService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ReachabilityServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listConnectivityTestsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listConnectivityTestsPagedCallable()"); + } + + public UnaryCallable + listConnectivityTestsCallable() { + throw new UnsupportedOperationException("Not implemented: listConnectivityTestsCallable()"); + } + + public UnaryCallable getConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: getConnectivityTestCallable()"); + } + + public OperationCallable + createConnectivityTestOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createConnectivityTestOperationCallable()"); + } + + public UnaryCallable createConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: createConnectivityTestCallable()"); + } + + public OperationCallable + updateConnectivityTestOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateConnectivityTestOperationCallable()"); + } + + public UnaryCallable updateConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: updateConnectivityTestCallable()"); + } + + public OperationCallable + rerunConnectivityTestOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: rerunConnectivityTestOperationCallable()"); + } + + public UnaryCallable rerunConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: rerunConnectivityTestCallable()"); + } + + public OperationCallable + deleteConnectivityTestOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteConnectivityTestOperationCallable()"); + } + + public UnaryCallable deleteConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: deleteConnectivityTestCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/ReachabilityServiceStubSettings.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/ReachabilityServiceStubSettings.java new file mode 100644 index 00000000..d509bf8d --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1/stub/ReachabilityServiceStubSettings.java @@ -0,0 +1,706 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1.stub; + +import static com.google.cloud.networkmanagement.v1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +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.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.networkmanagement.v1.ConnectivityTest; +import com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; +import com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; +import com.google.cloud.networkmanagement.v1.OperationMetadata; +import com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; +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 ReachabilityServiceStub}. + * + *

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

    + *
  • The default service address (networkmanagement.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 getConnectivityTest to 30 seconds: + * + *

{@code
+ * ReachabilityServiceStubSettings.Builder reachabilityServiceSettingsBuilder =
+ *     ReachabilityServiceStubSettings.newBuilder();
+ * reachabilityServiceSettingsBuilder
+ *     .getConnectivityTestSettings()
+ *     .setRetrySettings(
+ *         reachabilityServiceSettingsBuilder
+ *             .getConnectivityTestSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ReachabilityServiceStubSettings reachabilityServiceSettings =
+ *     reachabilityServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ReachabilityServiceStubSettings 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 PagedCallSettings< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings; + private final UnaryCallSettings + getConnectivityTestSettings; + private final UnaryCallSettings + createConnectivityTestSettings; + private final OperationCallSettings< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationSettings; + private final UnaryCallSettings + updateConnectivityTestSettings; + private final OperationCallSettings< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationSettings; + private final UnaryCallSettings + rerunConnectivityTestSettings; + private final OperationCallSettings< + RerunConnectivityTestRequest, ConnectivityTest, OperationMetadata> + rerunConnectivityTestOperationSettings; + private final UnaryCallSettings + deleteConnectivityTestSettings; + private final OperationCallSettings + deleteConnectivityTestOperationSettings; + + private static final PagedListDescriptor< + ListConnectivityTestsRequest, ListConnectivityTestsResponse, ConnectivityTest> + LIST_CONNECTIVITY_TESTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListConnectivityTestsRequest, ListConnectivityTestsResponse, ConnectivityTest>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListConnectivityTestsRequest injectToken( + ListConnectivityTestsRequest payload, String token) { + return ListConnectivityTestsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListConnectivityTestsRequest injectPageSize( + ListConnectivityTestsRequest payload, int pageSize) { + return ListConnectivityTestsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListConnectivityTestsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListConnectivityTestsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListConnectivityTestsResponse payload) { + return payload.getResourcesList() == null + ? ImmutableList.of() + : payload.getResourcesList(); + } + }; + + private static final PagedListResponseFactory< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + LIST_CONNECTIVITY_TESTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListConnectivityTestsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListConnectivityTestsRequest, ListConnectivityTestsResponse, ConnectivityTest> + pageContext = + PageContext.create( + callable, LIST_CONNECTIVITY_TESTS_PAGE_STR_DESC, request, context); + return ListConnectivityTestsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listConnectivityTests. */ + public PagedCallSettings< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings() { + return listConnectivityTestsSettings; + } + + /** Returns the object with the settings used for calls to getConnectivityTest. */ + public UnaryCallSettings + getConnectivityTestSettings() { + return getConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to createConnectivityTest. */ + public UnaryCallSettings + createConnectivityTestSettings() { + return createConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to createConnectivityTest. */ + public OperationCallSettings + createConnectivityTestOperationSettings() { + return createConnectivityTestOperationSettings; + } + + /** Returns the object with the settings used for calls to updateConnectivityTest. */ + public UnaryCallSettings + updateConnectivityTestSettings() { + return updateConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to updateConnectivityTest. */ + public OperationCallSettings + updateConnectivityTestOperationSettings() { + return updateConnectivityTestOperationSettings; + } + + /** Returns the object with the settings used for calls to rerunConnectivityTest. */ + public UnaryCallSettings + rerunConnectivityTestSettings() { + return rerunConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to rerunConnectivityTest. */ + public OperationCallSettings + rerunConnectivityTestOperationSettings() { + return rerunConnectivityTestOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteConnectivityTest. */ + public UnaryCallSettings + deleteConnectivityTestSettings() { + return deleteConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to deleteConnectivityTest. */ + public OperationCallSettings + deleteConnectivityTestOperationSettings() { + return deleteConnectivityTestOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ReachabilityServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcReachabilityServiceStub.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 "networkmanagement.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "networkmanagement.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); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + 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 defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ReachabilityServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 ReachabilityServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listConnectivityTestsSettings = settingsBuilder.listConnectivityTestsSettings().build(); + getConnectivityTestSettings = settingsBuilder.getConnectivityTestSettings().build(); + createConnectivityTestSettings = settingsBuilder.createConnectivityTestSettings().build(); + createConnectivityTestOperationSettings = + settingsBuilder.createConnectivityTestOperationSettings().build(); + updateConnectivityTestSettings = settingsBuilder.updateConnectivityTestSettings().build(); + updateConnectivityTestOperationSettings = + settingsBuilder.updateConnectivityTestOperationSettings().build(); + rerunConnectivityTestSettings = settingsBuilder.rerunConnectivityTestSettings().build(); + rerunConnectivityTestOperationSettings = + settingsBuilder.rerunConnectivityTestOperationSettings().build(); + deleteConnectivityTestSettings = settingsBuilder.deleteConnectivityTestSettings().build(); + deleteConnectivityTestOperationSettings = + settingsBuilder.deleteConnectivityTestOperationSettings().build(); + } + + /** Builder for ReachabilityServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings; + private final UnaryCallSettings.Builder + getConnectivityTestSettings; + private final UnaryCallSettings.Builder + createConnectivityTestSettings; + private final OperationCallSettings.Builder< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationSettings; + private final UnaryCallSettings.Builder + updateConnectivityTestSettings; + private final OperationCallSettings.Builder< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationSettings; + private final UnaryCallSettings.Builder + rerunConnectivityTestSettings; + private final OperationCallSettings.Builder< + RerunConnectivityTestRequest, ConnectivityTest, OperationMetadata> + rerunConnectivityTestOperationSettings; + private final UnaryCallSettings.Builder + deleteConnectivityTestSettings; + private final OperationCallSettings.Builder< + DeleteConnectivityTestRequest, Empty, OperationMetadata> + deleteConnectivityTestOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + 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_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listConnectivityTestsSettings = + PagedCallSettings.newBuilder(LIST_CONNECTIVITY_TESTS_PAGE_STR_FACT); + getConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createConnectivityTestOperationSettings = OperationCallSettings.newBuilder(); + updateConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateConnectivityTestOperationSettings = OperationCallSettings.newBuilder(); + rerunConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + rerunConnectivityTestOperationSettings = OperationCallSettings.newBuilder(); + deleteConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteConnectivityTestOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listConnectivityTestsSettings, + getConnectivityTestSettings, + createConnectivityTestSettings, + updateConnectivityTestSettings, + rerunConnectivityTestSettings, + deleteConnectivityTestSettings); + initDefaults(this); + } + + protected Builder(ReachabilityServiceStubSettings settings) { + super(settings); + + listConnectivityTestsSettings = settings.listConnectivityTestsSettings.toBuilder(); + getConnectivityTestSettings = settings.getConnectivityTestSettings.toBuilder(); + createConnectivityTestSettings = settings.createConnectivityTestSettings.toBuilder(); + createConnectivityTestOperationSettings = + settings.createConnectivityTestOperationSettings.toBuilder(); + updateConnectivityTestSettings = settings.updateConnectivityTestSettings.toBuilder(); + updateConnectivityTestOperationSettings = + settings.updateConnectivityTestOperationSettings.toBuilder(); + rerunConnectivityTestSettings = settings.rerunConnectivityTestSettings.toBuilder(); + rerunConnectivityTestOperationSettings = + settings.rerunConnectivityTestOperationSettings.toBuilder(); + deleteConnectivityTestSettings = settings.deleteConnectivityTestSettings.toBuilder(); + deleteConnectivityTestOperationSettings = + settings.deleteConnectivityTestOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listConnectivityTestsSettings, + getConnectivityTestSettings, + createConnectivityTestSettings, + updateConnectivityTestSettings, + rerunConnectivityTestSettings, + deleteConnectivityTestSettings); + } + + 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 initDefaults(Builder builder) { + builder + .listConnectivityTestsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .rerunConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createConnectivityTestOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ConnectivityTest.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 + .updateConnectivityTestOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ConnectivityTest.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 + .rerunConnectivityTestOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ConnectivityTest.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 + .deleteConnectivityTestOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_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; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * 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) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listConnectivityTests. */ + public PagedCallSettings.Builder< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings() { + return listConnectivityTestsSettings; + } + + /** Returns the builder for the settings used for calls to getConnectivityTest. */ + public UnaryCallSettings.Builder + getConnectivityTestSettings() { + return getConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to createConnectivityTest. */ + public UnaryCallSettings.Builder + createConnectivityTestSettings() { + return createConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to createConnectivityTest. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationSettings() { + return createConnectivityTestOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateConnectivityTest. */ + public UnaryCallSettings.Builder + updateConnectivityTestSettings() { + return updateConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to updateConnectivityTest. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationSettings() { + return updateConnectivityTestOperationSettings; + } + + /** Returns the builder for the settings used for calls to rerunConnectivityTest. */ + public UnaryCallSettings.Builder + rerunConnectivityTestSettings() { + return rerunConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to rerunConnectivityTest. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RerunConnectivityTestRequest, ConnectivityTest, OperationMetadata> + rerunConnectivityTestOperationSettings() { + return rerunConnectivityTestOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteConnectivityTest. */ + public UnaryCallSettings.Builder + deleteConnectivityTestSettings() { + return deleteConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to deleteConnectivityTest. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteConnectivityTestOperationSettings() { + return deleteConnectivityTestOperationSettings; + } + + @Override + public ReachabilityServiceStubSettings build() throws IOException { + return new ReachabilityServiceStubSettings(this); + } + } +} diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceClient.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceClient.java new file mode 100644 index 00000000..bb18ac8b --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceClient.java @@ -0,0 +1,815 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1; + +import com.google.api.core.ApiFunction; +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.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.networkmanagement.v1beta1.stub.ReachabilityServiceStub; +import com.google.cloud.networkmanagement.v1beta1.stub.ReachabilityServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The Reachability service in the Google Cloud Network Management API provides + * services that analyze the reachability within a single Google Virtual Private Cloud (VPC) + * network, between peered VPC networks, between VPC and on-premises networks, or between VPC + * networks and internet hosts. A reachability analysis is based on Google Cloud network + * configurations. + * + *

You can use the analysis results to verify these configurations and to troubleshoot + * connectivity issues. + * + *

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

{@code
+ * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+ *   GetConnectivityTestRequest request =
+ *       GetConnectivityTestRequest.newBuilder().setName("name3373707").build();
+ *   ConnectivityTest response = reachabilityServiceClient.getConnectivityTest(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ReachabilityServiceClient 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 ReachabilityServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * ReachabilityServiceSettings reachabilityServiceSettings =
+ *     ReachabilityServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ReachabilityServiceClient reachabilityServiceClient =
+ *     ReachabilityServiceClient.create(reachabilityServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ReachabilityServiceSettings reachabilityServiceSettings =
+ *     ReachabilityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ReachabilityServiceClient reachabilityServiceClient =
+ *     ReachabilityServiceClient.create(reachabilityServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ReachabilityServiceClient implements BackgroundResource { + private final ReachabilityServiceSettings settings; + private final ReachabilityServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of ReachabilityServiceClient with default settings. */ + public static final ReachabilityServiceClient create() throws IOException { + return create(ReachabilityServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ReachabilityServiceClient, 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 ReachabilityServiceClient create(ReachabilityServiceSettings settings) + throws IOException { + return new ReachabilityServiceClient(settings); + } + + /** + * Constructs an instance of ReachabilityServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(ReachabilityServiceSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ReachabilityServiceClient create(ReachabilityServiceStub stub) { + return new ReachabilityServiceClient(stub); + } + + /** + * Constructs an instance of ReachabilityServiceClient, 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 ReachabilityServiceClient(ReachabilityServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ReachabilityServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ReachabilityServiceClient(ReachabilityServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final ReachabilityServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ReachabilityServiceStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Connectivity Tests owned by a project. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   ListConnectivityTestsRequest request =
+   *       ListConnectivityTestsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ConnectivityTest element :
+   *       reachabilityServiceClient.listConnectivityTests(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 ListConnectivityTestsPagedResponse listConnectivityTests( + ListConnectivityTestsRequest request) { + return listConnectivityTestsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Connectivity Tests owned by a project. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   ListConnectivityTestsRequest request =
+   *       ListConnectivityTestsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.listConnectivityTestsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ConnectivityTest element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConnectivityTestsPagedCallable() { + return stub.listConnectivityTestsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Connectivity Tests owned by a project. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   ListConnectivityTestsRequest request =
+   *       ListConnectivityTestsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListConnectivityTestsResponse response =
+   *         reachabilityServiceClient.listConnectivityTestsCallable().call(request);
+   *     for (ConnectivityTest element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConnectivityTestsCallable() { + return stub.listConnectivityTestsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Connectivity Test. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   GetConnectivityTestRequest request =
+   *       GetConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ConnectivityTest response = reachabilityServiceClient.getConnectivityTest(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 ConnectivityTest getConnectivityTest(GetConnectivityTestRequest request) { + return getConnectivityTestCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Connectivity Test. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   GetConnectivityTestRequest request =
+   *       GetConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.getConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectivityTest response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getConnectivityTestCallable() { + return stub.getConnectivityTestCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Connectivity Test. After you create a test, the reachability analysis is + * performed as part of the long running operation, which completes when the analysis completes. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing + * non-existent resources in the network, or you don't have read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of <code>AMBIGUOUS</code>. For more information, see the + * Connectivity Test documentation. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   CreateConnectivityTestRequest request =
+   *       CreateConnectivityTestRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setTestId("testId-877170355")
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   ConnectivityTest response =
+   *       reachabilityServiceClient.createConnectivityTestAsync(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 createConnectivityTestAsync( + CreateConnectivityTestRequest request) { + return createConnectivityTestOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Connectivity Test. After you create a test, the reachability analysis is + * performed as part of the long running operation, which completes when the analysis completes. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing + * non-existent resources in the network, or you don't have read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of <code>AMBIGUOUS</code>. For more information, see the + * Connectivity Test documentation. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   CreateConnectivityTestRequest request =
+   *       CreateConnectivityTestRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setTestId("testId-877170355")
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       reachabilityServiceClient.createConnectivityTestOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectivityTest response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createConnectivityTestOperationCallable() { + return stub.createConnectivityTestOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Connectivity Test. After you create a test, the reachability analysis is + * performed as part of the long running operation, which completes when the analysis completes. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing + * non-existent resources in the network, or you don't have read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of <code>AMBIGUOUS</code>. For more information, see the + * Connectivity Test documentation. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   CreateConnectivityTestRequest request =
+   *       CreateConnectivityTestRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setTestId("testId-877170355")
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.createConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createConnectivityTestCallable() { + return stub.createConnectivityTestCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of an existing `ConnectivityTest`. After you update a test, the + * reachability analysis is performed as part of the long running operation, which completes when + * the analysis completes. The Reachability state in the test resource is updated with the new + * result. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain + * non-existent resources in the network, or the user does not have read permissions to the + * network configurations of listed projects), then the reachability result returns a value of + * <code>UNKNOWN</code>. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more + * details. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   UpdateConnectivityTestRequest request =
+   *       UpdateConnectivityTestRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   ConnectivityTest response =
+   *       reachabilityServiceClient.updateConnectivityTestAsync(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 updateConnectivityTestAsync( + UpdateConnectivityTestRequest request) { + return updateConnectivityTestOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of an existing `ConnectivityTest`. After you update a test, the + * reachability analysis is performed as part of the long running operation, which completes when + * the analysis completes. The Reachability state in the test resource is updated with the new + * result. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain + * non-existent resources in the network, or the user does not have read permissions to the + * network configurations of listed projects), then the reachability result returns a value of + * <code>UNKNOWN</code>. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more + * details. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   UpdateConnectivityTestRequest request =
+   *       UpdateConnectivityTestRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       reachabilityServiceClient.updateConnectivityTestOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectivityTest response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateConnectivityTestOperationCallable() { + return stub.updateConnectivityTestOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of an existing `ConnectivityTest`. After you update a test, the + * reachability analysis is performed as part of the long running operation, which completes when + * the analysis completes. The Reachability state in the test resource is updated with the new + * result. + * + *

If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain + * non-existent resources in the network, or the user does not have read permissions to the + * network configurations of listed projects), then the reachability result returns a value of + * <code>UNKNOWN</code>. + * + *

If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result + * returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more + * details. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   UpdateConnectivityTestRequest request =
+   *       UpdateConnectivityTestRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setResource(ConnectivityTest.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.updateConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateConnectivityTestCallable() { + return stub.updateConnectivityTestCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability + * analysis is performed as part of the long running operation, which completes when the analysis + * completes. + * + *

Even though the test configuration remains the same, the reachability result may change due + * to underlying network configuration changes. + * + *

If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified + * resources are deleted in the network, or you lost read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   RerunConnectivityTestRequest request =
+   *       RerunConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ConnectivityTest response =
+   *       reachabilityServiceClient.rerunConnectivityTestAsync(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 rerunConnectivityTestAsync( + RerunConnectivityTestRequest request) { + return rerunConnectivityTestOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability + * analysis is performed as part of the long running operation, which completes when the analysis + * completes. + * + *

Even though the test configuration remains the same, the reachability result may change due + * to underlying network configuration changes. + * + *

If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified + * resources are deleted in the network, or you lost read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   RerunConnectivityTestRequest request =
+   *       RerunConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       reachabilityServiceClient.rerunConnectivityTestOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectivityTest response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + rerunConnectivityTestOperationCallable() { + return stub.rerunConnectivityTestOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability + * analysis is performed as part of the long running operation, which completes when the analysis + * completes. + * + *

Even though the test configuration remains the same, the reachability result may change due + * to underlying network configuration changes. + * + *

If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified + * resources are deleted in the network, or you lost read permissions to the network + * configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   RerunConnectivityTestRequest request =
+   *       RerunConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.rerunConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + rerunConnectivityTestCallable() { + return stub.rerunConnectivityTestCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific `ConnectivityTest`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   DeleteConnectivityTestRequest request =
+   *       DeleteConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   reachabilityServiceClient.deleteConnectivityTestAsync(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 deleteConnectivityTestAsync( + DeleteConnectivityTestRequest request) { + return deleteConnectivityTestOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific `ConnectivityTest`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   DeleteConnectivityTestRequest request =
+   *       DeleteConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       reachabilityServiceClient.deleteConnectivityTestOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteConnectivityTestOperationCallable() { + return stub.deleteConnectivityTestOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific `ConnectivityTest`. + * + *

Sample code: + * + *

{@code
+   * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+   *   DeleteConnectivityTestRequest request =
+   *       DeleteConnectivityTestRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       reachabilityServiceClient.deleteConnectivityTestCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteConnectivityTestCallable() { + return stub.deleteConnectivityTestCallable(); + } + + @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 ListConnectivityTestsPagedResponse + extends AbstractPagedListResponse< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ConnectivityTest, + ListConnectivityTestsPage, + ListConnectivityTestsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListConnectivityTestsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListConnectivityTestsPagedResponse apply(ListConnectivityTestsPage input) { + return new ListConnectivityTestsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListConnectivityTestsPagedResponse(ListConnectivityTestsPage page) { + super(page, ListConnectivityTestsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListConnectivityTestsPage + extends AbstractPage< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ConnectivityTest, + ListConnectivityTestsPage> { + + private ListConnectivityTestsPage( + PageContext + context, + ListConnectivityTestsResponse response) { + super(context, response); + } + + private static ListConnectivityTestsPage createEmptyPage() { + return new ListConnectivityTestsPage(null, null); + } + + @Override + protected ListConnectivityTestsPage createPage( + PageContext + context, + ListConnectivityTestsResponse response) { + return new ListConnectivityTestsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListConnectivityTestsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ConnectivityTest, + ListConnectivityTestsPage, + ListConnectivityTestsFixedSizeCollection> { + + private ListConnectivityTestsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListConnectivityTestsFixedSizeCollection createEmptyCollection() { + return new ListConnectivityTestsFixedSizeCollection(null, 0); + } + + @Override + protected ListConnectivityTestsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListConnectivityTestsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceSettings.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceSettings.java new file mode 100644 index 00000000..087e4f51 --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceSettings.java @@ -0,0 +1,314 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1; + +import static com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +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.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.networkmanagement.v1beta1.stub.ReachabilityServiceStubSettings; +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 ReachabilityServiceClient}. + * + *

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

    + *
  • The default service address (networkmanagement.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 getConnectivityTest to 30 seconds: + * + *

{@code
+ * ReachabilityServiceSettings.Builder reachabilityServiceSettingsBuilder =
+ *     ReachabilityServiceSettings.newBuilder();
+ * reachabilityServiceSettingsBuilder
+ *     .getConnectivityTestSettings()
+ *     .setRetrySettings(
+ *         reachabilityServiceSettingsBuilder
+ *             .getConnectivityTestSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ReachabilityServiceSettings reachabilityServiceSettings =
+ *     reachabilityServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ReachabilityServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listConnectivityTests. */ + public PagedCallSettings< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).listConnectivityTestsSettings(); + } + + /** Returns the object with the settings used for calls to getConnectivityTest. */ + public UnaryCallSettings + getConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).getConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to createConnectivityTest. */ + public UnaryCallSettings + createConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).createConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to createConnectivityTest. */ + public OperationCallSettings + createConnectivityTestOperationSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()) + .createConnectivityTestOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateConnectivityTest. */ + public UnaryCallSettings + updateConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).updateConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to updateConnectivityTest. */ + public OperationCallSettings + updateConnectivityTestOperationSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()) + .updateConnectivityTestOperationSettings(); + } + + /** Returns the object with the settings used for calls to rerunConnectivityTest. */ + public UnaryCallSettings + rerunConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).rerunConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to rerunConnectivityTest. */ + public OperationCallSettings + rerunConnectivityTestOperationSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()) + .rerunConnectivityTestOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteConnectivityTest. */ + public UnaryCallSettings + deleteConnectivityTestSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()).deleteConnectivityTestSettings(); + } + + /** Returns the object with the settings used for calls to deleteConnectivityTest. */ + public OperationCallSettings + deleteConnectivityTestOperationSettings() { + return ((ReachabilityServiceStubSettings) getStubSettings()) + .deleteConnectivityTestOperationSettings(); + } + + public static final ReachabilityServiceSettings create(ReachabilityServiceStubSettings stub) + throws IOException { + return new ReachabilityServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ReachabilityServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ReachabilityServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ReachabilityServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ReachabilityServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ReachabilityServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ReachabilityServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ReachabilityServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 ReachabilityServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ReachabilityServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ReachabilityServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ReachabilityServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ReachabilityServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ReachabilityServiceStubSettings.newBuilder()); + } + + public ReachabilityServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ReachabilityServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * 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) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listConnectivityTests. */ + public PagedCallSettings.Builder< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings() { + return getStubSettingsBuilder().listConnectivityTestsSettings(); + } + + /** Returns the builder for the settings used for calls to getConnectivityTest. */ + public UnaryCallSettings.Builder + getConnectivityTestSettings() { + return getStubSettingsBuilder().getConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to createConnectivityTest. */ + public UnaryCallSettings.Builder + createConnectivityTestSettings() { + return getStubSettingsBuilder().createConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to createConnectivityTest. */ + public OperationCallSettings.Builder< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationSettings() { + return getStubSettingsBuilder().createConnectivityTestOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateConnectivityTest. */ + public UnaryCallSettings.Builder + updateConnectivityTestSettings() { + return getStubSettingsBuilder().updateConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to updateConnectivityTest. */ + public OperationCallSettings.Builder< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationSettings() { + return getStubSettingsBuilder().updateConnectivityTestOperationSettings(); + } + + /** Returns the builder for the settings used for calls to rerunConnectivityTest. */ + public UnaryCallSettings.Builder + rerunConnectivityTestSettings() { + return getStubSettingsBuilder().rerunConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to rerunConnectivityTest. */ + public OperationCallSettings.Builder< + RerunConnectivityTestRequest, ConnectivityTest, OperationMetadata> + rerunConnectivityTestOperationSettings() { + return getStubSettingsBuilder().rerunConnectivityTestOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConnectivityTest. */ + public UnaryCallSettings.Builder + deleteConnectivityTestSettings() { + return getStubSettingsBuilder().deleteConnectivityTestSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConnectivityTest. */ + public OperationCallSettings.Builder + deleteConnectivityTestOperationSettings() { + return getStubSettingsBuilder().deleteConnectivityTestOperationSettings(); + } + + @Override + public ReachabilityServiceSettings build() throws IOException { + return new ReachabilityServiceSettings(this); + } + } +} diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/gapic_metadata.json b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/gapic_metadata.json new file mode 100644 index 00000000..90a3b0be --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/gapic_metadata.json @@ -0,0 +1,36 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.networkmanagement.v1beta1", + "libraryPackage": "com.google.cloud.networkmanagement.v1beta1", + "services": { + "ReachabilityService": { + "clients": { + "grpc": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "CreateConnectivityTest": { + "methods": ["createConnectivityTestAsync", "createConnectivityTestOperationCallable", "createConnectivityTestCallable"] + }, + "DeleteConnectivityTest": { + "methods": ["deleteConnectivityTestAsync", "deleteConnectivityTestOperationCallable", "deleteConnectivityTestCallable"] + }, + "GetConnectivityTest": { + "methods": ["getConnectivityTest", "getConnectivityTestCallable"] + }, + "ListConnectivityTests": { + "methods": ["listConnectivityTests", "listConnectivityTestsPagedCallable", "listConnectivityTestsCallable"] + }, + "RerunConnectivityTest": { + "methods": ["rerunConnectivityTestAsync", "rerunConnectivityTestOperationCallable", "rerunConnectivityTestCallable"] + }, + "UpdateConnectivityTest": { + "methods": ["updateConnectivityTestAsync", "updateConnectivityTestOperationCallable", "updateConnectivityTestCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/package-info.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/package-info.java new file mode 100644 index 00000000..bf1a8398 --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/package-info.java @@ -0,0 +1,44 @@ +/* + * 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. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= ReachabilityServiceClient ======================= + * + *

Service Description: The Reachability service in the Google Cloud Network Management API + * provides services that analyze the reachability within a single Google Virtual Private Cloud + * (VPC) network, between peered VPC networks, between VPC and on-premises networks, or between VPC + * networks and internet hosts. A reachability analysis is based on Google Cloud network + * configurations. + * + *

You can use the analysis results to verify these configurations and to troubleshoot + * connectivity issues. + * + *

Sample for ReachabilityServiceClient: + * + *

{@code
+ * try (ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.create()) {
+ *   GetConnectivityTestRequest request =
+ *       GetConnectivityTestRequest.newBuilder().setName("name3373707").build();
+ *   ConnectivityTest response = reachabilityServiceClient.getConnectivityTest(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.networkmanagement.v1beta1; + +import javax.annotation.Generated; diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/GrpcReachabilityServiceCallableFactory.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/GrpcReachabilityServiceCallableFactory.java new file mode 100644 index 00000000..34507573 --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/GrpcReachabilityServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1.stub; + +import com.google.api.core.BetaApi; +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 ReachabilityService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcReachabilityServiceCallableFactory 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/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/GrpcReachabilityServiceStub.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/GrpcReachabilityServiceStub.java new file mode 100644 index 00000000..7ecebdf6 --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/GrpcReachabilityServiceStub.java @@ -0,0 +1,440 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1.stub; + +import static com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +import com.google.api.core.BetaApi; +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.networkmanagement.v1beta1.ConnectivityTest; +import com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; +import com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; +import com.google.cloud.networkmanagement.v1beta1.OperationMetadata; +import com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; +import com.google.common.collect.ImmutableMap; +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.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ReachabilityService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcReachabilityServiceStub extends ReachabilityServiceStub { + private static final MethodDescriptor + listConnectivityTestsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1beta1.ReachabilityService/ListConnectivityTests") + .setRequestMarshaller( + ProtoUtils.marshaller(ListConnectivityTestsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListConnectivityTestsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1beta1.ReachabilityService/GetConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(GetConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ConnectivityTest.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1beta1.ReachabilityService/CreateConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1beta1.ReachabilityService/UpdateConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + rerunConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1beta1.ReachabilityService/RerunConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(RerunConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteConnectivityTestMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkmanagement.v1beta1.ReachabilityService/DeleteConnectivityTest") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + listConnectivityTestsCallable; + private final UnaryCallable + listConnectivityTestsPagedCallable; + private final UnaryCallable + getConnectivityTestCallable; + private final UnaryCallable + createConnectivityTestCallable; + private final OperationCallable< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationCallable; + private final UnaryCallable + updateConnectivityTestCallable; + private final OperationCallable< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationCallable; + private final UnaryCallable + rerunConnectivityTestCallable; + private final OperationCallable + rerunConnectivityTestOperationCallable; + private final UnaryCallable + deleteConnectivityTestCallable; + private final OperationCallable + deleteConnectivityTestOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcReachabilityServiceStub create(ReachabilityServiceStubSettings settings) + throws IOException { + return new GrpcReachabilityServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcReachabilityServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcReachabilityServiceStub( + ReachabilityServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcReachabilityServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcReachabilityServiceStub( + ReachabilityServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcReachabilityServiceStub, 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 GrpcReachabilityServiceStub( + ReachabilityServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcReachabilityServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcReachabilityServiceStub, 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 GrpcReachabilityServiceStub( + ReachabilityServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listConnectivityTestsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listConnectivityTestsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListConnectivityTestsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "resource.name", String.valueOf(request.getResource().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + rerunConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rerunConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RerunConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteConnectivityTestTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteConnectivityTestMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteConnectivityTestRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listConnectivityTestsCallable = + callableFactory.createUnaryCallable( + listConnectivityTestsTransportSettings, + settings.listConnectivityTestsSettings(), + clientContext); + this.listConnectivityTestsPagedCallable = + callableFactory.createPagedCallable( + listConnectivityTestsTransportSettings, + settings.listConnectivityTestsSettings(), + clientContext); + this.getConnectivityTestCallable = + callableFactory.createUnaryCallable( + getConnectivityTestTransportSettings, + settings.getConnectivityTestSettings(), + clientContext); + this.createConnectivityTestCallable = + callableFactory.createUnaryCallable( + createConnectivityTestTransportSettings, + settings.createConnectivityTestSettings(), + clientContext); + this.createConnectivityTestOperationCallable = + callableFactory.createOperationCallable( + createConnectivityTestTransportSettings, + settings.createConnectivityTestOperationSettings(), + clientContext, + operationsStub); + this.updateConnectivityTestCallable = + callableFactory.createUnaryCallable( + updateConnectivityTestTransportSettings, + settings.updateConnectivityTestSettings(), + clientContext); + this.updateConnectivityTestOperationCallable = + callableFactory.createOperationCallable( + updateConnectivityTestTransportSettings, + settings.updateConnectivityTestOperationSettings(), + clientContext, + operationsStub); + this.rerunConnectivityTestCallable = + callableFactory.createUnaryCallable( + rerunConnectivityTestTransportSettings, + settings.rerunConnectivityTestSettings(), + clientContext); + this.rerunConnectivityTestOperationCallable = + callableFactory.createOperationCallable( + rerunConnectivityTestTransportSettings, + settings.rerunConnectivityTestOperationSettings(), + clientContext, + operationsStub); + this.deleteConnectivityTestCallable = + callableFactory.createUnaryCallable( + deleteConnectivityTestTransportSettings, + settings.deleteConnectivityTestSettings(), + clientContext); + this.deleteConnectivityTestOperationCallable = + callableFactory.createOperationCallable( + deleteConnectivityTestTransportSettings, + settings.deleteConnectivityTestOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listConnectivityTestsCallable() { + return listConnectivityTestsCallable; + } + + @Override + public UnaryCallable + listConnectivityTestsPagedCallable() { + return listConnectivityTestsPagedCallable; + } + + @Override + public UnaryCallable getConnectivityTestCallable() { + return getConnectivityTestCallable; + } + + @Override + public UnaryCallable createConnectivityTestCallable() { + return createConnectivityTestCallable; + } + + @Override + public OperationCallable + createConnectivityTestOperationCallable() { + return createConnectivityTestOperationCallable; + } + + @Override + public UnaryCallable updateConnectivityTestCallable() { + return updateConnectivityTestCallable; + } + + @Override + public OperationCallable + updateConnectivityTestOperationCallable() { + return updateConnectivityTestOperationCallable; + } + + @Override + public UnaryCallable rerunConnectivityTestCallable() { + return rerunConnectivityTestCallable; + } + + @Override + public OperationCallable + rerunConnectivityTestOperationCallable() { + return rerunConnectivityTestOperationCallable; + } + + @Override + public UnaryCallable deleteConnectivityTestCallable() { + return deleteConnectivityTestCallable; + } + + @Override + public OperationCallable + deleteConnectivityTestOperationCallable() { + return deleteConnectivityTestOperationCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @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/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/ReachabilityServiceStub.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/ReachabilityServiceStub.java new file mode 100644 index 00000000..de8ec981 --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/ReachabilityServiceStub.java @@ -0,0 +1,110 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1.stub; + +import static com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +import com.google.api.core.BetaApi; +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.networkmanagement.v1beta1.ConnectivityTest; +import com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; +import com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; +import com.google.cloud.networkmanagement.v1beta1.OperationMetadata; +import com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; +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 ReachabilityService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ReachabilityServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listConnectivityTestsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listConnectivityTestsPagedCallable()"); + } + + public UnaryCallable + listConnectivityTestsCallable() { + throw new UnsupportedOperationException("Not implemented: listConnectivityTestsCallable()"); + } + + public UnaryCallable getConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: getConnectivityTestCallable()"); + } + + public OperationCallable + createConnectivityTestOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createConnectivityTestOperationCallable()"); + } + + public UnaryCallable createConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: createConnectivityTestCallable()"); + } + + public OperationCallable + updateConnectivityTestOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateConnectivityTestOperationCallable()"); + } + + public UnaryCallable updateConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: updateConnectivityTestCallable()"); + } + + public OperationCallable + rerunConnectivityTestOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: rerunConnectivityTestOperationCallable()"); + } + + public UnaryCallable rerunConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: rerunConnectivityTestCallable()"); + } + + public OperationCallable + deleteConnectivityTestOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteConnectivityTestOperationCallable()"); + } + + public UnaryCallable deleteConnectivityTestCallable() { + throw new UnsupportedOperationException("Not implemented: deleteConnectivityTestCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/ReachabilityServiceStubSettings.java b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/ReachabilityServiceStubSettings.java new file mode 100644 index 00000000..1ede6a5a --- /dev/null +++ b/google-cloud-network-management/src/main/java/com/google/cloud/networkmanagement/v1beta1/stub/ReachabilityServiceStubSettings.java @@ -0,0 +1,707 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1.stub; + +import static com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +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.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.networkmanagement.v1beta1.ConnectivityTest; +import com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; +import com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; +import com.google.cloud.networkmanagement.v1beta1.OperationMetadata; +import com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; +import com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; +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 ReachabilityServiceStub}. + * + *

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

    + *
  • The default service address (networkmanagement.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 getConnectivityTest to 30 seconds: + * + *

{@code
+ * ReachabilityServiceStubSettings.Builder reachabilityServiceSettingsBuilder =
+ *     ReachabilityServiceStubSettings.newBuilder();
+ * reachabilityServiceSettingsBuilder
+ *     .getConnectivityTestSettings()
+ *     .setRetrySettings(
+ *         reachabilityServiceSettingsBuilder
+ *             .getConnectivityTestSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ReachabilityServiceStubSettings reachabilityServiceSettings =
+ *     reachabilityServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ReachabilityServiceStubSettings 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 PagedCallSettings< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings; + private final UnaryCallSettings + getConnectivityTestSettings; + private final UnaryCallSettings + createConnectivityTestSettings; + private final OperationCallSettings< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationSettings; + private final UnaryCallSettings + updateConnectivityTestSettings; + private final OperationCallSettings< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationSettings; + private final UnaryCallSettings + rerunConnectivityTestSettings; + private final OperationCallSettings< + RerunConnectivityTestRequest, ConnectivityTest, OperationMetadata> + rerunConnectivityTestOperationSettings; + private final UnaryCallSettings + deleteConnectivityTestSettings; + private final OperationCallSettings + deleteConnectivityTestOperationSettings; + + private static final PagedListDescriptor< + ListConnectivityTestsRequest, ListConnectivityTestsResponse, ConnectivityTest> + LIST_CONNECTIVITY_TESTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListConnectivityTestsRequest, ListConnectivityTestsResponse, ConnectivityTest>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListConnectivityTestsRequest injectToken( + ListConnectivityTestsRequest payload, String token) { + return ListConnectivityTestsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListConnectivityTestsRequest injectPageSize( + ListConnectivityTestsRequest payload, int pageSize) { + return ListConnectivityTestsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListConnectivityTestsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListConnectivityTestsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListConnectivityTestsResponse payload) { + return payload.getResourcesList() == null + ? ImmutableList.of() + : payload.getResourcesList(); + } + }; + + private static final PagedListResponseFactory< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + LIST_CONNECTIVITY_TESTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListConnectivityTestsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListConnectivityTestsRequest, ListConnectivityTestsResponse, ConnectivityTest> + pageContext = + PageContext.create( + callable, LIST_CONNECTIVITY_TESTS_PAGE_STR_DESC, request, context); + return ListConnectivityTestsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listConnectivityTests. */ + public PagedCallSettings< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings() { + return listConnectivityTestsSettings; + } + + /** Returns the object with the settings used for calls to getConnectivityTest. */ + public UnaryCallSettings + getConnectivityTestSettings() { + return getConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to createConnectivityTest. */ + public UnaryCallSettings + createConnectivityTestSettings() { + return createConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to createConnectivityTest. */ + public OperationCallSettings + createConnectivityTestOperationSettings() { + return createConnectivityTestOperationSettings; + } + + /** Returns the object with the settings used for calls to updateConnectivityTest. */ + public UnaryCallSettings + updateConnectivityTestSettings() { + return updateConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to updateConnectivityTest. */ + public OperationCallSettings + updateConnectivityTestOperationSettings() { + return updateConnectivityTestOperationSettings; + } + + /** Returns the object with the settings used for calls to rerunConnectivityTest. */ + public UnaryCallSettings + rerunConnectivityTestSettings() { + return rerunConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to rerunConnectivityTest. */ + public OperationCallSettings + rerunConnectivityTestOperationSettings() { + return rerunConnectivityTestOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteConnectivityTest. */ + public UnaryCallSettings + deleteConnectivityTestSettings() { + return deleteConnectivityTestSettings; + } + + /** Returns the object with the settings used for calls to deleteConnectivityTest. */ + public OperationCallSettings + deleteConnectivityTestOperationSettings() { + return deleteConnectivityTestOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ReachabilityServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcReachabilityServiceStub.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 "networkmanagement.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "networkmanagement.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); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + 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 defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ReachabilityServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 ReachabilityServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listConnectivityTestsSettings = settingsBuilder.listConnectivityTestsSettings().build(); + getConnectivityTestSettings = settingsBuilder.getConnectivityTestSettings().build(); + createConnectivityTestSettings = settingsBuilder.createConnectivityTestSettings().build(); + createConnectivityTestOperationSettings = + settingsBuilder.createConnectivityTestOperationSettings().build(); + updateConnectivityTestSettings = settingsBuilder.updateConnectivityTestSettings().build(); + updateConnectivityTestOperationSettings = + settingsBuilder.updateConnectivityTestOperationSettings().build(); + rerunConnectivityTestSettings = settingsBuilder.rerunConnectivityTestSettings().build(); + rerunConnectivityTestOperationSettings = + settingsBuilder.rerunConnectivityTestOperationSettings().build(); + deleteConnectivityTestSettings = settingsBuilder.deleteConnectivityTestSettings().build(); + deleteConnectivityTestOperationSettings = + settingsBuilder.deleteConnectivityTestOperationSettings().build(); + } + + /** Builder for ReachabilityServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings; + private final UnaryCallSettings.Builder + getConnectivityTestSettings; + private final UnaryCallSettings.Builder + createConnectivityTestSettings; + private final OperationCallSettings.Builder< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationSettings; + private final UnaryCallSettings.Builder + updateConnectivityTestSettings; + private final OperationCallSettings.Builder< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationSettings; + private final UnaryCallSettings.Builder + rerunConnectivityTestSettings; + private final OperationCallSettings.Builder< + RerunConnectivityTestRequest, ConnectivityTest, OperationMetadata> + rerunConnectivityTestOperationSettings; + private final UnaryCallSettings.Builder + deleteConnectivityTestSettings; + private final OperationCallSettings.Builder< + DeleteConnectivityTestRequest, Empty, OperationMetadata> + deleteConnectivityTestOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + 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_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listConnectivityTestsSettings = + PagedCallSettings.newBuilder(LIST_CONNECTIVITY_TESTS_PAGE_STR_FACT); + getConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createConnectivityTestOperationSettings = OperationCallSettings.newBuilder(); + updateConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateConnectivityTestOperationSettings = OperationCallSettings.newBuilder(); + rerunConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + rerunConnectivityTestOperationSettings = OperationCallSettings.newBuilder(); + deleteConnectivityTestSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteConnectivityTestOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listConnectivityTestsSettings, + getConnectivityTestSettings, + createConnectivityTestSettings, + updateConnectivityTestSettings, + rerunConnectivityTestSettings, + deleteConnectivityTestSettings); + initDefaults(this); + } + + protected Builder(ReachabilityServiceStubSettings settings) { + super(settings); + + listConnectivityTestsSettings = settings.listConnectivityTestsSettings.toBuilder(); + getConnectivityTestSettings = settings.getConnectivityTestSettings.toBuilder(); + createConnectivityTestSettings = settings.createConnectivityTestSettings.toBuilder(); + createConnectivityTestOperationSettings = + settings.createConnectivityTestOperationSettings.toBuilder(); + updateConnectivityTestSettings = settings.updateConnectivityTestSettings.toBuilder(); + updateConnectivityTestOperationSettings = + settings.updateConnectivityTestOperationSettings.toBuilder(); + rerunConnectivityTestSettings = settings.rerunConnectivityTestSettings.toBuilder(); + rerunConnectivityTestOperationSettings = + settings.rerunConnectivityTestOperationSettings.toBuilder(); + deleteConnectivityTestSettings = settings.deleteConnectivityTestSettings.toBuilder(); + deleteConnectivityTestOperationSettings = + settings.deleteConnectivityTestOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listConnectivityTestsSettings, + getConnectivityTestSettings, + createConnectivityTestSettings, + updateConnectivityTestSettings, + rerunConnectivityTestSettings, + deleteConnectivityTestSettings); + } + + 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 initDefaults(Builder builder) { + builder + .listConnectivityTestsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .rerunConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteConnectivityTestSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createConnectivityTestOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ConnectivityTest.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 + .updateConnectivityTestOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ConnectivityTest.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 + .rerunConnectivityTestOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ConnectivityTest.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 + .deleteConnectivityTestOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_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; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * 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) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listConnectivityTests. */ + public PagedCallSettings.Builder< + ListConnectivityTestsRequest, + ListConnectivityTestsResponse, + ListConnectivityTestsPagedResponse> + listConnectivityTestsSettings() { + return listConnectivityTestsSettings; + } + + /** Returns the builder for the settings used for calls to getConnectivityTest. */ + public UnaryCallSettings.Builder + getConnectivityTestSettings() { + return getConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to createConnectivityTest. */ + public UnaryCallSettings.Builder + createConnectivityTestSettings() { + return createConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to createConnectivityTest. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + createConnectivityTestOperationSettings() { + return createConnectivityTestOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateConnectivityTest. */ + public UnaryCallSettings.Builder + updateConnectivityTestSettings() { + return updateConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to updateConnectivityTest. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateConnectivityTestRequest, ConnectivityTest, OperationMetadata> + updateConnectivityTestOperationSettings() { + return updateConnectivityTestOperationSettings; + } + + /** Returns the builder for the settings used for calls to rerunConnectivityTest. */ + public UnaryCallSettings.Builder + rerunConnectivityTestSettings() { + return rerunConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to rerunConnectivityTest. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RerunConnectivityTestRequest, ConnectivityTest, OperationMetadata> + rerunConnectivityTestOperationSettings() { + return rerunConnectivityTestOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteConnectivityTest. */ + public UnaryCallSettings.Builder + deleteConnectivityTestSettings() { + return deleteConnectivityTestSettings; + } + + /** Returns the builder for the settings used for calls to deleteConnectivityTest. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteConnectivityTestOperationSettings() { + return deleteConnectivityTestOperationSettings; + } + + @Override + public ReachabilityServiceStubSettings build() throws IOException { + return new ReachabilityServiceStubSettings(this); + } + } +} diff --git a/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/MockReachabilityService.java b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/MockReachabilityService.java new file mode 100644 index 00000000..f6cf86bb --- /dev/null +++ b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/MockReachabilityService.java @@ -0,0 +1,59 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.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 MockReachabilityService implements MockGrpcService { + private final MockReachabilityServiceImpl serviceImpl; + + public MockReachabilityService() { + serviceImpl = new MockReachabilityServiceImpl(); + } + + @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/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/MockReachabilityServiceImpl.java b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/MockReachabilityServiceImpl.java new file mode 100644 index 00000000..d08acf8f --- /dev/null +++ b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/MockReachabilityServiceImpl.java @@ -0,0 +1,188 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.networkmanagement.v1.ReachabilityServiceGrpc.ReachabilityServiceImplBase; +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 MockReachabilityServiceImpl extends ReachabilityServiceImplBase { + private List requests; + private Queue responses; + + public MockReachabilityServiceImpl() { + 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 listConnectivityTests( + ListConnectivityTestsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListConnectivityTestsResponse) { + requests.add(request); + responseObserver.onNext(((ListConnectivityTestsResponse) 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 ListConnectivityTests, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListConnectivityTestsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getConnectivityTest( + GetConnectivityTestRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ConnectivityTest) { + requests.add(request); + responseObserver.onNext(((ConnectivityTest) 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 GetConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ConnectivityTest.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createConnectivityTest( + CreateConnectivityTestRequest 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 CreateConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateConnectivityTest( + UpdateConnectivityTestRequest 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 UpdateConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void rerunConnectivityTest( + RerunConnectivityTestRequest 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 RerunConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteConnectivityTest( + DeleteConnectivityTestRequest 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 DeleteConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceClientTest.java b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceClientTest.java new file mode 100644 index 00000000..dc5b58be --- /dev/null +++ b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceClientTest.java @@ -0,0 +1,409 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1; + +import static com.google.cloud.networkmanagement.v1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +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.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 ReachabilityServiceClientTest { + private static MockReachabilityService mockReachabilityService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ReachabilityServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockReachabilityService = new MockReachabilityService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockReachabilityService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ReachabilityServiceSettings settings = + ReachabilityServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ReachabilityServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listConnectivityTestsTest() throws Exception { + ConnectivityTest responsesElement = ConnectivityTest.newBuilder().build(); + ListConnectivityTestsResponse expectedResponse = + ListConnectivityTestsResponse.newBuilder() + .setNextPageToken("") + .addAllResources(Arrays.asList(responsesElement)) + .build(); + mockReachabilityService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListConnectivityTestsPagedResponse pagedListResponse = client.listConnectivityTests(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourcesList().get(0), resources.get(0)); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConnectivityTestsRequest actualRequest = + ((ListConnectivityTestsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConnectivityTestsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listConnectivityTests(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConnectivityTestTest() throws Exception { + ConnectivityTest expectedResponse = + ConnectivityTest.newBuilder() + .setName(ConnectivityTestName.of("[PROJECT]", "[TEST]").toString()) + .setDescription("description-1724546052") + .setSource(Endpoint.newBuilder().build()) + .setDestination(Endpoint.newBuilder().build()) + .setProtocol("protocol-989163880") + .addAllRelatedProjects(new ArrayList()) + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReachabilityDetails(ReachabilityDetails.newBuilder().build()) + .build(); + mockReachabilityService.addResponse(expectedResponse); + + String name = "name3373707"; + + ConnectivityTest actualResponse = client.getConnectivityTest(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConnectivityTestRequest actualRequest = ((GetConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + String name = "name3373707"; + client.getConnectivityTest(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConnectivityTestTest() throws Exception { + ConnectivityTest expectedResponse = + ConnectivityTest.newBuilder() + .setName(ConnectivityTestName.of("[PROJECT]", "[TEST]").toString()) + .setDescription("description-1724546052") + .setSource(Endpoint.newBuilder().build()) + .setDestination(Endpoint.newBuilder().build()) + .setProtocol("protocol-989163880") + .addAllRelatedProjects(new ArrayList()) + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReachabilityDetails(ReachabilityDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createConnectivityTestTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockReachabilityService.addResponse(resultOperation); + + String parent = "parent-995424086"; + String testId = "testId-877170355"; + ConnectivityTest resource = ConnectivityTest.newBuilder().build(); + + ConnectivityTest actualResponse = + client.createConnectivityTestAsync(parent, testId, resource).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConnectivityTestRequest actualRequest = + ((CreateConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(testId, actualRequest.getTestId()); + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + String parent = "parent-995424086"; + String testId = "testId-877170355"; + ConnectivityTest resource = ConnectivityTest.newBuilder().build(); + client.createConnectivityTestAsync(parent, testId, resource).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 updateConnectivityTestTest() throws Exception { + ConnectivityTest expectedResponse = + ConnectivityTest.newBuilder() + .setName(ConnectivityTestName.of("[PROJECT]", "[TEST]").toString()) + .setDescription("description-1724546052") + .setSource(Endpoint.newBuilder().build()) + .setDestination(Endpoint.newBuilder().build()) + .setProtocol("protocol-989163880") + .addAllRelatedProjects(new ArrayList()) + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReachabilityDetails(ReachabilityDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateConnectivityTestTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockReachabilityService.addResponse(resultOperation); + + FieldMask updateMask = FieldMask.newBuilder().build(); + ConnectivityTest resource = ConnectivityTest.newBuilder().build(); + + ConnectivityTest actualResponse = + client.updateConnectivityTestAsync(updateMask, resource).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateConnectivityTestRequest actualRequest = + ((UpdateConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + FieldMask updateMask = FieldMask.newBuilder().build(); + ConnectivityTest resource = ConnectivityTest.newBuilder().build(); + client.updateConnectivityTestAsync(updateMask, resource).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 rerunConnectivityTestTest() throws Exception { + ConnectivityTest expectedResponse = + ConnectivityTest.newBuilder() + .setName(ConnectivityTestName.of("[PROJECT]", "[TEST]").toString()) + .setDescription("description-1724546052") + .setSource(Endpoint.newBuilder().build()) + .setDestination(Endpoint.newBuilder().build()) + .setProtocol("protocol-989163880") + .addAllRelatedProjects(new ArrayList()) + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReachabilityDetails(ReachabilityDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rerunConnectivityTestTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockReachabilityService.addResponse(resultOperation); + + RerunConnectivityTestRequest request = + RerunConnectivityTestRequest.newBuilder().setName("name3373707").build(); + + ConnectivityTest actualResponse = client.rerunConnectivityTestAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RerunConnectivityTestRequest actualRequest = + ((RerunConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rerunConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + RerunConnectivityTestRequest request = + RerunConnectivityTestRequest.newBuilder().setName("name3373707").build(); + client.rerunConnectivityTestAsync(request).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 deleteConnectivityTestTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteConnectivityTestTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockReachabilityService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteConnectivityTestAsync(name).get(); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConnectivityTestRequest actualRequest = + ((DeleteConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + String name = "name3373707"; + client.deleteConnectivityTestAsync(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()); + } + } +} diff --git a/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/MockReachabilityService.java b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/MockReachabilityService.java new file mode 100644 index 00000000..0a2314f2 --- /dev/null +++ b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/MockReachabilityService.java @@ -0,0 +1,59 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1; + +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 MockReachabilityService implements MockGrpcService { + private final MockReachabilityServiceImpl serviceImpl; + + public MockReachabilityService() { + serviceImpl = new MockReachabilityServiceImpl(); + } + + @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/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/MockReachabilityServiceImpl.java b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/MockReachabilityServiceImpl.java new file mode 100644 index 00000000..bfcfa0f1 --- /dev/null +++ b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/MockReachabilityServiceImpl.java @@ -0,0 +1,188 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceGrpc.ReachabilityServiceImplBase; +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 MockReachabilityServiceImpl extends ReachabilityServiceImplBase { + private List requests; + private Queue responses; + + public MockReachabilityServiceImpl() { + 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 listConnectivityTests( + ListConnectivityTestsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListConnectivityTestsResponse) { + requests.add(request); + responseObserver.onNext(((ListConnectivityTestsResponse) 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 ListConnectivityTests, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListConnectivityTestsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getConnectivityTest( + GetConnectivityTestRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ConnectivityTest) { + requests.add(request); + responseObserver.onNext(((ConnectivityTest) 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 GetConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ConnectivityTest.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createConnectivityTest( + CreateConnectivityTestRequest 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 CreateConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateConnectivityTest( + UpdateConnectivityTestRequest 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 UpdateConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void rerunConnectivityTest( + RerunConnectivityTestRequest 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 RerunConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteConnectivityTest( + DeleteConnectivityTestRequest 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 DeleteConnectivityTest, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceClientTest.java b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceClientTest.java new file mode 100644 index 00000000..18ded698 --- /dev/null +++ b/google-cloud-network-management/src/test/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceClientTest.java @@ -0,0 +1,445 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1; + +import static com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient.ListConnectivityTestsPagedResponse; + +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.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 ReachabilityServiceClientTest { + private static MockReachabilityService mockReachabilityService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ReachabilityServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockReachabilityService = new MockReachabilityService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockReachabilityService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ReachabilityServiceSettings settings = + ReachabilityServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ReachabilityServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listConnectivityTestsTest() throws Exception { + ConnectivityTest responsesElement = ConnectivityTest.newBuilder().build(); + ListConnectivityTestsResponse expectedResponse = + ListConnectivityTestsResponse.newBuilder() + .setNextPageToken("") + .addAllResources(Arrays.asList(responsesElement)) + .build(); + mockReachabilityService.addResponse(expectedResponse); + + ListConnectivityTestsRequest request = + ListConnectivityTestsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + + ListConnectivityTestsPagedResponse pagedListResponse = client.listConnectivityTests(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourcesList().get(0), resources.get(0)); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConnectivityTestsRequest actualRequest = + ((ListConnectivityTestsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConnectivityTestsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + ListConnectivityTestsRequest request = + ListConnectivityTestsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + client.listConnectivityTests(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConnectivityTestTest() throws Exception { + ConnectivityTest expectedResponse = + ConnectivityTest.newBuilder() + .setName(ConnectivityTestName.of("[PROJECT]", "[TEST]").toString()) + .setDescription("description-1724546052") + .setSource(Endpoint.newBuilder().build()) + .setDestination(Endpoint.newBuilder().build()) + .setProtocol("protocol-989163880") + .addAllRelatedProjects(new ArrayList()) + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReachabilityDetails(ReachabilityDetails.newBuilder().build()) + .setProbingDetails(ProbingDetails.newBuilder().build()) + .build(); + mockReachabilityService.addResponse(expectedResponse); + + GetConnectivityTestRequest request = + GetConnectivityTestRequest.newBuilder().setName("name3373707").build(); + + ConnectivityTest actualResponse = client.getConnectivityTest(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConnectivityTestRequest actualRequest = ((GetConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + GetConnectivityTestRequest request = + GetConnectivityTestRequest.newBuilder().setName("name3373707").build(); + client.getConnectivityTest(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConnectivityTestTest() throws Exception { + ConnectivityTest expectedResponse = + ConnectivityTest.newBuilder() + .setName(ConnectivityTestName.of("[PROJECT]", "[TEST]").toString()) + .setDescription("description-1724546052") + .setSource(Endpoint.newBuilder().build()) + .setDestination(Endpoint.newBuilder().build()) + .setProtocol("protocol-989163880") + .addAllRelatedProjects(new ArrayList()) + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReachabilityDetails(ReachabilityDetails.newBuilder().build()) + .setProbingDetails(ProbingDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createConnectivityTestTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockReachabilityService.addResponse(resultOperation); + + CreateConnectivityTestRequest request = + CreateConnectivityTestRequest.newBuilder() + .setParent("parent-995424086") + .setTestId("testId-877170355") + .setResource(ConnectivityTest.newBuilder().build()) + .build(); + + ConnectivityTest actualResponse = client.createConnectivityTestAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConnectivityTestRequest actualRequest = + ((CreateConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getTestId(), actualRequest.getTestId()); + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + CreateConnectivityTestRequest request = + CreateConnectivityTestRequest.newBuilder() + .setParent("parent-995424086") + .setTestId("testId-877170355") + .setResource(ConnectivityTest.newBuilder().build()) + .build(); + client.createConnectivityTestAsync(request).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 updateConnectivityTestTest() throws Exception { + ConnectivityTest expectedResponse = + ConnectivityTest.newBuilder() + .setName(ConnectivityTestName.of("[PROJECT]", "[TEST]").toString()) + .setDescription("description-1724546052") + .setSource(Endpoint.newBuilder().build()) + .setDestination(Endpoint.newBuilder().build()) + .setProtocol("protocol-989163880") + .addAllRelatedProjects(new ArrayList()) + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReachabilityDetails(ReachabilityDetails.newBuilder().build()) + .setProbingDetails(ProbingDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateConnectivityTestTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockReachabilityService.addResponse(resultOperation); + + UpdateConnectivityTestRequest request = + UpdateConnectivityTestRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setResource(ConnectivityTest.newBuilder().build()) + .build(); + + ConnectivityTest actualResponse = client.updateConnectivityTestAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateConnectivityTestRequest actualRequest = + ((UpdateConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + UpdateConnectivityTestRequest request = + UpdateConnectivityTestRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setResource(ConnectivityTest.newBuilder().build()) + .build(); + client.updateConnectivityTestAsync(request).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 rerunConnectivityTestTest() throws Exception { + ConnectivityTest expectedResponse = + ConnectivityTest.newBuilder() + .setName(ConnectivityTestName.of("[PROJECT]", "[TEST]").toString()) + .setDescription("description-1724546052") + .setSource(Endpoint.newBuilder().build()) + .setDestination(Endpoint.newBuilder().build()) + .setProtocol("protocol-989163880") + .addAllRelatedProjects(new ArrayList()) + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReachabilityDetails(ReachabilityDetails.newBuilder().build()) + .setProbingDetails(ProbingDetails.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rerunConnectivityTestTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockReachabilityService.addResponse(resultOperation); + + RerunConnectivityTestRequest request = + RerunConnectivityTestRequest.newBuilder().setName("name3373707").build(); + + ConnectivityTest actualResponse = client.rerunConnectivityTestAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RerunConnectivityTestRequest actualRequest = + ((RerunConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rerunConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + RerunConnectivityTestRequest request = + RerunConnectivityTestRequest.newBuilder().setName("name3373707").build(); + client.rerunConnectivityTestAsync(request).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 deleteConnectivityTestTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteConnectivityTestTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockReachabilityService.addResponse(resultOperation); + + DeleteConnectivityTestRequest request = + DeleteConnectivityTestRequest.newBuilder().setName("name3373707").build(); + + client.deleteConnectivityTestAsync(request).get(); + + List actualRequests = mockReachabilityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConnectivityTestRequest actualRequest = + ((DeleteConnectivityTestRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConnectivityTestExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReachabilityService.addException(exception); + + try { + DeleteConnectivityTestRequest request = + DeleteConnectivityTestRequest.newBuilder().setName("name3373707").build(); + client.deleteConnectivityTestAsync(request).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()); + } + } +} diff --git a/grpc-google-cloud-network-management-v1/pom.xml b/grpc-google-cloud-network-management-v1/pom.xml new file mode 100644 index 00000000..4f32a0d8 --- /dev/null +++ b/grpc-google-cloud-network-management-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-network-management-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-network-management-v1 + GRPC library for google-cloud-network-management + + com.google.cloud + google-cloud-network-management-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-network-management-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceGrpc.java b/grpc-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceGrpc.java new file mode 100644 index 00000000..7660f16b --- /dev/null +++ b/grpc-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceGrpc.java @@ -0,0 +1,1129 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.networkmanagement.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The Reachability service in the Google Cloud Network Management API provides
+ * services that analyze the reachability within a single Google Virtual Private
+ * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+ * networks, or between VPC networks and internet hosts. A reachability analysis
+ * is based on Google Cloud network configurations.
+ * You can use the analysis results to verify these configurations and
+ * to troubleshoot connectivity issues.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/networkmanagement/v1/reachability.proto") +public final class ReachabilityServiceGrpc { + + private ReachabilityServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.networkmanagement.v1.ReachabilityService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse> + getListConnectivityTestsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListConnectivityTests", + requestType = com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.class, + responseType = com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse> + getListConnectivityTestsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse> + getListConnectivityTestsMethod; + if ((getListConnectivityTestsMethod = ReachabilityServiceGrpc.getListConnectivityTestsMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getListConnectivityTestsMethod = + ReachabilityServiceGrpc.getListConnectivityTestsMethod) + == null) { + ReachabilityServiceGrpc.getListConnectivityTestsMethod = + getListConnectivityTestsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListConnectivityTests")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("ListConnectivityTests")) + .build(); + } + } + } + return getListConnectivityTestsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest, + com.google.cloud.networkmanagement.v1.ConnectivityTest> + getGetConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest.class, + responseType = com.google.cloud.networkmanagement.v1.ConnectivityTest.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest, + com.google.cloud.networkmanagement.v1.ConnectivityTest> + getGetConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest, + com.google.cloud.networkmanagement.v1.ConnectivityTest> + getGetConnectivityTestMethod; + if ((getGetConnectivityTestMethod = ReachabilityServiceGrpc.getGetConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getGetConnectivityTestMethod = ReachabilityServiceGrpc.getGetConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getGetConnectivityTestMethod = + getGetConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1.ConnectivityTest + .getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("GetConnectivityTest")) + .build(); + } + } + } + return getGetConnectivityTestMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, + com.google.longrunning.Operation> + getCreateConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, + com.google.longrunning.Operation> + getCreateConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, + com.google.longrunning.Operation> + getCreateConnectivityTestMethod; + if ((getCreateConnectivityTestMethod = ReachabilityServiceGrpc.getCreateConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getCreateConnectivityTestMethod = + ReachabilityServiceGrpc.getCreateConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getCreateConnectivityTestMethod = + getCreateConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("CreateConnectivityTest")) + .build(); + } + } + } + return getCreateConnectivityTestMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, + com.google.longrunning.Operation> + getUpdateConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, + com.google.longrunning.Operation> + getUpdateConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, + com.google.longrunning.Operation> + getUpdateConnectivityTestMethod; + if ((getUpdateConnectivityTestMethod = ReachabilityServiceGrpc.getUpdateConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getUpdateConnectivityTestMethod = + ReachabilityServiceGrpc.getUpdateConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getUpdateConnectivityTestMethod = + getUpdateConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("UpdateConnectivityTest")) + .build(); + } + } + } + return getUpdateConnectivityTestMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, + com.google.longrunning.Operation> + getRerunConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RerunConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, + com.google.longrunning.Operation> + getRerunConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, + com.google.longrunning.Operation> + getRerunConnectivityTestMethod; + if ((getRerunConnectivityTestMethod = ReachabilityServiceGrpc.getRerunConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getRerunConnectivityTestMethod = + ReachabilityServiceGrpc.getRerunConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getRerunConnectivityTestMethod = + getRerunConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RerunConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("RerunConnectivityTest")) + .build(); + } + } + } + return getRerunConnectivityTestMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, + com.google.longrunning.Operation> + getDeleteConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, + com.google.longrunning.Operation> + getDeleteConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, + com.google.longrunning.Operation> + getDeleteConnectivityTestMethod; + if ((getDeleteConnectivityTestMethod = ReachabilityServiceGrpc.getDeleteConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getDeleteConnectivityTestMethod = + ReachabilityServiceGrpc.getDeleteConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getDeleteConnectivityTestMethod = + getDeleteConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("DeleteConnectivityTest")) + .build(); + } + } + } + return getDeleteConnectivityTestMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ReachabilityServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ReachabilityServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceStub(channel, callOptions); + } + }; + return ReachabilityServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ReachabilityServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ReachabilityServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceBlockingStub(channel, callOptions); + } + }; + return ReachabilityServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ReachabilityServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ReachabilityServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceFutureStub(channel, callOptions); + } + }; + return ReachabilityServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The Reachability service in the Google Cloud Network Management API provides
+   * services that analyze the reachability within a single Google Virtual Private
+   * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+   * networks, or between VPC networks and internet hosts. A reachability analysis
+   * is based on Google Cloud network configurations.
+   * You can use the analysis results to verify these configurations and
+   * to troubleshoot connectivity issues.
+   * 
+ */ + public abstract static class ReachabilityServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists all Connectivity Tests owned by a project.
+     * 
+ */ + public void listConnectivityTests( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListConnectivityTestsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a specific Connectivity Test.
+     * 
+ */ + public void getConnectivityTest( + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetConnectivityTestMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Connectivity Test.
+     * After you create a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, containing non-existent resources in the network, or you
+     * don't have read permissions to the network configurations of listed
+     * projects), then the reachability result returns a value of `UNKNOWN`.
+     * If the endpoint specifications in `ConnectivityTest` are
+     * incomplete, the reachability result returns a value of
+     * <code>AMBIGUOUS</code>. For more information,
+     * see the Connectivity Test documentation.
+     * 
+ */ + public void createConnectivityTest( + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateConnectivityTestMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the configuration of an existing `ConnectivityTest`.
+     * After you update a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * The Reachability state in the test resource is updated with the new result.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, they contain non-existent resources in the network, or the
+     * user does not have read permissions to the network configurations of
+     * listed projects), then the reachability result returns a value of
+     * <code>UNKNOWN</code>.
+     * If the endpoint specifications in `ConnectivityTest` are incomplete, the
+     * reachability result returns a value of `AMBIGUOUS`. See the documentation
+     * in `ConnectivityTest` for for more details.
+     * 
+ */ + public void updateConnectivityTest( + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateConnectivityTestMethod(), responseObserver); + } + + /** + * + * + *
+     * Rerun an existing `ConnectivityTest`.
+     * After the user triggers the rerun, the reachability analysis is performed
+     * as part of the long running operation, which completes when the analysis
+     * completes.
+     * Even though the test configuration remains the same, the reachability
+     * result may change due to underlying network configuration changes.
+     * If the endpoint specifications in `ConnectivityTest` become invalid (for
+     * example, specified resources are deleted in the network, or you lost
+     * read permissions to the network configurations of listed projects), then
+     * the reachability result returns a value of `UNKNOWN`.
+     * 
+ */ + public void rerunConnectivityTest( + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRerunConnectivityTestMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specific `ConnectivityTest`.
+     * 
+ */ + public void deleteConnectivityTest( + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteConnectivityTestMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListConnectivityTestsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse>( + this, METHODID_LIST_CONNECTIVITY_TESTS))) + .addMethod( + getGetConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest, + com.google.cloud.networkmanagement.v1.ConnectivityTest>( + this, METHODID_GET_CONNECTIVITY_TEST))) + .addMethod( + getCreateConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_CONNECTIVITY_TEST))) + .addMethod( + getUpdateConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_CONNECTIVITY_TEST))) + .addMethod( + getRerunConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, + com.google.longrunning.Operation>(this, METHODID_RERUN_CONNECTIVITY_TEST))) + .addMethod( + getDeleteConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_CONNECTIVITY_TEST))) + .build(); + } + } + + /** + * + * + *
+   * The Reachability service in the Google Cloud Network Management API provides
+   * services that analyze the reachability within a single Google Virtual Private
+   * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+   * networks, or between VPC networks and internet hosts. A reachability analysis
+   * is based on Google Cloud network configurations.
+   * You can use the analysis results to verify these configurations and
+   * to troubleshoot connectivity issues.
+   * 
+ */ + public static final class ReachabilityServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ReachabilityServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ReachabilityServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Connectivity Tests owned by a project.
+     * 
+ */ + public void listConnectivityTests( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListConnectivityTestsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a specific Connectivity Test.
+     * 
+ */ + public void getConnectivityTest( + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Connectivity Test.
+     * After you create a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, containing non-existent resources in the network, or you
+     * don't have read permissions to the network configurations of listed
+     * projects), then the reachability result returns a value of `UNKNOWN`.
+     * If the endpoint specifications in `ConnectivityTest` are
+     * incomplete, the reachability result returns a value of
+     * <code>AMBIGUOUS</code>. For more information,
+     * see the Connectivity Test documentation.
+     * 
+ */ + public void createConnectivityTest( + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the configuration of an existing `ConnectivityTest`.
+     * After you update a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * The Reachability state in the test resource is updated with the new result.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, they contain non-existent resources in the network, or the
+     * user does not have read permissions to the network configurations of
+     * listed projects), then the reachability result returns a value of
+     * <code>UNKNOWN</code>.
+     * If the endpoint specifications in `ConnectivityTest` are incomplete, the
+     * reachability result returns a value of `AMBIGUOUS`. See the documentation
+     * in `ConnectivityTest` for for more details.
+     * 
+ */ + public void updateConnectivityTest( + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Rerun an existing `ConnectivityTest`.
+     * After the user triggers the rerun, the reachability analysis is performed
+     * as part of the long running operation, which completes when the analysis
+     * completes.
+     * Even though the test configuration remains the same, the reachability
+     * result may change due to underlying network configuration changes.
+     * If the endpoint specifications in `ConnectivityTest` become invalid (for
+     * example, specified resources are deleted in the network, or you lost
+     * read permissions to the network configurations of listed projects), then
+     * the reachability result returns a value of `UNKNOWN`.
+     * 
+ */ + public void rerunConnectivityTest( + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRerunConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specific `ConnectivityTest`.
+     * 
+ */ + public void deleteConnectivityTest( + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * The Reachability service in the Google Cloud Network Management API provides
+   * services that analyze the reachability within a single Google Virtual Private
+   * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+   * networks, or between VPC networks and internet hosts. A reachability analysis
+   * is based on Google Cloud network configurations.
+   * You can use the analysis results to verify these configurations and
+   * to troubleshoot connectivity issues.
+   * 
+ */ + public static final class ReachabilityServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ReachabilityServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ReachabilityServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Connectivity Tests owned by a project.
+     * 
+ */ + public com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + listConnectivityTests( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListConnectivityTestsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a specific Connectivity Test.
+     * 
+ */ + public com.google.cloud.networkmanagement.v1.ConnectivityTest getConnectivityTest( + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConnectivityTestMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Connectivity Test.
+     * After you create a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, containing non-existent resources in the network, or you
+     * don't have read permissions to the network configurations of listed
+     * projects), then the reachability result returns a value of `UNKNOWN`.
+     * If the endpoint specifications in `ConnectivityTest` are
+     * incomplete, the reachability result returns a value of
+     * <code>AMBIGUOUS</code>. For more information,
+     * see the Connectivity Test documentation.
+     * 
+ */ + public com.google.longrunning.Operation createConnectivityTest( + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateConnectivityTestMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the configuration of an existing `ConnectivityTest`.
+     * After you update a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * The Reachability state in the test resource is updated with the new result.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, they contain non-existent resources in the network, or the
+     * user does not have read permissions to the network configurations of
+     * listed projects), then the reachability result returns a value of
+     * <code>UNKNOWN</code>.
+     * If the endpoint specifications in `ConnectivityTest` are incomplete, the
+     * reachability result returns a value of `AMBIGUOUS`. See the documentation
+     * in `ConnectivityTest` for for more details.
+     * 
+ */ + public com.google.longrunning.Operation updateConnectivityTest( + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateConnectivityTestMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Rerun an existing `ConnectivityTest`.
+     * After the user triggers the rerun, the reachability analysis is performed
+     * as part of the long running operation, which completes when the analysis
+     * completes.
+     * Even though the test configuration remains the same, the reachability
+     * result may change due to underlying network configuration changes.
+     * If the endpoint specifications in `ConnectivityTest` become invalid (for
+     * example, specified resources are deleted in the network, or you lost
+     * read permissions to the network configurations of listed projects), then
+     * the reachability result returns a value of `UNKNOWN`.
+     * 
+ */ + public com.google.longrunning.Operation rerunConnectivityTest( + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRerunConnectivityTestMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specific `ConnectivityTest`.
+     * 
+ */ + public com.google.longrunning.Operation deleteConnectivityTest( + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteConnectivityTestMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * The Reachability service in the Google Cloud Network Management API provides
+   * services that analyze the reachability within a single Google Virtual Private
+   * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+   * networks, or between VPC networks and internet hosts. A reachability analysis
+   * is based on Google Cloud network configurations.
+   * You can use the analysis results to verify these configurations and
+   * to troubleshoot connectivity issues.
+   * 
+ */ + public static final class ReachabilityServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ReachabilityServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ReachabilityServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Connectivity Tests owned by a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse> + listConnectivityTests( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListConnectivityTestsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a specific Connectivity Test.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkmanagement.v1.ConnectivityTest> + getConnectivityTest( + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetConnectivityTestMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Connectivity Test.
+     * After you create a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, containing non-existent resources in the network, or you
+     * don't have read permissions to the network configurations of listed
+     * projects), then the reachability result returns a value of `UNKNOWN`.
+     * If the endpoint specifications in `ConnectivityTest` are
+     * incomplete, the reachability result returns a value of
+     * <code>AMBIGUOUS</code>. For more information,
+     * see the Connectivity Test documentation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createConnectivityTest( + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateConnectivityTestMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the configuration of an existing `ConnectivityTest`.
+     * After you update a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * The Reachability state in the test resource is updated with the new result.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, they contain non-existent resources in the network, or the
+     * user does not have read permissions to the network configurations of
+     * listed projects), then the reachability result returns a value of
+     * <code>UNKNOWN</code>.
+     * If the endpoint specifications in `ConnectivityTest` are incomplete, the
+     * reachability result returns a value of `AMBIGUOUS`. See the documentation
+     * in `ConnectivityTest` for for more details.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateConnectivityTest( + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateConnectivityTestMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Rerun an existing `ConnectivityTest`.
+     * After the user triggers the rerun, the reachability analysis is performed
+     * as part of the long running operation, which completes when the analysis
+     * completes.
+     * Even though the test configuration remains the same, the reachability
+     * result may change due to underlying network configuration changes.
+     * If the endpoint specifications in `ConnectivityTest` become invalid (for
+     * example, specified resources are deleted in the network, or you lost
+     * read permissions to the network configurations of listed projects), then
+     * the reachability result returns a value of `UNKNOWN`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + rerunConnectivityTest( + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRerunConnectivityTestMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specific `ConnectivityTest`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteConnectivityTest( + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteConnectivityTestMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_CONNECTIVITY_TESTS = 0; + private static final int METHODID_GET_CONNECTIVITY_TEST = 1; + private static final int METHODID_CREATE_CONNECTIVITY_TEST = 2; + private static final int METHODID_UPDATE_CONNECTIVITY_TEST = 3; + private static final int METHODID_RERUN_CONNECTIVITY_TEST = 4; + private static final int METHODID_DELETE_CONNECTIVITY_TEST = 5; + + 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 ReachabilityServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ReachabilityServiceImplBase 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_LIST_CONNECTIVITY_TESTS: + serviceImpl.listConnectivityTests( + (com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse>) + responseObserver); + break; + case METHODID_GET_CONNECTIVITY_TEST: + serviceImpl.getConnectivityTest( + (com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_CONNECTIVITY_TEST: + serviceImpl.createConnectivityTest( + (com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CONNECTIVITY_TEST: + serviceImpl.updateConnectivityTest( + (com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RERUN_CONNECTIVITY_TEST: + serviceImpl.rerunConnectivityTest( + (com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CONNECTIVITY_TEST: + serviceImpl.deleteConnectivityTest( + (com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) 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(); + } + } + } + + private abstract static class ReachabilityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ReachabilityServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ReachabilityService"); + } + } + + private static final class ReachabilityServiceFileDescriptorSupplier + extends ReachabilityServiceBaseDescriptorSupplier { + ReachabilityServiceFileDescriptorSupplier() {} + } + + private static final class ReachabilityServiceMethodDescriptorSupplier + extends ReachabilityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ReachabilityServiceMethodDescriptorSupplier(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 (ReachabilityServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ReachabilityServiceFileDescriptorSupplier()) + .addMethod(getListConnectivityTestsMethod()) + .addMethod(getGetConnectivityTestMethod()) + .addMethod(getCreateConnectivityTestMethod()) + .addMethod(getUpdateConnectivityTestMethod()) + .addMethod(getRerunConnectivityTestMethod()) + .addMethod(getDeleteConnectivityTestMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-network-management-v1beta1/pom.xml b/grpc-google-cloud-network-management-v1beta1/pom.xml new file mode 100644 index 00000000..6a747129 --- /dev/null +++ b/grpc-google-cloud-network-management-v1beta1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-network-management-v1beta1 + 0.0.1-SNAPSHOT + grpc-google-cloud-network-management-v1beta1 + GRPC library for google-cloud-network-management + + com.google.cloud + google-cloud-network-management-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-network-management-v1beta1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceGrpc.java b/grpc-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceGrpc.java new file mode 100644 index 00000000..742f9efa --- /dev/null +++ b/grpc-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceGrpc.java @@ -0,0 +1,1131 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.networkmanagement.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The Reachability service in the Google Cloud Network Management API provides
+ * services that analyze the reachability within a single Google Virtual Private
+ * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+ * networks, or between VPC networks and internet hosts. A reachability analysis
+ * is based on Google Cloud network configurations.
+ * You can use the analysis results to verify these configurations and
+ * to troubleshoot connectivity issues.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/networkmanagement/v1beta1/reachability.proto") +public final class ReachabilityServiceGrpc { + + private ReachabilityServiceGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.networkmanagement.v1beta1.ReachabilityService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse> + getListConnectivityTestsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListConnectivityTests", + requestType = com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.class, + responseType = com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse> + getListConnectivityTestsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse> + getListConnectivityTestsMethod; + if ((getListConnectivityTestsMethod = ReachabilityServiceGrpc.getListConnectivityTestsMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getListConnectivityTestsMethod = + ReachabilityServiceGrpc.getListConnectivityTestsMethod) + == null) { + ReachabilityServiceGrpc.getListConnectivityTestsMethod = + getListConnectivityTestsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListConnectivityTests")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1beta1 + .ListConnectivityTestsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1beta1 + .ListConnectivityTestsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("ListConnectivityTests")) + .build(); + } + } + } + return getListConnectivityTestsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest> + getGetConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.class, + responseType = com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest> + getGetConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest> + getGetConnectivityTestMethod; + if ((getGetConnectivityTestMethod = ReachabilityServiceGrpc.getGetConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getGetConnectivityTestMethod = ReachabilityServiceGrpc.getGetConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getGetConnectivityTestMethod = + getGetConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest + .getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("GetConnectivityTest")) + .build(); + } + } + } + return getGetConnectivityTestMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, + com.google.longrunning.Operation> + getCreateConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, + com.google.longrunning.Operation> + getCreateConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, + com.google.longrunning.Operation> + getCreateConnectivityTestMethod; + if ((getCreateConnectivityTestMethod = ReachabilityServiceGrpc.getCreateConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getCreateConnectivityTestMethod = + ReachabilityServiceGrpc.getCreateConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getCreateConnectivityTestMethod = + getCreateConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1beta1 + .CreateConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("CreateConnectivityTest")) + .build(); + } + } + } + return getCreateConnectivityTestMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, + com.google.longrunning.Operation> + getUpdateConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, + com.google.longrunning.Operation> + getUpdateConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, + com.google.longrunning.Operation> + getUpdateConnectivityTestMethod; + if ((getUpdateConnectivityTestMethod = ReachabilityServiceGrpc.getUpdateConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getUpdateConnectivityTestMethod = + ReachabilityServiceGrpc.getUpdateConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getUpdateConnectivityTestMethod = + getUpdateConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1beta1 + .UpdateConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("UpdateConnectivityTest")) + .build(); + } + } + } + return getUpdateConnectivityTestMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, + com.google.longrunning.Operation> + getRerunConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RerunConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, + com.google.longrunning.Operation> + getRerunConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, + com.google.longrunning.Operation> + getRerunConnectivityTestMethod; + if ((getRerunConnectivityTestMethod = ReachabilityServiceGrpc.getRerunConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getRerunConnectivityTestMethod = + ReachabilityServiceGrpc.getRerunConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getRerunConnectivityTestMethod = + getRerunConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RerunConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1beta1 + .RerunConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("RerunConnectivityTest")) + .build(); + } + } + } + return getRerunConnectivityTestMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, + com.google.longrunning.Operation> + getDeleteConnectivityTestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteConnectivityTest", + requestType = com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, + com.google.longrunning.Operation> + getDeleteConnectivityTestMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, + com.google.longrunning.Operation> + getDeleteConnectivityTestMethod; + if ((getDeleteConnectivityTestMethod = ReachabilityServiceGrpc.getDeleteConnectivityTestMethod) + == null) { + synchronized (ReachabilityServiceGrpc.class) { + if ((getDeleteConnectivityTestMethod = + ReachabilityServiceGrpc.getDeleteConnectivityTestMethod) + == null) { + ReachabilityServiceGrpc.getDeleteConnectivityTestMethod = + getDeleteConnectivityTestMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteConnectivityTest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkmanagement.v1beta1 + .DeleteConnectivityTestRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ReachabilityServiceMethodDescriptorSupplier("DeleteConnectivityTest")) + .build(); + } + } + } + return getDeleteConnectivityTestMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ReachabilityServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ReachabilityServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceStub(channel, callOptions); + } + }; + return ReachabilityServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ReachabilityServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ReachabilityServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceBlockingStub(channel, callOptions); + } + }; + return ReachabilityServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ReachabilityServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ReachabilityServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceFutureStub(channel, callOptions); + } + }; + return ReachabilityServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The Reachability service in the Google Cloud Network Management API provides
+   * services that analyze the reachability within a single Google Virtual Private
+   * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+   * networks, or between VPC networks and internet hosts. A reachability analysis
+   * is based on Google Cloud network configurations.
+   * You can use the analysis results to verify these configurations and
+   * to troubleshoot connectivity issues.
+   * 
+ */ + public abstract static class ReachabilityServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists all Connectivity Tests owned by a project.
+     * 
+ */ + public void listConnectivityTests( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListConnectivityTestsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a specific Connectivity Test.
+     * 
+ */ + public void getConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetConnectivityTestMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Connectivity Test.
+     * After you create a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, containing non-existent resources in the network, or you
+     * don't have read permissions to the network configurations of listed
+     * projects), then the reachability result returns a value of `UNKNOWN`.
+     * If the endpoint specifications in `ConnectivityTest` are
+     * incomplete, the reachability result returns a value of
+     * <code>AMBIGUOUS</code>. For more information,
+     * see the Connectivity Test documentation.
+     * 
+ */ + public void createConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateConnectivityTestMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the configuration of an existing `ConnectivityTest`.
+     * After you update a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * The Reachability state in the test resource is updated with the new result.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, they contain non-existent resources in the network, or the
+     * user does not have read permissions to the network configurations of
+     * listed projects), then the reachability result returns a value of
+     * <code>UNKNOWN</code>.
+     * If the endpoint specifications in `ConnectivityTest` are incomplete, the
+     * reachability result returns a value of `AMBIGUOUS`. See the documentation
+     * in `ConnectivityTest` for for more details.
+     * 
+ */ + public void updateConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateConnectivityTestMethod(), responseObserver); + } + + /** + * + * + *
+     * Rerun an existing `ConnectivityTest`.
+     * After the user triggers the rerun, the reachability analysis is performed
+     * as part of the long running operation, which completes when the analysis
+     * completes.
+     * Even though the test configuration remains the same, the reachability
+     * result may change due to underlying network configuration changes.
+     * If the endpoint specifications in `ConnectivityTest` become invalid (for
+     * example, specified resources are deleted in the network, or you lost
+     * read permissions to the network configurations of listed projects), then
+     * the reachability result returns a value of `UNKNOWN`.
+     * 
+ */ + public void rerunConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRerunConnectivityTestMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specific `ConnectivityTest`.
+     * 
+ */ + public void deleteConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteConnectivityTestMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListConnectivityTestsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse>( + this, METHODID_LIST_CONNECTIVITY_TESTS))) + .addMethod( + getGetConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest>( + this, METHODID_GET_CONNECTIVITY_TEST))) + .addMethod( + getCreateConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_CONNECTIVITY_TEST))) + .addMethod( + getUpdateConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_CONNECTIVITY_TEST))) + .addMethod( + getRerunConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, + com.google.longrunning.Operation>(this, METHODID_RERUN_CONNECTIVITY_TEST))) + .addMethod( + getDeleteConnectivityTestMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_CONNECTIVITY_TEST))) + .build(); + } + } + + /** + * + * + *
+   * The Reachability service in the Google Cloud Network Management API provides
+   * services that analyze the reachability within a single Google Virtual Private
+   * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+   * networks, or between VPC networks and internet hosts. A reachability analysis
+   * is based on Google Cloud network configurations.
+   * You can use the analysis results to verify these configurations and
+   * to troubleshoot connectivity issues.
+   * 
+ */ + public static final class ReachabilityServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ReachabilityServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ReachabilityServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Connectivity Tests owned by a project.
+     * 
+ */ + public void listConnectivityTests( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListConnectivityTestsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a specific Connectivity Test.
+     * 
+ */ + public void getConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Connectivity Test.
+     * After you create a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, containing non-existent resources in the network, or you
+     * don't have read permissions to the network configurations of listed
+     * projects), then the reachability result returns a value of `UNKNOWN`.
+     * If the endpoint specifications in `ConnectivityTest` are
+     * incomplete, the reachability result returns a value of
+     * <code>AMBIGUOUS</code>. For more information,
+     * see the Connectivity Test documentation.
+     * 
+ */ + public void createConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the configuration of an existing `ConnectivityTest`.
+     * After you update a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * The Reachability state in the test resource is updated with the new result.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, they contain non-existent resources in the network, or the
+     * user does not have read permissions to the network configurations of
+     * listed projects), then the reachability result returns a value of
+     * <code>UNKNOWN</code>.
+     * If the endpoint specifications in `ConnectivityTest` are incomplete, the
+     * reachability result returns a value of `AMBIGUOUS`. See the documentation
+     * in `ConnectivityTest` for for more details.
+     * 
+ */ + public void updateConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Rerun an existing `ConnectivityTest`.
+     * After the user triggers the rerun, the reachability analysis is performed
+     * as part of the long running operation, which completes when the analysis
+     * completes.
+     * Even though the test configuration remains the same, the reachability
+     * result may change due to underlying network configuration changes.
+     * If the endpoint specifications in `ConnectivityTest` become invalid (for
+     * example, specified resources are deleted in the network, or you lost
+     * read permissions to the network configurations of listed projects), then
+     * the reachability result returns a value of `UNKNOWN`.
+     * 
+ */ + public void rerunConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRerunConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specific `ConnectivityTest`.
+     * 
+ */ + public void deleteConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteConnectivityTestMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * The Reachability service in the Google Cloud Network Management API provides
+   * services that analyze the reachability within a single Google Virtual Private
+   * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+   * networks, or between VPC networks and internet hosts. A reachability analysis
+   * is based on Google Cloud network configurations.
+   * You can use the analysis results to verify these configurations and
+   * to troubleshoot connectivity issues.
+   * 
+ */ + public static final class ReachabilityServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ReachabilityServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ReachabilityServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Connectivity Tests owned by a project.
+     * 
+ */ + public com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + listConnectivityTests( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListConnectivityTestsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a specific Connectivity Test.
+     * 
+ */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConnectivityTestMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Connectivity Test.
+     * After you create a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, containing non-existent resources in the network, or you
+     * don't have read permissions to the network configurations of listed
+     * projects), then the reachability result returns a value of `UNKNOWN`.
+     * If the endpoint specifications in `ConnectivityTest` are
+     * incomplete, the reachability result returns a value of
+     * <code>AMBIGUOUS</code>. For more information,
+     * see the Connectivity Test documentation.
+     * 
+ */ + public com.google.longrunning.Operation createConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateConnectivityTestMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the configuration of an existing `ConnectivityTest`.
+     * After you update a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * The Reachability state in the test resource is updated with the new result.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, they contain non-existent resources in the network, or the
+     * user does not have read permissions to the network configurations of
+     * listed projects), then the reachability result returns a value of
+     * <code>UNKNOWN</code>.
+     * If the endpoint specifications in `ConnectivityTest` are incomplete, the
+     * reachability result returns a value of `AMBIGUOUS`. See the documentation
+     * in `ConnectivityTest` for for more details.
+     * 
+ */ + public com.google.longrunning.Operation updateConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateConnectivityTestMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Rerun an existing `ConnectivityTest`.
+     * After the user triggers the rerun, the reachability analysis is performed
+     * as part of the long running operation, which completes when the analysis
+     * completes.
+     * Even though the test configuration remains the same, the reachability
+     * result may change due to underlying network configuration changes.
+     * If the endpoint specifications in `ConnectivityTest` become invalid (for
+     * example, specified resources are deleted in the network, or you lost
+     * read permissions to the network configurations of listed projects), then
+     * the reachability result returns a value of `UNKNOWN`.
+     * 
+ */ + public com.google.longrunning.Operation rerunConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRerunConnectivityTestMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specific `ConnectivityTest`.
+     * 
+ */ + public com.google.longrunning.Operation deleteConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteConnectivityTestMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * The Reachability service in the Google Cloud Network Management API provides
+   * services that analyze the reachability within a single Google Virtual Private
+   * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises
+   * networks, or between VPC networks and internet hosts. A reachability analysis
+   * is based on Google Cloud network configurations.
+   * You can use the analysis results to verify these configurations and
+   * to troubleshoot connectivity issues.
+   * 
+ */ + public static final class ReachabilityServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ReachabilityServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ReachabilityServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReachabilityServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Connectivity Tests owned by a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse> + listConnectivityTests( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListConnectivityTestsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a specific Connectivity Test.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest> + getConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetConnectivityTestMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Connectivity Test.
+     * After you create a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, containing non-existent resources in the network, or you
+     * don't have read permissions to the network configurations of listed
+     * projects), then the reachability result returns a value of `UNKNOWN`.
+     * If the endpoint specifications in `ConnectivityTest` are
+     * incomplete, the reachability result returns a value of
+     * <code>AMBIGUOUS</code>. For more information,
+     * see the Connectivity Test documentation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateConnectivityTestMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the configuration of an existing `ConnectivityTest`.
+     * After you update a test, the reachability analysis is performed as part
+     * of the long running operation, which completes when the analysis completes.
+     * The Reachability state in the test resource is updated with the new result.
+     * If the endpoint specifications in `ConnectivityTest` are invalid
+     * (for example, they contain non-existent resources in the network, or the
+     * user does not have read permissions to the network configurations of
+     * listed projects), then the reachability result returns a value of
+     * <code>UNKNOWN</code>.
+     * If the endpoint specifications in `ConnectivityTest` are incomplete, the
+     * reachability result returns a value of `AMBIGUOUS`. See the documentation
+     * in `ConnectivityTest` for for more details.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateConnectivityTestMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Rerun an existing `ConnectivityTest`.
+     * After the user triggers the rerun, the reachability analysis is performed
+     * as part of the long running operation, which completes when the analysis
+     * completes.
+     * Even though the test configuration remains the same, the reachability
+     * result may change due to underlying network configuration changes.
+     * If the endpoint specifications in `ConnectivityTest` become invalid (for
+     * example, specified resources are deleted in the network, or you lost
+     * read permissions to the network configurations of listed projects), then
+     * the reachability result returns a value of `UNKNOWN`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + rerunConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRerunConnectivityTestMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specific `ConnectivityTest`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteConnectivityTest( + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteConnectivityTestMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_CONNECTIVITY_TESTS = 0; + private static final int METHODID_GET_CONNECTIVITY_TEST = 1; + private static final int METHODID_CREATE_CONNECTIVITY_TEST = 2; + private static final int METHODID_UPDATE_CONNECTIVITY_TEST = 3; + private static final int METHODID_RERUN_CONNECTIVITY_TEST = 4; + private static final int METHODID_DELETE_CONNECTIVITY_TEST = 5; + + 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 ReachabilityServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ReachabilityServiceImplBase 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_LIST_CONNECTIVITY_TESTS: + serviceImpl.listConnectivityTests( + (com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse>) + responseObserver); + break; + case METHODID_GET_CONNECTIVITY_TEST: + serviceImpl.getConnectivityTest( + (com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest>) + responseObserver); + break; + case METHODID_CREATE_CONNECTIVITY_TEST: + serviceImpl.createConnectivityTest( + (com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CONNECTIVITY_TEST: + serviceImpl.updateConnectivityTest( + (com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RERUN_CONNECTIVITY_TEST: + serviceImpl.rerunConnectivityTest( + (com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CONNECTIVITY_TEST: + serviceImpl.deleteConnectivityTest( + (com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) 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(); + } + } + } + + private abstract static class ReachabilityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ReachabilityServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ReachabilityService"); + } + } + + private static final class ReachabilityServiceFileDescriptorSupplier + extends ReachabilityServiceBaseDescriptorSupplier { + ReachabilityServiceFileDescriptorSupplier() {} + } + + private static final class ReachabilityServiceMethodDescriptorSupplier + extends ReachabilityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ReachabilityServiceMethodDescriptorSupplier(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 (ReachabilityServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ReachabilityServiceFileDescriptorSupplier()) + .addMethod(getListConnectivityTestsMethod()) + .addMethod(getGetConnectivityTestMethod()) + .addMethod(getCreateConnectivityTestMethod()) + .addMethod(getUpdateConnectivityTestMethod()) + .addMethod(getRerunConnectivityTestMethod()) + .addMethod(getDeleteConnectivityTestMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java.header b/java.header new file mode 100644 index 00000000..3a9b503a --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ +^ \*$ +^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License\.$ +^ \* You may obtain a copy of the License at$ +^ \*$ +^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \*$ +^ \* Unless required by applicable law or agreed to in writing, software$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,$ +^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ +^ \* See the License for the specific language governing permissions and$ +^ \* limitations under the License\.$ +^ \*/$ diff --git a/license-checks.xml b/license-checks.xml new file mode 100644 index 00000000..6597fced --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 00000000..77243461 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,24 @@ +# 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() \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..d62422e7 --- /dev/null +++ b/pom.xml @@ -0,0 +1,200 @@ + + + 4.0.0 + com.google.cloud + google-cloud-network-management-parent + pom + 0.0.1-SNAPSHOT + Google Network Management API Parent + https://github.com/googleapis/java-network-management + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.12.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + neenushaji + Neenu Shaji + neenushaji@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-network-management.git + scm:git:git@github.com:googleapis/java-network-management.git + https://github.com/googleapis/java-network-management + HEAD + + + https://github.com/googleapis/java-network-management/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-network-management-parent + + + + + + com.google.cloud + google-cloud-network-management + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-network-management-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-network-management-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-network-management-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-network-management-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 1.3.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-network-management + grpc-google-cloud-network-management-v1beta1 + grpc-google-cloud-network-management-v1 + proto-google-cloud-network-management-v1beta1 + proto-google-cloud-network-management-v1 + google-cloud-network-management-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.1.1 + + + + index + dependency-info + team + ci-management + issue-management + licenses + scm + dependency-management + distribution-management + summary + modules + + + + + true + ${site.installationModule} + jar + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + diff --git a/proto-google-cloud-network-management-v1/clirr-ignored-differences.xml b/proto-google-cloud-network-management-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000..8b51d97e --- /dev/null +++ b/proto-google-cloud-network-management-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/networkmanagement/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/networkmanagement/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/networkmanagement/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-network-management-v1/pom.xml b/proto-google-cloud-network-management-v1/pom.xml new file mode 100644 index 00000000..518f37c0 --- /dev/null +++ b/proto-google-cloud-network-management-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-network-management-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-network-management-v1 + Proto library for google-cloud-network-management + + com.google.cloud + google-cloud-network-management-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 + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/AbortInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/AbortInfo.java new file mode 100644 index 00000000..a8310a41 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/AbortInfo.java @@ -0,0 +1,1242 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Details of the final state "abort" and associated resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.AbortInfo} + */ +public final class AbortInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.AbortInfo) + AbortInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AbortInfo.newBuilder() to construct. + private AbortInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AbortInfo() { + cause_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AbortInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AbortInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + cause_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_AbortInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_AbortInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.AbortInfo.class, + com.google.cloud.networkmanagement.v1.AbortInfo.Builder.class); + } + + /** + * + * + *
+   * Abort cause types:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.AbortInfo.Cause} + */ + public enum Cause implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + CAUSE_UNSPECIFIED(0), + /** + * + * + *
+     * Aborted due to unknown network.
+     * The reachability analysis cannot proceed because the user does not have
+     * access to the host project's network configurations, including firewall
+     * rules and routes. This happens when the project is a service project and
+     * the endpoints being traced are in the host project's network.
+     * 
+ * + * UNKNOWN_NETWORK = 1; + */ + UNKNOWN_NETWORK(1), + /** + * + * + *
+     * Aborted because the IP address(es) are unknown.
+     * 
+ * + * UNKNOWN_IP = 2; + */ + UNKNOWN_IP(2), + /** + * + * + *
+     * Aborted because no project information can be derived from the test
+     * input.
+     * 
+ * + * UNKNOWN_PROJECT = 3; + */ + UNKNOWN_PROJECT(3), + /** + * + * + *
+     * Aborted because the user lacks the permission to access all or part of
+     * the network configurations required to run the test.
+     * 
+ * + * PERMISSION_DENIED = 4; + */ + PERMISSION_DENIED(4), + /** + * + * + *
+     * Aborted because no valid source endpoint is derived from the input test
+     * request.
+     * 
+ * + * NO_SOURCE_LOCATION = 5; + */ + NO_SOURCE_LOCATION(5), + /** + * + * + *
+     * Aborted because the source and/or destination endpoint specified in
+     * the test are invalid. The possible reasons that an endpoint is
+     * invalid include: malformed IP address; nonexistent instance or
+     * network URI; IP address not in the range of specified network URI; and
+     * instance not owning the network interface in the specified network.
+     * 
+ * + * INVALID_ARGUMENT = 6; + */ + INVALID_ARGUMENT(6), + /** + * + * + *
+     * Aborted because traffic is sent from a public IP to an instance without
+     * an external IP.
+     * 
+ * + * NO_EXTERNAL_IP = 7; + */ + NO_EXTERNAL_IP(7), + /** + * + * + *
+     * Aborted because none of the traces matches destination information
+     * specified in the input test request.
+     * 
+ * + * UNINTENDED_DESTINATION = 8; + */ + UNINTENDED_DESTINATION(8), + /** + * + * + *
+     * Aborted because the number of steps in the trace exceeding a certain
+     * limit which may be caused by routing loop.
+     * 
+ * + * TRACE_TOO_LONG = 9; + */ + TRACE_TOO_LONG(9), + /** + * + * + *
+     * Aborted due to internal server error.
+     * 
+ * + * INTERNAL_ERROR = 10; + */ + INTERNAL_ERROR(10), + /** + * + * + *
+     * Aborted because the source endpoint could not be found.
+     * 
+ * + * SOURCE_ENDPOINT_NOT_FOUND = 11; + */ + SOURCE_ENDPOINT_NOT_FOUND(11), + /** + * + * + *
+     * Aborted because the source network does not match the source endpoint.
+     * 
+ * + * MISMATCHED_SOURCE_NETWORK = 12; + */ + MISMATCHED_SOURCE_NETWORK(12), + /** + * + * + *
+     * Aborted because the destination endpoint could not be found.
+     * 
+ * + * DESTINATION_ENDPOINT_NOT_FOUND = 13; + */ + DESTINATION_ENDPOINT_NOT_FOUND(13), + /** + * + * + *
+     * Aborted because the destination network does not match the destination
+     * endpoint.
+     * 
+ * + * MISMATCHED_DESTINATION_NETWORK = 14; + */ + MISMATCHED_DESTINATION_NETWORK(14), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + public static final int CAUSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Aborted due to unknown network.
+     * The reachability analysis cannot proceed because the user does not have
+     * access to the host project's network configurations, including firewall
+     * rules and routes. This happens when the project is a service project and
+     * the endpoints being traced are in the host project's network.
+     * 
+ * + * UNKNOWN_NETWORK = 1; + */ + public static final int UNKNOWN_NETWORK_VALUE = 1; + /** + * + * + *
+     * Aborted because the IP address(es) are unknown.
+     * 
+ * + * UNKNOWN_IP = 2; + */ + public static final int UNKNOWN_IP_VALUE = 2; + /** + * + * + *
+     * Aborted because no project information can be derived from the test
+     * input.
+     * 
+ * + * UNKNOWN_PROJECT = 3; + */ + public static final int UNKNOWN_PROJECT_VALUE = 3; + /** + * + * + *
+     * Aborted because the user lacks the permission to access all or part of
+     * the network configurations required to run the test.
+     * 
+ * + * PERMISSION_DENIED = 4; + */ + public static final int PERMISSION_DENIED_VALUE = 4; + /** + * + * + *
+     * Aborted because no valid source endpoint is derived from the input test
+     * request.
+     * 
+ * + * NO_SOURCE_LOCATION = 5; + */ + public static final int NO_SOURCE_LOCATION_VALUE = 5; + /** + * + * + *
+     * Aborted because the source and/or destination endpoint specified in
+     * the test are invalid. The possible reasons that an endpoint is
+     * invalid include: malformed IP address; nonexistent instance or
+     * network URI; IP address not in the range of specified network URI; and
+     * instance not owning the network interface in the specified network.
+     * 
+ * + * INVALID_ARGUMENT = 6; + */ + public static final int INVALID_ARGUMENT_VALUE = 6; + /** + * + * + *
+     * Aborted because traffic is sent from a public IP to an instance without
+     * an external IP.
+     * 
+ * + * NO_EXTERNAL_IP = 7; + */ + public static final int NO_EXTERNAL_IP_VALUE = 7; + /** + * + * + *
+     * Aborted because none of the traces matches destination information
+     * specified in the input test request.
+     * 
+ * + * UNINTENDED_DESTINATION = 8; + */ + public static final int UNINTENDED_DESTINATION_VALUE = 8; + /** + * + * + *
+     * Aborted because the number of steps in the trace exceeding a certain
+     * limit which may be caused by routing loop.
+     * 
+ * + * TRACE_TOO_LONG = 9; + */ + public static final int TRACE_TOO_LONG_VALUE = 9; + /** + * + * + *
+     * Aborted due to internal server error.
+     * 
+ * + * INTERNAL_ERROR = 10; + */ + public static final int INTERNAL_ERROR_VALUE = 10; + /** + * + * + *
+     * Aborted because the source endpoint could not be found.
+     * 
+ * + * SOURCE_ENDPOINT_NOT_FOUND = 11; + */ + public static final int SOURCE_ENDPOINT_NOT_FOUND_VALUE = 11; + /** + * + * + *
+     * Aborted because the source network does not match the source endpoint.
+     * 
+ * + * MISMATCHED_SOURCE_NETWORK = 12; + */ + public static final int MISMATCHED_SOURCE_NETWORK_VALUE = 12; + /** + * + * + *
+     * Aborted because the destination endpoint could not be found.
+     * 
+ * + * DESTINATION_ENDPOINT_NOT_FOUND = 13; + */ + public static final int DESTINATION_ENDPOINT_NOT_FOUND_VALUE = 13; + /** + * + * + *
+     * Aborted because the destination network does not match the destination
+     * endpoint.
+     * 
+ * + * MISMATCHED_DESTINATION_NETWORK = 14; + */ + public static final int MISMATCHED_DESTINATION_NETWORK_VALUE = 14; + + 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 Cause 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 Cause forNumber(int value) { + switch (value) { + case 0: + return CAUSE_UNSPECIFIED; + case 1: + return UNKNOWN_NETWORK; + case 2: + return UNKNOWN_IP; + case 3: + return UNKNOWN_PROJECT; + case 4: + return PERMISSION_DENIED; + case 5: + return NO_SOURCE_LOCATION; + case 6: + return INVALID_ARGUMENT; + case 7: + return NO_EXTERNAL_IP; + case 8: + return UNINTENDED_DESTINATION; + case 9: + return TRACE_TOO_LONG; + case 10: + return INTERNAL_ERROR; + case 11: + return SOURCE_ENDPOINT_NOT_FOUND; + case 12: + return MISMATCHED_SOURCE_NETWORK; + case 13: + return DESTINATION_ENDPOINT_NOT_FOUND; + case 14: + return MISMATCHED_DESTINATION_NETWORK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Cause findValueByNumber(int number) { + return Cause.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.networkmanagement.v1.AbortInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final Cause[] VALUES = values(); + + public static Cause 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 Cause(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.AbortInfo.Cause) + } + + public static final int CAUSE_FIELD_NUMBER = 1; + private int cause_; + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.AbortInfo.Cause getCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.AbortInfo.Cause result = + com.google.cloud.networkmanagement.v1.AbortInfo.Cause.valueOf(cause_); + return result == null + ? com.google.cloud.networkmanagement.v1.AbortInfo.Cause.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object resourceUri_; + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = 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 (cause_ + != com.google.cloud.networkmanagement.v1.AbortInfo.Cause.CAUSE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, cause_); + } + if (!getResourceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cause_ + != com.google.cloud.networkmanagement.v1.AbortInfo.Cause.CAUSE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, cause_); + } + if (!getResourceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += unknownFields.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.networkmanagement.v1.AbortInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.AbortInfo other = + (com.google.cloud.networkmanagement.v1.AbortInfo) obj; + + if (cause_ != other.cause_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + cause_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.AbortInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.AbortInfo 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.networkmanagement.v1.AbortInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.AbortInfo 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.networkmanagement.v1.AbortInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.AbortInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.AbortInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.AbortInfo 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.networkmanagement.v1.AbortInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.AbortInfo 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.networkmanagement.v1.AbortInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.AbortInfo 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.networkmanagement.v1.AbortInfo 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; + } + /** + * + * + *
+   * Details of the final state "abort" and associated resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.AbortInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.AbortInfo) + com.google.cloud.networkmanagement.v1.AbortInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_AbortInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_AbortInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.AbortInfo.class, + com.google.cloud.networkmanagement.v1.AbortInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.AbortInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cause_ = 0; + + resourceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_AbortInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.AbortInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.AbortInfo build() { + com.google.cloud.networkmanagement.v1.AbortInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.AbortInfo buildPartial() { + com.google.cloud.networkmanagement.v1.AbortInfo result = + new com.google.cloud.networkmanagement.v1.AbortInfo(this); + result.cause_ = cause_; + result.resourceUri_ = resourceUri_; + 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.networkmanagement.v1.AbortInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.AbortInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.AbortInfo other) { + if (other == com.google.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance()) + return this; + if (other.cause_ != 0) { + setCauseValue(other.getCauseValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.AbortInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.networkmanagement.v1.AbortInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int cause_ = 0; + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @param value The enum numeric value on the wire for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseValue(int value) { + + cause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.AbortInfo.Cause getCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.AbortInfo.Cause result = + com.google.cloud.networkmanagement.v1.AbortInfo.Cause.valueOf(cause_); + return result == null + ? com.google.cloud.networkmanagement.v1.AbortInfo.Cause.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause(com.google.cloud.networkmanagement.v1.AbortInfo.Cause value) { + if (value == null) { + throw new NullPointerException(); + } + + cause_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return This builder for chaining. + */ + public Builder clearCause() { + + cause_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + + resourceUri_ = getDefaultInstance().getResourceUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUri_ = value; + 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.networkmanagement.v1.AbortInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.AbortInfo) + private static final com.google.cloud.networkmanagement.v1.AbortInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.AbortInfo(); + } + + public static com.google.cloud.networkmanagement.v1.AbortInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AbortInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbortInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.AbortInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/AbortInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/AbortInfoOrBuilder.java new file mode 100644 index 00000000..86df8d5a --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/AbortInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface AbortInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.AbortInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + int getCauseValue(); + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * + * @return The cause. + */ + com.google.cloud.networkmanagement.v1.AbortInfo.Cause getCause(); + + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CloudSQLInstanceInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CloudSQLInstanceInfo.java new file mode 100644 index 00000000..6c1ae635 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CloudSQLInstanceInfo.java @@ -0,0 +1,1539 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Cloud SQL instance.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} + */ +public final class CloudSQLInstanceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + CloudSQLInstanceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudSQLInstanceInfo.newBuilder() to construct. + private CloudSQLInstanceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudSQLInstanceInfo() { + displayName_ = ""; + uri_ = ""; + networkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + region_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudSQLInstanceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CloudSQLInstanceInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + internalIp_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalIp_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + region_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.class, + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_FIELD_NUMBER = 5; + private volatile java.lang.Object internalIp_; + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + @java.lang.Override + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + 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(); + internalIp_ = s; + return s; + } + } + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 6; + private volatile java.lang.Object externalIp_; + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + 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(); + externalIp_ = s; + return s; + } + } + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 7; + private volatile java.lang.Object region_; + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + 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(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, networkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalIp_); + } + if (!getRegionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, region_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, networkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalIp_); + } + if (!getRegionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, region_); + } + size += unknownFields.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.networkmanagement.v1.CloudSQLInstanceInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo other = + (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getInternalIp().equals(other.getInternalIp())) return false; + if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getInternalIp().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo 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.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo 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.networkmanagement.v1.CloudSQLInstanceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo 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.networkmanagement.v1.CloudSQLInstanceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo 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.networkmanagement.v1.CloudSQLInstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo 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.networkmanagement.v1.CloudSQLInstanceInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Cloud SQL instance.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.class, + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + networkUri_ = ""; + + internalIp_ = ""; + + externalIp_ = ""; + + region_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo build() { + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo buildPartial() { + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo result = + new com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.networkUri_ = networkUri_; + result.internalIp_ = internalIp_; + result.externalIp_ = externalIp_; + result.region_ = region_; + 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.networkmanagement.v1.CloudSQLInstanceInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo other) { + if (other == com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.getInternalIp().isEmpty()) { + internalIp_ = other.internalIp_; + onChanged(); + } + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object internalIp_ = ""; + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + internalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearInternalIp() { + + internalIp_ = getDefaultInstance().getInternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The bytes for internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + internalIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + + externalIp_ = getDefaultInstance().getExternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + region_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + + region_ = getDefaultInstance().getRegion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + region_ = value; + 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.networkmanagement.v1.CloudSQLInstanceInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + private static final com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); + } + + public static com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSQLInstanceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudSQLInstanceInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.CloudSQLInstanceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CloudSQLInstanceInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CloudSQLInstanceInfoOrBuilder.java new file mode 100644 index 00000000..d1dd06ea --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CloudSQLInstanceInfoOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface CloudSQLInstanceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + java.lang.String getInternalIp(); + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + com.google.protobuf.ByteString getInternalIpBytes(); + + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); + + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The region. + */ + java.lang.String getRegion(); + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTest.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTest.java new file mode 100644 index 00000000..b3e77bfa --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTest.java @@ -0,0 +1,3673 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * A Connectivity Test for a network reachability analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ConnectivityTest} + */ +public final class ConnectivityTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.ConnectivityTest) + ConnectivityTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConnectivityTest.newBuilder() to construct. + private ConnectivityTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectivityTest() { + name_ = ""; + description_ = ""; + protocol_ = ""; + relatedProjects_ = com.google.protobuf.LazyStringArrayList.EMPTY; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConnectivityTest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConnectivityTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + com.google.cloud.networkmanagement.v1.Endpoint.Builder subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.Endpoint.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.networkmanagement.v1.Endpoint.Builder subBuilder = null; + if (destination_ != null) { + subBuilder = destination_.toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.Endpoint.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(destination_); + destination_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + protocol_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + relatedProjects_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + relatedProjects_.add(s); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Builder subBuilder = null; + if (reachabilityDetails_ != null) { + subBuilder = reachabilityDetails_.toBuilder(); + } + reachabilityDetails_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.ReachabilityDetails.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reachabilityDetails_); + reachabilityDetails_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + relatedProjects_ = relatedProjects_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ConnectivityTest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + 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.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ConnectivityTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ConnectivityTest.class, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @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 SOURCE_FIELD_NUMBER = 3; + private com.google.cloud.networkmanagement.v1.Endpoint source_; + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Endpoint getSource() { + return source_ == null + ? com.google.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : source_; + } + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointOrBuilder getSourceOrBuilder() { + return getSource(); + } + + public static final int DESTINATION_FIELD_NUMBER = 4; + private com.google.cloud.networkmanagement.v1.Endpoint destination_; + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + @java.lang.Override + public boolean hasDestination() { + return destination_ != null; + } + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Endpoint getDestination() { + return destination_ == null + ? com.google.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : destination_; + } + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointOrBuilder getDestinationOrBuilder() { + return getDestination(); + } + + public static final int PROTOCOL_FIELD_NUMBER = 5; + private volatile java.lang.Object protocol_; + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + 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(); + protocol_ = s; + return s; + } + } + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_PROJECTS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList relatedProjects_; + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return A list containing the relatedProjects. + */ + public com.google.protobuf.ProtocolStringList getRelatedProjectsList() { + return relatedProjects_; + } + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return The count of relatedProjects. + */ + public int getRelatedProjectsCount() { + return relatedProjects_.size(); + } + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the element to return. + * @return The relatedProjects at the given index. + */ + public java.lang.String getRelatedProjects(int index) { + return relatedProjects_.get(index); + } + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedProjects at the given index. + */ + public com.google.protobuf.ByteString getRelatedProjectsBytes(int index) { + return relatedProjects_.getByteString(index); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 7; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 8; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ConnectivityTest_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + 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(); + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.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 test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.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 test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int REACHABILITY_DETAILS_FIELD_NUMBER = 12; + private com.google.cloud.networkmanagement.v1.ReachabilityDetails reachabilityDetails_; + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the reachabilityDetails field is set. + */ + @java.lang.Override + public boolean hasReachabilityDetails() { + return reachabilityDetails_ != null; + } + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reachabilityDetails. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ReachabilityDetails getReachabilityDetails() { + return reachabilityDetails_ == null + ? com.google.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder + getReachabilityDetailsOrBuilder() { + return getReachabilityDetails(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (source_ != null) { + output.writeMessage(3, getSource()); + } + if (destination_ != null) { + output.writeMessage(4, getDestination()); + } + if (!getProtocolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, protocol_); + } + for (int i = 0; i < relatedProjects_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relatedProjects_.getRaw(i)); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); + if (createTime_ != null) { + output.writeMessage(10, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(11, getUpdateTime()); + } + if (reachabilityDetails_ != null) { + output.writeMessage(12, getReachabilityDetails()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSource()); + } + if (destination_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDestination()); + } + if (!getProtocolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, protocol_); + } + { + int dataSize = 0; + for (int i = 0; i < relatedProjects_.size(); i++) { + dataSize += computeStringSizeNoTag(relatedProjects_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelatedProjectsList().size(); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, displayName_); + } + 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(8, labels__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (reachabilityDetails_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(12, getReachabilityDetails()); + } + size += unknownFields.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.networkmanagement.v1.ConnectivityTest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.ConnectivityTest other = + (com.google.cloud.networkmanagement.v1.ConnectivityTest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (hasDestination() != other.hasDestination()) return false; + if (hasDestination()) { + if (!getDestination().equals(other.getDestination())) return false; + } + if (!getProtocol().equals(other.getProtocol())) return false; + if (!getRelatedProjectsList().equals(other.getRelatedProjectsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) 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 (hasReachabilityDetails() != other.hasReachabilityDetails()) return false; + if (hasReachabilityDetails()) { + if (!getReachabilityDetails().equals(other.getReachabilityDetails())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + if (hasDestination()) { + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().hashCode(); + } + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + if (getRelatedProjectsCount() > 0) { + hash = (37 * hash) + RELATED_PROJECTS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedProjectsList().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().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 (hasReachabilityDetails()) { + hash = (37 * hash) + REACHABILITY_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getReachabilityDetails().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ConnectivityTest 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.networkmanagement.v1.ConnectivityTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ConnectivityTest 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.networkmanagement.v1.ConnectivityTest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.ConnectivityTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ConnectivityTest 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.networkmanagement.v1.ConnectivityTest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ConnectivityTest 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.networkmanagement.v1.ConnectivityTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ConnectivityTest 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.networkmanagement.v1.ConnectivityTest 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 Connectivity Test for a network reachability analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ConnectivityTest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.ConnectivityTest) + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ConnectivityTest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 8: + 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.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ConnectivityTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ConnectivityTest.class, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.ConnectivityTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + if (destinationBuilder_ == null) { + destination_ = null; + } else { + destination_ = null; + destinationBuilder_ = null; + } + protocol_ = ""; + + relatedProjects_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + displayName_ = ""; + + internalGetMutableLabels().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetails_ = null; + } else { + reachabilityDetails_ = null; + reachabilityDetailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ConnectivityTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ConnectivityTest getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ConnectivityTest build() { + com.google.cloud.networkmanagement.v1.ConnectivityTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ConnectivityTest buildPartial() { + com.google.cloud.networkmanagement.v1.ConnectivityTest result = + new com.google.cloud.networkmanagement.v1.ConnectivityTest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + if (destinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = destinationBuilder_.build(); + } + result.protocol_ = protocol_; + if (((bitField0_ & 0x00000001) != 0)) { + relatedProjects_ = relatedProjects_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.relatedProjects_ = relatedProjects_; + result.displayName_ = displayName_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (reachabilityDetailsBuilder_ == null) { + result.reachabilityDetails_ = reachabilityDetails_; + } else { + result.reachabilityDetails_ = reachabilityDetailsBuilder_.build(); + } + 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.networkmanagement.v1.ConnectivityTest) { + return mergeFrom((com.google.cloud.networkmanagement.v1.ConnectivityTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.ConnectivityTest other) { + if (other == com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.hasDestination()) { + mergeDestination(other.getDestination()); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + onChanged(); + } + if (!other.relatedProjects_.isEmpty()) { + if (relatedProjects_.isEmpty()) { + relatedProjects_ = other.relatedProjects_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRelatedProjectsIsMutable(); + relatedProjects_.addAll(other.relatedProjects_); + } + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasReachabilityDetails()) { + mergeReachabilityDetails(other.getReachabilityDetails()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.ConnectivityTest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.ConnectivityTest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @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; + onChanged(); + return this; + } + + private com.google.cloud.networkmanagement.v1.Endpoint source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Endpoint, + com.google.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1.EndpointOrBuilder> + sourceBuilder_; + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.networkmanagement.v1.Endpoint getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.networkmanagement.v1.Endpoint value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource( + com.google.cloud.networkmanagement.v1.Endpoint.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource(com.google.cloud.networkmanagement.v1.Endpoint value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.networkmanagement.v1.Endpoint.newBuilder(source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1.Endpoint.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1.EndpointOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Endpoint, + com.google.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1.EndpointOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Endpoint, + com.google.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1.EndpointOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private com.google.cloud.networkmanagement.v1.Endpoint destination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Endpoint, + com.google.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1.EndpointOrBuilder> + destinationBuilder_; + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + public boolean hasDestination() { + return destinationBuilder_ != null || destination_ != null; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + public com.google.cloud.networkmanagement.v1.Endpoint getDestination() { + if (destinationBuilder_ == null) { + return destination_ == null + ? com.google.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : destination_; + } else { + return destinationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestination(com.google.cloud.networkmanagement.v1.Endpoint value) { + if (destinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + destinationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestination( + com.google.cloud.networkmanagement.v1.Endpoint.Builder builderForValue) { + if (destinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + destinationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDestination(com.google.cloud.networkmanagement.v1.Endpoint value) { + if (destinationBuilder_ == null) { + if (destination_ != null) { + destination_ = + com.google.cloud.networkmanagement.v1.Endpoint.newBuilder(destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + destinationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDestination() { + if (destinationBuilder_ == null) { + destination_ = null; + onChanged(); + } else { + destination_ = null; + destinationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1.Endpoint.Builder getDestinationBuilder() { + + onChanged(); + return getDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1.EndpointOrBuilder getDestinationOrBuilder() { + if (destinationBuilder_ != null) { + return destinationBuilder_.getMessageOrBuilder(); + } else { + return destination_ == null + ? com.google.cloud.networkmanagement.v1.Endpoint.getDefaultInstance() + : destination_; + } + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Endpoint, + com.google.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1.EndpointOrBuilder> + getDestinationFieldBuilder() { + if (destinationBuilder_ == null) { + destinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Endpoint, + com.google.cloud.networkmanagement.v1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1.EndpointOrBuilder>( + getDestination(), getParentForChildren(), isClean()); + destination_ = null; + } + return destinationBuilder_; + } + + private java.lang.Object protocol_ = ""; + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + protocol_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + + protocol_ = getDefaultInstance().getProtocol(); + onChanged(); + return this; + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + protocol_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList relatedProjects_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRelatedProjectsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + relatedProjects_ = new com.google.protobuf.LazyStringArrayList(relatedProjects_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @return A list containing the relatedProjects. + */ + public com.google.protobuf.ProtocolStringList getRelatedProjectsList() { + return relatedProjects_.getUnmodifiableView(); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @return The count of relatedProjects. + */ + public int getRelatedProjectsCount() { + return relatedProjects_.size(); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the element to return. + * @return The relatedProjects at the given index. + */ + public java.lang.String getRelatedProjects(int index) { + return relatedProjects_.get(index); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedProjects at the given index. + */ + public com.google.protobuf.ByteString getRelatedProjectsBytes(int index) { + return relatedProjects_.getByteString(index); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param index The index to set the value at. + * @param value The relatedProjects to set. + * @return This builder for chaining. + */ + public Builder setRelatedProjects(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedProjectsIsMutable(); + relatedProjects_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param value The relatedProjects to add. + * @return This builder for chaining. + */ + public Builder addRelatedProjects(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedProjectsIsMutable(); + relatedProjects_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param values The relatedProjects to add. + * @return This builder for chaining. + */ + public Builder addAllRelatedProjects(java.lang.Iterable values) { + ensureRelatedProjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedProjects_); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @return This builder for chaining. + */ + public Builder clearRelatedProjects() { + relatedProjects_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param value The bytes of the relatedProjects to add. + * @return This builder for chaining. + */ + public Builder addRelatedProjectsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelatedProjectsIsMutable(); + relatedProjects_.add(value); + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + 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() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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 test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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 test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.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; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.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.cloud.networkmanagement.v1.ReachabilityDetails reachabilityDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ReachabilityDetails, + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Builder, + com.google.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder> + reachabilityDetailsBuilder_; + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the reachabilityDetails field is set. + */ + public boolean hasReachabilityDetails() { + return reachabilityDetailsBuilder_ != null || reachabilityDetails_ != null; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reachabilityDetails. + */ + public com.google.cloud.networkmanagement.v1.ReachabilityDetails getReachabilityDetails() { + if (reachabilityDetailsBuilder_ == null) { + return reachabilityDetails_ == null + ? com.google.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } else { + return reachabilityDetailsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setReachabilityDetails( + com.google.cloud.networkmanagement.v1.ReachabilityDetails value) { + if (reachabilityDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reachabilityDetails_ = value; + onChanged(); + } else { + reachabilityDetailsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setReachabilityDetails( + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Builder builderForValue) { + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetails_ = builderForValue.build(); + onChanged(); + } else { + reachabilityDetailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeReachabilityDetails( + com.google.cloud.networkmanagement.v1.ReachabilityDetails value) { + if (reachabilityDetailsBuilder_ == null) { + if (reachabilityDetails_ != null) { + reachabilityDetails_ = + com.google.cloud.networkmanagement.v1.ReachabilityDetails.newBuilder( + reachabilityDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + reachabilityDetails_ = value; + } + onChanged(); + } else { + reachabilityDetailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearReachabilityDetails() { + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetails_ = null; + onChanged(); + } else { + reachabilityDetails_ = null; + reachabilityDetailsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkmanagement.v1.ReachabilityDetails.Builder + getReachabilityDetailsBuilder() { + + onChanged(); + return getReachabilityDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder + getReachabilityDetailsOrBuilder() { + if (reachabilityDetailsBuilder_ != null) { + return reachabilityDetailsBuilder_.getMessageOrBuilder(); + } else { + return reachabilityDetails_ == null + ? com.google.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ReachabilityDetails, + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Builder, + com.google.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder> + getReachabilityDetailsFieldBuilder() { + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ReachabilityDetails, + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Builder, + com.google.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder>( + getReachabilityDetails(), getParentForChildren(), isClean()); + reachabilityDetails_ = null; + } + return reachabilityDetailsBuilder_; + } + + @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.networkmanagement.v1.ConnectivityTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.ConnectivityTest) + private static final com.google.cloud.networkmanagement.v1.ConnectivityTest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.ConnectivityTest(); + } + + public static com.google.cloud.networkmanagement.v1.ConnectivityTest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConnectivityTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConnectivityTest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.ConnectivityTest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTestName.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTestName.java new file mode 100644 index 00000000..26b4008c --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTestName.java @@ -0,0 +1,192 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.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 ConnectivityTestName implements ResourceName { + private static final PathTemplate PROJECT_TEST = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/global/connectivityTests/{test}"); + private volatile Map fieldValuesMap; + private final String project; + private final String test; + + @Deprecated + protected ConnectivityTestName() { + project = null; + test = null; + } + + private ConnectivityTestName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + test = Preconditions.checkNotNull(builder.getTest()); + } + + public String getProject() { + return project; + } + + public String getTest() { + return test; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ConnectivityTestName of(String project, String test) { + return newBuilder().setProject(project).setTest(test).build(); + } + + public static String format(String project, String test) { + return newBuilder().setProject(project).setTest(test).build().toString(); + } + + public static ConnectivityTestName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_TEST.validatedMatch( + formattedString, "ConnectivityTestName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("test")); + } + + 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 (ConnectivityTestName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_TEST.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 (test != null) { + fieldMapBuilder.put("test", test); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_TEST.instantiate("project", project, "test", test); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ConnectivityTestName that = ((ConnectivityTestName) o); + return Objects.equals(this.project, that.project) && Objects.equals(this.test, that.test); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(test); + return h; + } + + /** Builder for projects/{project}/locations/global/connectivityTests/{test}. */ + public static class Builder { + private String project; + private String test; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getTest() { + return test; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setTest(String test) { + this.test = test; + return this; + } + + private Builder(ConnectivityTestName connectivityTestName) { + this.project = connectivityTestName.project; + this.test = connectivityTestName.test; + } + + public ConnectivityTestName build() { + return new ConnectivityTestName(this); + } + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTestOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTestOrBuilder.java new file mode 100644 index 00000000..4046c266 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ConnectivityTestOrBuilder.java @@ -0,0 +1,531 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1; + +public interface ConnectivityTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.ConnectivityTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.networkmanagement.v1.Endpoint getSource(); + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkmanagement.v1.EndpointOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + boolean hasDestination(); + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + com.google.cloud.networkmanagement.v1.Endpoint getDestination(); + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkmanagement.v1.EndpointOrBuilder getDestinationOrBuilder(); + + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString getProtocolBytes(); + + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return A list containing the relatedProjects. + */ + java.util.List getRelatedProjectsList(); + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return The count of relatedProjects. + */ + int getRelatedProjectsCount(); + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the element to return. + * @return The relatedProjects at the given index. + */ + java.lang.String getRelatedProjects(int index); + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedProjects at the given index. + */ + com.google.protobuf.ByteString getRelatedProjectsBytes(int index); + + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + int getLabelsCount(); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the reachabilityDetails field is set. + */ + boolean hasReachabilityDetails(); + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reachabilityDetails. + */ + com.google.cloud.networkmanagement.v1.ReachabilityDetails getReachabilityDetails(); + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder + getReachabilityDetailsOrBuilder(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CreateConnectivityTestRequest.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CreateConnectivityTestRequest.java new file mode 100644 index 00000000..c9103147 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CreateConnectivityTestRequest.java @@ -0,0 +1,1179 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Request for the `CreateConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} + */ +public final class CreateConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) + CreateConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateConnectivityTestRequest.newBuilder() to construct. + private CreateConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateConnectivityTestRequest() { + parent_ = ""; + testId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + testId_ = s; + break; + } + case 26: + { + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.ConnectivityTest.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource of the Connectivity Test to create:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource of the Connectivity Test to create:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 TEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object testId_; + /** + * + * + *
+   * Required. The logical name of the Connectivity Test in your project
+   * with the following restrictions:
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-40 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project
+   * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The testId. + */ + @java.lang.Override + public java.lang.String getTestId() { + java.lang.Object ref = testId_; + 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(); + testId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The logical name of the Connectivity Test in your project
+   * with the following restrictions:
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-40 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project
+   * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for testId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTestIdBytes() { + java.lang.Object ref = testId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private com.google.cloud.networkmanagement.v1.ConnectivityTest resource_; + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ConnectivityTest getResource() { + return resource_ == null + ? com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : resource_; + } + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getResourceOrBuilder() { + return getResource(); + } + + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getTestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, testId_); + } + if (resource_ != null) { + output.writeMessage(3, getResource()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getTestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, testId_); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getResource()); + } + size += unknownFields.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.networkmanagement.v1.CreateConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getTestId().equals(other.getTestId())) return false; + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource().equals(other.getResource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + TEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getTestId().hashCode(); + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest 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.networkmanagement.v1.CreateConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest 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.networkmanagement.v1.CreateConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest 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.networkmanagement.v1.CreateConnectivityTestRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + 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.networkmanagement.v1.CreateConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest 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.networkmanagement.v1.CreateConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `CreateConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + testId_ = ""; + + if (resourceBuilder_ == null) { + resource_ = null; + } else { + resource_ = null; + resourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(this); + result.parent_ = parent_; + result.testId_ = testId_; + if (resourceBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = resourceBuilder_.build(); + } + 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.networkmanagement.v1.CreateConnectivityTestRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getTestId().isEmpty()) { + testId_ = other.testId_; + onChanged(); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object testId_ = ""; + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The testId. + */ + public java.lang.String getTestId() { + java.lang.Object ref = testId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + testId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for testId. + */ + public com.google.protobuf.ByteString getTestIdBytes() { + java.lang.Object ref = testId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The testId to set. + * @return This builder for chaining. + */ + public Builder setTestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + testId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTestId() { + + testId_ = getDefaultInstance().getTestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for testId to set. + * @return This builder for chaining. + */ + public Builder setTestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + testId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.networkmanagement.v1.ConnectivityTest resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ConnectivityTest, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder> + resourceBuilder_; + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceBuilder_ != null || resource_ != null; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTest getResource() { + if (resourceBuilder_ == null) { + return resource_ == null + ? com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource(com.google.cloud.networkmanagement.v1.ConnectivityTest value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource( + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeResource(com.google.cloud.networkmanagement.v1.ConnectivityTest value) { + if (resourceBuilder_ == null) { + if (resource_ != null) { + resource_ = + com.google.cloud.networkmanagement.v1.ConnectivityTest.newBuilder(resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + resourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + resource_ = null; + onChanged(); + } else { + resource_ = null; + resourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder getResourceBuilder() { + + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null + ? com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : resource_; + } + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ConnectivityTest, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ConnectivityTest, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder>( + getResource(), getParentForChildren(), isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + @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.networkmanagement.v1.CreateConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.CreateConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CreateConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CreateConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..dfd758e2 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/CreateConnectivityTestRequestOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +public interface CreateConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the Connectivity Test to create:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource of the Connectivity Test to create:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The logical name of the Connectivity Test in your project
+   * with the following restrictions:
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-40 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project
+   * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The testId. + */ + java.lang.String getTestId(); + /** + * + * + *
+   * Required. The logical name of the Connectivity Test in your project
+   * with the following restrictions:
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-40 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project
+   * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for testId. + */ + com.google.protobuf.ByteString getTestIdBytes(); + + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + com.google.cloud.networkmanagement.v1.ConnectivityTest getResource(); + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getResourceOrBuilder(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeleteConnectivityTestRequest.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeleteConnectivityTestRequest.java new file mode 100644 index 00000000..d5547132 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeleteConnectivityTestRequest.java @@ -0,0 +1,655 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Request for the `DeleteConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} + */ +public final class DeleteConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) + DeleteConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteConnectivityTestRequest.newBuilder() to construct. + private DeleteConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteConnectivityTestRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.networkmanagement.v1.DeleteConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest 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.networkmanagement.v1.DeleteConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest 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.networkmanagement.v1.DeleteConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest 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.networkmanagement.v1.DeleteConnectivityTestRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + 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.networkmanagement.v1.DeleteConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest 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.networkmanagement.v1.DeleteConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `DeleteConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(this); + result.name_ = name_; + 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.networkmanagement.v1.DeleteConnectivityTestRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + 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.networkmanagement.v1.DeleteConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.DeleteConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeleteConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeleteConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..07a2d148 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeleteConnectivityTestRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +public interface DeleteConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeliverInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeliverInfo.java new file mode 100644 index 00000000..117fbcff --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeliverInfo.java @@ -0,0 +1,1019 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Details of the final state "deliver" and associated resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.DeliverInfo} + */ +public final class DeliverInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.DeliverInfo) + DeliverInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeliverInfo.newBuilder() to construct. + private DeliverInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeliverInfo() { + target_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeliverInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeliverInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + target_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DeliverInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DeliverInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.DeliverInfo.class, + com.google.cloud.networkmanagement.v1.DeliverInfo.Builder.class); + } + + /** + * + * + *
+   * Deliver target types:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.DeliverInfo.Target} + */ + public enum Target implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + TARGET_UNSPECIFIED(0), + /** + * + * + *
+     * Target is a Compute Engine instance.
+     * 
+ * + * INSTANCE = 1; + */ + INSTANCE(1), + /** + * + * + *
+     * Target is the internet.
+     * 
+ * + * INTERNET = 2; + */ + INTERNET(2), + /** + * + * + *
+     * Target is a Google API.
+     * 
+ * + * GOOGLE_API = 3; + */ + GOOGLE_API(3), + /** + * + * + *
+     * Target is a Google Kubernetes Engine cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + GKE_MASTER(4), + /** + * + * + *
+     * Target is a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 5; + */ + CLOUD_SQL_INSTANCE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + public static final int TARGET_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Target is a Compute Engine instance.
+     * 
+ * + * INSTANCE = 1; + */ + public static final int INSTANCE_VALUE = 1; + /** + * + * + *
+     * Target is the internet.
+     * 
+ * + * INTERNET = 2; + */ + public static final int INTERNET_VALUE = 2; + /** + * + * + *
+     * Target is a Google API.
+     * 
+ * + * GOOGLE_API = 3; + */ + public static final int GOOGLE_API_VALUE = 3; + /** + * + * + *
+     * Target is a Google Kubernetes Engine cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + public static final int GKE_MASTER_VALUE = 4; + /** + * + * + *
+     * Target is a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 5; + */ + public static final int CLOUD_SQL_INSTANCE_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 Target 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 Target forNumber(int value) { + switch (value) { + case 0: + return TARGET_UNSPECIFIED; + case 1: + return INSTANCE; + case 2: + return INTERNET; + case 3: + return GOOGLE_API; + case 4: + return GKE_MASTER; + case 5: + return CLOUD_SQL_INSTANCE; + 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 Target findValueByNumber(int number) { + return Target.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.networkmanagement.v1.DeliverInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Target[] VALUES = values(); + + public static Target 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 Target(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.DeliverInfo.Target) + } + + public static final int TARGET_FIELD_NUMBER = 1; + private int target_; + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeliverInfo.Target getTarget() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.DeliverInfo.Target result = + com.google.cloud.networkmanagement.v1.DeliverInfo.Target.valueOf(target_); + return result == null + ? com.google.cloud.networkmanagement.v1.DeliverInfo.Target.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object resourceUri_; + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = 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 (target_ + != com.google.cloud.networkmanagement.v1.DeliverInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, target_); + } + if (!getResourceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (target_ + != com.google.cloud.networkmanagement.v1.DeliverInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, target_); + } + if (!getResourceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += unknownFields.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.networkmanagement.v1.DeliverInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.DeliverInfo other = + (com.google.cloud.networkmanagement.v1.DeliverInfo) obj; + + if (target_ != other.target_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + target_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.DeliverInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.DeliverInfo 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.networkmanagement.v1.DeliverInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.DeliverInfo 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.networkmanagement.v1.DeliverInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.DeliverInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.DeliverInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.DeliverInfo 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.networkmanagement.v1.DeliverInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.DeliverInfo 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.networkmanagement.v1.DeliverInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.DeliverInfo 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.networkmanagement.v1.DeliverInfo 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; + } + /** + * + * + *
+   * Details of the final state "deliver" and associated resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.DeliverInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.DeliverInfo) + com.google.cloud.networkmanagement.v1.DeliverInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DeliverInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DeliverInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.DeliverInfo.class, + com.google.cloud.networkmanagement.v1.DeliverInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.DeliverInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + target_ = 0; + + resourceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DeliverInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeliverInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeliverInfo build() { + com.google.cloud.networkmanagement.v1.DeliverInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeliverInfo buildPartial() { + com.google.cloud.networkmanagement.v1.DeliverInfo result = + new com.google.cloud.networkmanagement.v1.DeliverInfo(this); + result.target_ = target_; + result.resourceUri_ = resourceUri_; + 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.networkmanagement.v1.DeliverInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.DeliverInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.DeliverInfo other) { + if (other == com.google.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance()) + return this; + if (other.target_ != 0) { + setTargetValue(other.getTargetValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.DeliverInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.DeliverInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int target_ = 0; + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @param value The enum numeric value on the wire for target to set. + * @return This builder for chaining. + */ + public Builder setTargetValue(int value) { + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeliverInfo.Target getTarget() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.DeliverInfo.Target result = + com.google.cloud.networkmanagement.v1.DeliverInfo.Target.valueOf(target_); + return result == null + ? com.google.cloud.networkmanagement.v1.DeliverInfo.Target.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(com.google.cloud.networkmanagement.v1.DeliverInfo.Target value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + + resourceUri_ = getDefaultInstance().getResourceUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUri_ = value; + 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.networkmanagement.v1.DeliverInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.DeliverInfo) + private static final com.google.cloud.networkmanagement.v1.DeliverInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.DeliverInfo(); + } + + public static com.google.cloud.networkmanagement.v1.DeliverInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeliverInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeliverInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.DeliverInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeliverInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeliverInfoOrBuilder.java new file mode 100644 index 00000000..8dbd4a69 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DeliverInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface DeliverInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.DeliverInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + int getTargetValue(); + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * + * @return The target. + */ + com.google.cloud.networkmanagement.v1.DeliverInfo.Target getTarget(); + + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DropInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DropInfo.java new file mode 100644 index 00000000..7ed5626f --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DropInfo.java @@ -0,0 +1,1423 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Details of the final state "drop" and associated resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.DropInfo} + */ +public final class DropInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.DropInfo) + DropInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DropInfo.newBuilder() to construct. + private DropInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DropInfo() { + cause_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DropInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DropInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + cause_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DropInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DropInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.DropInfo.class, + com.google.cloud.networkmanagement.v1.DropInfo.Builder.class); + } + + /** + * + * + *
+   * Drop cause types:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.DropInfo.Cause} + */ + public enum Cause implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + CAUSE_UNSPECIFIED(0), + /** + * + * + *
+     * Destination external address cannot be resolved to a known target. If
+     * the address is used in a Google Cloud project, provide the project ID
+     * as test input.
+     * 
+ * + * UNKNOWN_EXTERNAL_ADDRESS = 1; + */ + UNKNOWN_EXTERNAL_ADDRESS(1), + /** + * + * + *
+     * A Compute Engine instance can only send or receive a packet with a
+     * foreign IP address if ip_forward is enabled.
+     * 
+ * + * FOREIGN_IP_DISALLOWED = 2; + */ + FOREIGN_IP_DISALLOWED(2), + /** + * + * + *
+     * Dropped due to a firewall rule, unless allowed due to connection
+     * tracking.
+     * 
+ * + * FIREWALL_RULE = 3; + */ + FIREWALL_RULE(3), + /** + * + * + *
+     * Dropped due to no routes.
+     * 
+ * + * NO_ROUTE = 4; + */ + NO_ROUTE(4), + /** + * + * + *
+     * Dropped due to invalid route. Route's next hop is a blackhole.
+     * 
+ * + * ROUTE_BLACKHOLE = 5; + */ + ROUTE_BLACKHOLE(5), + /** + * + * + *
+     * Packet is sent to a wrong (unintended) network. Example: you trace a
+     * packet from VM1:Network1 to VM2:Network2, however, the route configured
+     * in Network1 sends the packet destined for VM2's IP addresss to Network3.
+     * 
+ * + * ROUTE_WRONG_NETWORK = 6; + */ + ROUTE_WRONG_NETWORK(6), + /** + * + * + *
+     * Packet with internal destination address sent to the internet gateway.
+     * 
+ * + * PRIVATE_TRAFFIC_TO_INTERNET = 7; + */ + PRIVATE_TRAFFIC_TO_INTERNET(7), + /** + * + * + *
+     * Instance with only an internal IP address tries to access Google API and
+     * services, but private Google access is not enabled.
+     * 
+ * + * PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + */ + PRIVATE_GOOGLE_ACCESS_DISALLOWED(8), + /** + * + * + *
+     * Instance with only an internal IP address tries to access external hosts,
+     * but Cloud NAT is not enabled in the subnet, unless special configurations
+     * on a VM allow this connection. For more details, see [Special
+     * configurations for VM
+     * instances](https://cloud.google.com/vpc/docs/special-configurations).
+     * 
+ * + * NO_EXTERNAL_ADDRESS = 9; + */ + NO_EXTERNAL_ADDRESS(9), + /** + * + * + *
+     * Destination internal address cannot be resolved to a known target. If
+     * this is a shared VPC scenario, verify if the service project ID is
+     * provided as test input. Otherwise, verify if the IP address is being
+     * used in the project.
+     * 
+ * + * UNKNOWN_INTERNAL_ADDRESS = 10; + */ + UNKNOWN_INTERNAL_ADDRESS(10), + /** + * + * + *
+     * Forwarding rule's protocol and ports do not match the packet header.
+     * 
+ * + * FORWARDING_RULE_MISMATCH = 11; + */ + FORWARDING_RULE_MISMATCH(11), + /** + * + * + *
+     * Forwarding rule does not have backends configured.
+     * 
+ * + * FORWARDING_RULE_NO_INSTANCES = 12; + */ + FORWARDING_RULE_NO_INSTANCES(12), + /** + * + * + *
+     * Firewalls block the health check probes to the backends and cause
+     * the backends to be unavailable for traffic from the load balancer.
+     * For more details, see [Health check firewall
+     * rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules).
+     * 
+ * + * FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + */ + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK(13), + /** + * + * + *
+     * Packet is sent from or to a Compute Engine instance that is not in a
+     * running state.
+     * 
+ * + * INSTANCE_NOT_RUNNING = 14; + */ + INSTANCE_NOT_RUNNING(14), + /** + * + * + *
+     * The type of traffic is blocked and the user cannot configure a firewall
+     * rule to enable it. See [Always blocked
+     * traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for
+     * more details.
+     * 
+ * + * TRAFFIC_TYPE_BLOCKED = 15; + */ + TRAFFIC_TYPE_BLOCKED(15), + /** + * + * + *
+     * Access to Google Kubernetes Engine cluster master's endpoint is not
+     * authorized. See [Access to the cluster
+     * endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints)
+     * for more details.
+     * 
+ * + * GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + */ + GKE_MASTER_UNAUTHORIZED_ACCESS(16), + /** + * + * + *
+     * Access to the Cloud SQL instance endpoint is not authorized.
+     * See [Authorizing with authorized
+     * networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for
+     * more details.
+     * 
+ * + * CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + */ + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS(17), + /** + * + * + *
+     * Packet was dropped inside Google Kubernetes Engine Service.
+     * 
+ * + * DROPPED_INSIDE_GKE_SERVICE = 18; + */ + DROPPED_INSIDE_GKE_SERVICE(18), + /** + * + * + *
+     * Packet was dropped inside Cloud SQL Service.
+     * 
+ * + * DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + */ + DROPPED_INSIDE_CLOUD_SQL_SERVICE(19), + /** + * + * + *
+     * Packet was dropped because there is no peering between the originating
+     * network and the Google Managed Services Network.
+     * 
+ * + * GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + */ + GOOGLE_MANAGED_SERVICE_NO_PEERING(20), + /** + * + * + *
+     * Packet was dropped because the Cloud SQL instance has neither a private
+     * nor a public IP address.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + */ + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS(21), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + public static final int CAUSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Destination external address cannot be resolved to a known target. If
+     * the address is used in a Google Cloud project, provide the project ID
+     * as test input.
+     * 
+ * + * UNKNOWN_EXTERNAL_ADDRESS = 1; + */ + public static final int UNKNOWN_EXTERNAL_ADDRESS_VALUE = 1; + /** + * + * + *
+     * A Compute Engine instance can only send or receive a packet with a
+     * foreign IP address if ip_forward is enabled.
+     * 
+ * + * FOREIGN_IP_DISALLOWED = 2; + */ + public static final int FOREIGN_IP_DISALLOWED_VALUE = 2; + /** + * + * + *
+     * Dropped due to a firewall rule, unless allowed due to connection
+     * tracking.
+     * 
+ * + * FIREWALL_RULE = 3; + */ + public static final int FIREWALL_RULE_VALUE = 3; + /** + * + * + *
+     * Dropped due to no routes.
+     * 
+ * + * NO_ROUTE = 4; + */ + public static final int NO_ROUTE_VALUE = 4; + /** + * + * + *
+     * Dropped due to invalid route. Route's next hop is a blackhole.
+     * 
+ * + * ROUTE_BLACKHOLE = 5; + */ + public static final int ROUTE_BLACKHOLE_VALUE = 5; + /** + * + * + *
+     * Packet is sent to a wrong (unintended) network. Example: you trace a
+     * packet from VM1:Network1 to VM2:Network2, however, the route configured
+     * in Network1 sends the packet destined for VM2's IP addresss to Network3.
+     * 
+ * + * ROUTE_WRONG_NETWORK = 6; + */ + public static final int ROUTE_WRONG_NETWORK_VALUE = 6; + /** + * + * + *
+     * Packet with internal destination address sent to the internet gateway.
+     * 
+ * + * PRIVATE_TRAFFIC_TO_INTERNET = 7; + */ + public static final int PRIVATE_TRAFFIC_TO_INTERNET_VALUE = 7; + /** + * + * + *
+     * Instance with only an internal IP address tries to access Google API and
+     * services, but private Google access is not enabled.
+     * 
+ * + * PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + */ + public static final int PRIVATE_GOOGLE_ACCESS_DISALLOWED_VALUE = 8; + /** + * + * + *
+     * Instance with only an internal IP address tries to access external hosts,
+     * but Cloud NAT is not enabled in the subnet, unless special configurations
+     * on a VM allow this connection. For more details, see [Special
+     * configurations for VM
+     * instances](https://cloud.google.com/vpc/docs/special-configurations).
+     * 
+ * + * NO_EXTERNAL_ADDRESS = 9; + */ + public static final int NO_EXTERNAL_ADDRESS_VALUE = 9; + /** + * + * + *
+     * Destination internal address cannot be resolved to a known target. If
+     * this is a shared VPC scenario, verify if the service project ID is
+     * provided as test input. Otherwise, verify if the IP address is being
+     * used in the project.
+     * 
+ * + * UNKNOWN_INTERNAL_ADDRESS = 10; + */ + public static final int UNKNOWN_INTERNAL_ADDRESS_VALUE = 10; + /** + * + * + *
+     * Forwarding rule's protocol and ports do not match the packet header.
+     * 
+ * + * FORWARDING_RULE_MISMATCH = 11; + */ + public static final int FORWARDING_RULE_MISMATCH_VALUE = 11; + /** + * + * + *
+     * Forwarding rule does not have backends configured.
+     * 
+ * + * FORWARDING_RULE_NO_INSTANCES = 12; + */ + public static final int FORWARDING_RULE_NO_INSTANCES_VALUE = 12; + /** + * + * + *
+     * Firewalls block the health check probes to the backends and cause
+     * the backends to be unavailable for traffic from the load balancer.
+     * For more details, see [Health check firewall
+     * rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules).
+     * 
+ * + * FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + */ + public static final int FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK_VALUE = 13; + /** + * + * + *
+     * Packet is sent from or to a Compute Engine instance that is not in a
+     * running state.
+     * 
+ * + * INSTANCE_NOT_RUNNING = 14; + */ + public static final int INSTANCE_NOT_RUNNING_VALUE = 14; + /** + * + * + *
+     * The type of traffic is blocked and the user cannot configure a firewall
+     * rule to enable it. See [Always blocked
+     * traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for
+     * more details.
+     * 
+ * + * TRAFFIC_TYPE_BLOCKED = 15; + */ + public static final int TRAFFIC_TYPE_BLOCKED_VALUE = 15; + /** + * + * + *
+     * Access to Google Kubernetes Engine cluster master's endpoint is not
+     * authorized. See [Access to the cluster
+     * endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints)
+     * for more details.
+     * 
+ * + * GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + */ + public static final int GKE_MASTER_UNAUTHORIZED_ACCESS_VALUE = 16; + /** + * + * + *
+     * Access to the Cloud SQL instance endpoint is not authorized.
+     * See [Authorizing with authorized
+     * networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for
+     * more details.
+     * 
+ * + * CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + */ + public static final int CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS_VALUE = 17; + /** + * + * + *
+     * Packet was dropped inside Google Kubernetes Engine Service.
+     * 
+ * + * DROPPED_INSIDE_GKE_SERVICE = 18; + */ + public static final int DROPPED_INSIDE_GKE_SERVICE_VALUE = 18; + /** + * + * + *
+     * Packet was dropped inside Cloud SQL Service.
+     * 
+ * + * DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + */ + public static final int DROPPED_INSIDE_CLOUD_SQL_SERVICE_VALUE = 19; + /** + * + * + *
+     * Packet was dropped because there is no peering between the originating
+     * network and the Google Managed Services Network.
+     * 
+ * + * GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + */ + public static final int GOOGLE_MANAGED_SERVICE_NO_PEERING_VALUE = 20; + /** + * + * + *
+     * Packet was dropped because the Cloud SQL instance has neither a private
+     * nor a public IP address.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + */ + public static final int CLOUD_SQL_INSTANCE_NO_IP_ADDRESS_VALUE = 21; + + 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 Cause 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 Cause forNumber(int value) { + switch (value) { + case 0: + return CAUSE_UNSPECIFIED; + case 1: + return UNKNOWN_EXTERNAL_ADDRESS; + case 2: + return FOREIGN_IP_DISALLOWED; + case 3: + return FIREWALL_RULE; + case 4: + return NO_ROUTE; + case 5: + return ROUTE_BLACKHOLE; + case 6: + return ROUTE_WRONG_NETWORK; + case 7: + return PRIVATE_TRAFFIC_TO_INTERNET; + case 8: + return PRIVATE_GOOGLE_ACCESS_DISALLOWED; + case 9: + return NO_EXTERNAL_ADDRESS; + case 10: + return UNKNOWN_INTERNAL_ADDRESS; + case 11: + return FORWARDING_RULE_MISMATCH; + case 12: + return FORWARDING_RULE_NO_INSTANCES; + case 13: + return FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK; + case 14: + return INSTANCE_NOT_RUNNING; + case 15: + return TRAFFIC_TYPE_BLOCKED; + case 16: + return GKE_MASTER_UNAUTHORIZED_ACCESS; + case 17: + return CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS; + case 18: + return DROPPED_INSIDE_GKE_SERVICE; + case 19: + return DROPPED_INSIDE_CLOUD_SQL_SERVICE; + case 20: + return GOOGLE_MANAGED_SERVICE_NO_PEERING; + case 21: + return CLOUD_SQL_INSTANCE_NO_IP_ADDRESS; + 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 Cause findValueByNumber(int number) { + return Cause.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.networkmanagement.v1.DropInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final Cause[] VALUES = values(); + + public static Cause 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 Cause(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.DropInfo.Cause) + } + + public static final int CAUSE_FIELD_NUMBER = 1; + private int cause_; + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DropInfo.Cause getCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.DropInfo.Cause result = + com.google.cloud.networkmanagement.v1.DropInfo.Cause.valueOf(cause_); + return result == null + ? com.google.cloud.networkmanagement.v1.DropInfo.Cause.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object resourceUri_; + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = 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 (cause_ + != com.google.cloud.networkmanagement.v1.DropInfo.Cause.CAUSE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, cause_); + } + if (!getResourceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cause_ + != com.google.cloud.networkmanagement.v1.DropInfo.Cause.CAUSE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, cause_); + } + if (!getResourceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += unknownFields.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.networkmanagement.v1.DropInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.DropInfo other = + (com.google.cloud.networkmanagement.v1.DropInfo) obj; + + if (cause_ != other.cause_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + cause_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.DropInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.DropInfo 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.networkmanagement.v1.DropInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.DropInfo 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.networkmanagement.v1.DropInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.DropInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.DropInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.DropInfo 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.networkmanagement.v1.DropInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.DropInfo 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.networkmanagement.v1.DropInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.DropInfo 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.networkmanagement.v1.DropInfo 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; + } + /** + * + * + *
+   * Details of the final state "drop" and associated resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.DropInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.DropInfo) + com.google.cloud.networkmanagement.v1.DropInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DropInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DropInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.DropInfo.class, + com.google.cloud.networkmanagement.v1.DropInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.DropInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cause_ = 0; + + resourceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_DropInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DropInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DropInfo build() { + com.google.cloud.networkmanagement.v1.DropInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DropInfo buildPartial() { + com.google.cloud.networkmanagement.v1.DropInfo result = + new com.google.cloud.networkmanagement.v1.DropInfo(this); + result.cause_ = cause_; + result.resourceUri_ = resourceUri_; + 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.networkmanagement.v1.DropInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.DropInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.DropInfo other) { + if (other == com.google.cloud.networkmanagement.v1.DropInfo.getDefaultInstance()) return this; + if (other.cause_ != 0) { + setCauseValue(other.getCauseValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.DropInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.networkmanagement.v1.DropInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int cause_ = 0; + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @param value The enum numeric value on the wire for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseValue(int value) { + + cause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DropInfo.Cause getCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.DropInfo.Cause result = + com.google.cloud.networkmanagement.v1.DropInfo.Cause.valueOf(cause_); + return result == null + ? com.google.cloud.networkmanagement.v1.DropInfo.Cause.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause(com.google.cloud.networkmanagement.v1.DropInfo.Cause value) { + if (value == null) { + throw new NullPointerException(); + } + + cause_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return This builder for chaining. + */ + public Builder clearCause() { + + cause_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + + resourceUri_ = getDefaultInstance().getResourceUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUri_ = value; + 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.networkmanagement.v1.DropInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.DropInfo) + private static final com.google.cloud.networkmanagement.v1.DropInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.DropInfo(); + } + + public static com.google.cloud.networkmanagement.v1.DropInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DropInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DropInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.DropInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DropInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DropInfoOrBuilder.java new file mode 100644 index 00000000..bd2faa52 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/DropInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface DropInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.DropInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + int getCauseValue(); + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * + * @return The cause. + */ + com.google.cloud.networkmanagement.v1.DropInfo.Cause getCause(); + + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/Endpoint.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/Endpoint.java new file mode 100644 index 00000000..22f5d606 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/Endpoint.java @@ -0,0 +1,2039 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Source or destination of the Connectivity Test.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.Endpoint} + */ +public final class Endpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.Endpoint) + EndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use Endpoint.newBuilder() to construct. + private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Endpoint() { + ipAddress_ = ""; + instance_ = ""; + gkeMasterCluster_ = ""; + cloudSqlInstance_ = ""; + network_ = ""; + networkType_ = 0; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Endpoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Endpoint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + ipAddress_ = s; + break; + } + case 16: + { + port_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + instance_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 40: + { + int rawValue = input.readEnum(); + + networkType_ = rawValue; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + gkeMasterCluster_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + cloudSqlInstance_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.Endpoint.class, + com.google.cloud.networkmanagement.v1.Endpoint.Builder.class); + } + + /** + * + * + *
+   * The type definition of an endpoint's network. Use one of the
+   * following choices:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.Endpoint.NetworkType} + */ + public enum NetworkType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default type if unspecified.
+     * 
+ * + * NETWORK_TYPE_UNSPECIFIED = 0; + */ + NETWORK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A network hosted within Google Cloud Platform.
+     * To receive more detailed output, specify the URI for the source or
+     * destination network.
+     * 
+ * + * GCP_NETWORK = 1; + */ + GCP_NETWORK(1), + /** + * + * + *
+     * A network hosted outside of Google Cloud Platform.
+     * This can be an on-premises network, or a network hosted by another cloud
+     * provider.
+     * 
+ * + * NON_GCP_NETWORK = 2; + */ + NON_GCP_NETWORK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default type if unspecified.
+     * 
+ * + * NETWORK_TYPE_UNSPECIFIED = 0; + */ + public static final int NETWORK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A network hosted within Google Cloud Platform.
+     * To receive more detailed output, specify the URI for the source or
+     * destination network.
+     * 
+ * + * GCP_NETWORK = 1; + */ + public static final int GCP_NETWORK_VALUE = 1; + /** + * + * + *
+     * A network hosted outside of Google Cloud Platform.
+     * This can be an on-premises network, or a network hosted by another cloud
+     * provider.
+     * 
+ * + * NON_GCP_NETWORK = 2; + */ + public static final int NON_GCP_NETWORK_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 NetworkType 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 NetworkType forNumber(int value) { + switch (value) { + case 0: + return NETWORK_TYPE_UNSPECIFIED; + case 1: + return GCP_NETWORK; + case 2: + return NON_GCP_NETWORK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NetworkType findValueByNumber(int number) { + return NetworkType.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.networkmanagement.v1.Endpoint.getDescriptor().getEnumTypes().get(0); + } + + private static final NetworkType[] VALUES = values(); + + public static NetworkType 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 NetworkType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.Endpoint.NetworkType) + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object ipAddress_; + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @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 the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @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 PORT_FIELD_NUMBER = 2; + private int port_; + /** + * + * + *
+   * The IP protocol port of the endpoint.
+   * Only applicable when protocol is TCP or UDP.
+   * 
+ * + * int32 port = 2; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int INSTANCE_FIELD_NUMBER = 3; + private volatile java.lang.Object instance_; + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + 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(); + instance_ = s; + return s; + } + } + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GKE_MASTER_CLUSTER_FIELD_NUMBER = 7; + private volatile java.lang.Object gkeMasterCluster_; + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The gkeMasterCluster. + */ + @java.lang.Override + public java.lang.String getGkeMasterCluster() { + java.lang.Object ref = gkeMasterCluster_; + 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(); + gkeMasterCluster_ = s; + return s; + } + } + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The bytes for gkeMasterCluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGkeMasterClusterBytes() { + java.lang.Object ref = gkeMasterCluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeMasterCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_SQL_INSTANCE_FIELD_NUMBER = 8; + private volatile java.lang.Object cloudSqlInstance_; + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The cloudSqlInstance. + */ + @java.lang.Override + public java.lang.String getCloudSqlInstance() { + java.lang.Object ref = cloudSqlInstance_; + 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(); + cloudSqlInstance_ = s; + return s; + } + } + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The bytes for cloudSqlInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudSqlInstanceBytes() { + java.lang.Object ref = cloudSqlInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 4; + private volatile java.lang.Object network_; + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @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; + } + } + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @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 NETWORK_TYPE_FIELD_NUMBER = 5; + private int networkType_; + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The enum numeric value on the wire for networkType. + */ + @java.lang.Override + public int getNetworkTypeValue() { + return networkType_; + } + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The networkType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Endpoint.NetworkType getNetworkType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.Endpoint.NetworkType result = + com.google.cloud.networkmanagement.v1.Endpoint.NetworkType.valueOf(networkType_); + return result == null + ? com.google.cloud.networkmanagement.v1.Endpoint.NetworkType.UNRECOGNIZED + : result; + } + + public static final int PROJECT_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object projectId_; + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a GCP
+   * project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a GCP
+   * project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = 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 (!getIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + if (!getInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instance_); + } + if (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, network_); + } + if (networkType_ + != com.google.cloud.networkmanagement.v1.Endpoint.NetworkType.NETWORK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, networkType_); + } + if (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, projectId_); + } + if (!getGkeMasterClusterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, gkeMasterCluster_); + } + if (!getCloudSqlInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, cloudSqlInstance_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, port_); + } + if (!getInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instance_); + } + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, network_); + } + if (networkType_ + != com.google.cloud.networkmanagement.v1.Endpoint.NetworkType.NETWORK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, networkType_); + } + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, projectId_); + } + if (!getGkeMasterClusterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, gkeMasterCluster_); + } + if (!getCloudSqlInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, cloudSqlInstance_); + } + size += unknownFields.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.networkmanagement.v1.Endpoint)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.Endpoint other = + (com.google.cloud.networkmanagement.v1.Endpoint) obj; + + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (getPort() != other.getPort()) return false; + if (!getInstance().equals(other.getInstance())) return false; + if (!getGkeMasterCluster().equals(other.getGkeMasterCluster())) return false; + if (!getCloudSqlInstance().equals(other.getCloudSqlInstance())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (networkType_ != other.networkType_) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + GKE_MASTER_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getGkeMasterCluster().hashCode(); + hash = (37 * hash) + CLOUD_SQL_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstance().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + NETWORK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + networkType_; + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.Endpoint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.Endpoint 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.networkmanagement.v1.Endpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.Endpoint 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.networkmanagement.v1.Endpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.Endpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.Endpoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.Endpoint 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.networkmanagement.v1.Endpoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.Endpoint 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.networkmanagement.v1.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.Endpoint 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.networkmanagement.v1.Endpoint 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; + } + /** + * + * + *
+   * Source or destination of the Connectivity Test.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.Endpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.Endpoint) + com.google.cloud.networkmanagement.v1.EndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.Endpoint.class, + com.google.cloud.networkmanagement.v1.Endpoint.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.Endpoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + ipAddress_ = ""; + + port_ = 0; + + instance_ = ""; + + gkeMasterCluster_ = ""; + + cloudSqlInstance_ = ""; + + network_ = ""; + + networkType_ = 0; + + projectId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_Endpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Endpoint getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.Endpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Endpoint build() { + com.google.cloud.networkmanagement.v1.Endpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Endpoint buildPartial() { + com.google.cloud.networkmanagement.v1.Endpoint result = + new com.google.cloud.networkmanagement.v1.Endpoint(this); + result.ipAddress_ = ipAddress_; + result.port_ = port_; + result.instance_ = instance_; + result.gkeMasterCluster_ = gkeMasterCluster_; + result.cloudSqlInstance_ = cloudSqlInstance_; + result.network_ = network_; + result.networkType_ = networkType_; + result.projectId_ = projectId_; + 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.networkmanagement.v1.Endpoint) { + return mergeFrom((com.google.cloud.networkmanagement.v1.Endpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.Endpoint other) { + if (other == com.google.cloud.networkmanagement.v1.Endpoint.getDefaultInstance()) return this; + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + onChanged(); + } + if (!other.getGkeMasterCluster().isEmpty()) { + gkeMasterCluster_ = other.gkeMasterCluster_; + onChanged(); + } + if (!other.getCloudSqlInstance().isEmpty()) { + cloudSqlInstance_ = other.cloudSqlInstance_; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (other.networkType_ != 0) { + setNetworkTypeValue(other.getNetworkTypeValue()); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.Endpoint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.networkmanagement.v1.Endpoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @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 the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @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 the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @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; + onChanged(); + return this; + } + + private int port_; + /** + * + * + *
+     * The IP protocol port of the endpoint.
+     * Only applicable when protocol is TCP or UDP.
+     * 
+ * + * int32 port = 2; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * + * + *
+     * The IP protocol port of the endpoint.
+     * Only applicable when protocol is TCP or UDP.
+     * 
+ * + * int32 port = 2; + * + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP protocol port of the endpoint.
+     * Only applicable when protocol is TCP or UDP.
+     * 
+ * + * int32 port = 2; + * + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = 0; + onChanged(); + return this; + } + + private java.lang.Object instance_ = ""; + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = getDefaultInstance().getInstance(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instance_ = value; + onChanged(); + return this; + } + + private java.lang.Object gkeMasterCluster_ = ""; + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @return The gkeMasterCluster. + */ + public java.lang.String getGkeMasterCluster() { + java.lang.Object ref = gkeMasterCluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gkeMasterCluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @return The bytes for gkeMasterCluster. + */ + public com.google.protobuf.ByteString getGkeMasterClusterBytes() { + java.lang.Object ref = gkeMasterCluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeMasterCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @param value The gkeMasterCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeMasterCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gkeMasterCluster_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @return This builder for chaining. + */ + public Builder clearGkeMasterCluster() { + + gkeMasterCluster_ = getDefaultInstance().getGkeMasterCluster(); + onChanged(); + return this; + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @param value The bytes for gkeMasterCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeMasterClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gkeMasterCluster_ = value; + onChanged(); + return this; + } + + private java.lang.Object cloudSqlInstance_ = ""; + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @return The cloudSqlInstance. + */ + public java.lang.String getCloudSqlInstance() { + java.lang.Object ref = cloudSqlInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @return The bytes for cloudSqlInstance. + */ + public com.google.protobuf.ByteString getCloudSqlInstanceBytes() { + java.lang.Object ref = cloudSqlInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @param value The cloudSqlInstance to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudSqlInstance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @return This builder for chaining. + */ + public Builder clearCloudSqlInstance() { + + cloudSqlInstance_ = getDefaultInstance().getCloudSqlInstance(); + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @param value The bytes for cloudSqlInstance to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudSqlInstance_ = value; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @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; + } + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @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; + } + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @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; + onChanged(); + return this; + } + + private int networkType_ = 0; + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The enum numeric value on the wire for networkType. + */ + @java.lang.Override + public int getNetworkTypeValue() { + return networkType_; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @param value The enum numeric value on the wire for networkType to set. + * @return This builder for chaining. + */ + public Builder setNetworkTypeValue(int value) { + + networkType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The networkType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Endpoint.NetworkType getNetworkType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.Endpoint.NetworkType result = + com.google.cloud.networkmanagement.v1.Endpoint.NetworkType.valueOf(networkType_); + return result == null + ? com.google.cloud.networkmanagement.v1.Endpoint.NetworkType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @param value The networkType to set. + * @return This builder for chaining. + */ + public Builder setNetworkType( + com.google.cloud.networkmanagement.v1.Endpoint.NetworkType value) { + if (value == null) { + throw new NullPointerException(); + } + + networkType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearNetworkType() { + + networkType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + 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.networkmanagement.v1.Endpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.Endpoint) + private static final com.google.cloud.networkmanagement.v1.Endpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.Endpoint(); + } + + public static com.google.cloud.networkmanagement.v1.Endpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Endpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Endpoint(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.Endpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointInfo.java new file mode 100644 index 00000000..e69d4b62 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointInfo.java @@ -0,0 +1,1536 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. The specification of the endpoints for the test.
+ * EndpointInfo is derived from source and destination Endpoint and validated
+ * by the backend data plane model.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.EndpointInfo} + */ +public final class EndpointInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.EndpointInfo) + EndpointInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use EndpointInfo.newBuilder() to construct. + private EndpointInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndpointInfo() { + sourceIp_ = ""; + destinationIp_ = ""; + protocol_ = ""; + sourceNetworkUri_ = ""; + destinationNetworkUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EndpointInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EndpointInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceIp_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + destinationIp_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + protocol_ = s; + break; + } + case 32: + { + sourcePort_ = input.readInt32(); + break; + } + case 40: + { + destinationPort_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceNetworkUri_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + destinationNetworkUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_EndpointInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_EndpointInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.EndpointInfo.class, + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder.class); + } + + public static final int SOURCE_IP_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceIp_; + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + @java.lang.Override + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + 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(); + sourceIp_ = s; + return s; + } + } + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_IP_FIELD_NUMBER = 2; + private volatile java.lang.Object destinationIp_; + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The destinationIp. + */ + @java.lang.Override + public java.lang.String getDestinationIp() { + java.lang.Object ref = destinationIp_; + 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(); + destinationIp_ = s; + return s; + } + } + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The bytes for destinationIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationIpBytes() { + java.lang.Object ref = destinationIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOL_FIELD_NUMBER = 3; + private volatile java.lang.Object protocol_; + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + 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(); + protocol_ = s; + return s; + } + } + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PORT_FIELD_NUMBER = 4; + private int sourcePort_; + /** + * + * + *
+   * Source port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + @java.lang.Override + public int getSourcePort() { + return sourcePort_; + } + + public static final int DESTINATION_PORT_FIELD_NUMBER = 5; + private int destinationPort_; + /** + * + * + *
+   * Destination port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 destination_port = 5; + * + * @return The destinationPort. + */ + @java.lang.Override + public int getDestinationPort() { + return destinationPort_; + } + + public static final int SOURCE_NETWORK_URI_FIELD_NUMBER = 6; + private volatile java.lang.Object sourceNetworkUri_; + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The sourceNetworkUri. + */ + @java.lang.Override + public java.lang.String getSourceNetworkUri() { + java.lang.Object ref = sourceNetworkUri_; + 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(); + sourceNetworkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The bytes for sourceNetworkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceNetworkUriBytes() { + java.lang.Object ref = sourceNetworkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_NETWORK_URI_FIELD_NUMBER = 7; + private volatile java.lang.Object destinationNetworkUri_; + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The destinationNetworkUri. + */ + @java.lang.Override + public java.lang.String getDestinationNetworkUri() { + java.lang.Object ref = destinationNetworkUri_; + 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(); + destinationNetworkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The bytes for destinationNetworkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationNetworkUriBytes() { + java.lang.Object ref = destinationNetworkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationNetworkUri_ = 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 (!getSourceIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceIp_); + } + if (!getDestinationIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destinationIp_); + } + if (!getProtocolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, protocol_); + } + if (sourcePort_ != 0) { + output.writeInt32(4, sourcePort_); + } + if (destinationPort_ != 0) { + output.writeInt32(5, destinationPort_); + } + if (!getSourceNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourceNetworkUri_); + } + if (!getDestinationNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, destinationNetworkUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceIp_); + } + if (!getDestinationIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destinationIp_); + } + if (!getProtocolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, protocol_); + } + if (sourcePort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, sourcePort_); + } + if (destinationPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, destinationPort_); + } + if (!getSourceNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sourceNetworkUri_); + } + if (!getDestinationNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, destinationNetworkUri_); + } + size += unknownFields.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.networkmanagement.v1.EndpointInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.EndpointInfo other = + (com.google.cloud.networkmanagement.v1.EndpointInfo) obj; + + if (!getSourceIp().equals(other.getSourceIp())) return false; + if (!getDestinationIp().equals(other.getDestinationIp())) return false; + if (!getProtocol().equals(other.getProtocol())) return false; + if (getSourcePort() != other.getSourcePort()) return false; + if (getDestinationPort() != other.getDestinationPort()) return false; + if (!getSourceNetworkUri().equals(other.getSourceNetworkUri())) return false; + if (!getDestinationNetworkUri().equals(other.getDestinationNetworkUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + SOURCE_IP_FIELD_NUMBER; + hash = (53 * hash) + getSourceIp().hashCode(); + hash = (37 * hash) + DESTINATION_IP_FIELD_NUMBER; + hash = (53 * hash) + getDestinationIp().hashCode(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + hash = (37 * hash) + SOURCE_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSourcePort(); + hash = (37 * hash) + DESTINATION_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDestinationPort(); + hash = (37 * hash) + SOURCE_NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getSourceNetworkUri().hashCode(); + hash = (37 * hash) + DESTINATION_NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getDestinationNetworkUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.EndpointInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.EndpointInfo 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.networkmanagement.v1.EndpointInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.EndpointInfo 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.networkmanagement.v1.EndpointInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.EndpointInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.EndpointInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.EndpointInfo 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.networkmanagement.v1.EndpointInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.EndpointInfo 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.networkmanagement.v1.EndpointInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.EndpointInfo 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.networkmanagement.v1.EndpointInfo 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; + } + /** + * + * + *
+   * For display only. The specification of the endpoints for the test.
+   * EndpointInfo is derived from source and destination Endpoint and validated
+   * by the backend data plane model.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.EndpointInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.EndpointInfo) + com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_EndpointInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_EndpointInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.EndpointInfo.class, + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.EndpointInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + sourceIp_ = ""; + + destinationIp_ = ""; + + protocol_ = ""; + + sourcePort_ = 0; + + destinationPort_ = 0; + + sourceNetworkUri_ = ""; + + destinationNetworkUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_EndpointInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointInfo build() { + com.google.cloud.networkmanagement.v1.EndpointInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointInfo buildPartial() { + com.google.cloud.networkmanagement.v1.EndpointInfo result = + new com.google.cloud.networkmanagement.v1.EndpointInfo(this); + result.sourceIp_ = sourceIp_; + result.destinationIp_ = destinationIp_; + result.protocol_ = protocol_; + result.sourcePort_ = sourcePort_; + result.destinationPort_ = destinationPort_; + result.sourceNetworkUri_ = sourceNetworkUri_; + result.destinationNetworkUri_ = destinationNetworkUri_; + 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.networkmanagement.v1.EndpointInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.EndpointInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.EndpointInfo other) { + if (other == com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance()) + return this; + if (!other.getSourceIp().isEmpty()) { + sourceIp_ = other.sourceIp_; + onChanged(); + } + if (!other.getDestinationIp().isEmpty()) { + destinationIp_ = other.destinationIp_; + onChanged(); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + onChanged(); + } + if (other.getSourcePort() != 0) { + setSourcePort(other.getSourcePort()); + } + if (other.getDestinationPort() != 0) { + setDestinationPort(other.getDestinationPort()); + } + if (!other.getSourceNetworkUri().isEmpty()) { + sourceNetworkUri_ = other.sourceNetworkUri_; + onChanged(); + } + if (!other.getDestinationNetworkUri().isEmpty()) { + destinationNetworkUri_ = other.destinationNetworkUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.EndpointInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.EndpointInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sourceIp_ = ""; + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @param value The sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceIp() { + + sourceIp_ = getDefaultInstance().getSourceIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @param value The bytes for sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object destinationIp_ = ""; + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @return The destinationIp. + */ + public java.lang.String getDestinationIp() { + java.lang.Object ref = destinationIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @return The bytes for destinationIp. + */ + public com.google.protobuf.ByteString getDestinationIpBytes() { + java.lang.Object ref = destinationIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @param value The destinationIp to set. + * @return This builder for chaining. + */ + public Builder setDestinationIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destinationIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @return This builder for chaining. + */ + public Builder clearDestinationIp() { + + destinationIp_ = getDefaultInstance().getDestinationIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @param value The bytes for destinationIp to set. + * @return This builder for chaining. + */ + public Builder setDestinationIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destinationIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object protocol_ = ""; + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + protocol_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + + protocol_ = getDefaultInstance().getProtocol(); + onChanged(); + return this; + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + protocol_ = value; + onChanged(); + return this; + } + + private int sourcePort_; + /** + * + * + *
+     * Source port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + @java.lang.Override + public int getSourcePort() { + return sourcePort_; + } + /** + * + * + *
+     * Source port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 source_port = 4; + * + * @param value The sourcePort to set. + * @return This builder for chaining. + */ + public Builder setSourcePort(int value) { + + sourcePort_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Source port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 source_port = 4; + * + * @return This builder for chaining. + */ + public Builder clearSourcePort() { + + sourcePort_ = 0; + onChanged(); + return this; + } + + private int destinationPort_; + /** + * + * + *
+     * Destination port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 destination_port = 5; + * + * @return The destinationPort. + */ + @java.lang.Override + public int getDestinationPort() { + return destinationPort_; + } + /** + * + * + *
+     * Destination port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 destination_port = 5; + * + * @param value The destinationPort to set. + * @return This builder for chaining. + */ + public Builder setDestinationPort(int value) { + + destinationPort_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 destination_port = 5; + * + * @return This builder for chaining. + */ + public Builder clearDestinationPort() { + + destinationPort_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sourceNetworkUri_ = ""; + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @return The sourceNetworkUri. + */ + public java.lang.String getSourceNetworkUri() { + java.lang.Object ref = sourceNetworkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceNetworkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @return The bytes for sourceNetworkUri. + */ + public com.google.protobuf.ByteString getSourceNetworkUriBytes() { + java.lang.Object ref = sourceNetworkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @param value The sourceNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setSourceNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceNetworkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearSourceNetworkUri() { + + sourceNetworkUri_ = getDefaultInstance().getSourceNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @param value The bytes for sourceNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setSourceNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceNetworkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object destinationNetworkUri_ = ""; + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @return The destinationNetworkUri. + */ + public java.lang.String getDestinationNetworkUri() { + java.lang.Object ref = destinationNetworkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationNetworkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @return The bytes for destinationNetworkUri. + */ + public com.google.protobuf.ByteString getDestinationNetworkUriBytes() { + java.lang.Object ref = destinationNetworkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @param value The destinationNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destinationNetworkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearDestinationNetworkUri() { + + destinationNetworkUri_ = getDefaultInstance().getDestinationNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @param value The bytes for destinationNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destinationNetworkUri_ = value; + 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.networkmanagement.v1.EndpointInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.EndpointInfo) + private static final com.google.cloud.networkmanagement.v1.EndpointInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.EndpointInfo(); + } + + public static com.google.cloud.networkmanagement.v1.EndpointInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndpointInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EndpointInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.EndpointInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointInfoOrBuilder.java new file mode 100644 index 00000000..3f079aaf --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointInfoOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface EndpointInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.EndpointInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + java.lang.String getSourceIp(); + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + com.google.protobuf.ByteString getSourceIpBytes(); + + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The destinationIp. + */ + java.lang.String getDestinationIp(); + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The bytes for destinationIp. + */ + com.google.protobuf.ByteString getDestinationIpBytes(); + + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString getProtocolBytes(); + + /** + * + * + *
+   * Source port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + int getSourcePort(); + + /** + * + * + *
+   * Destination port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 destination_port = 5; + * + * @return The destinationPort. + */ + int getDestinationPort(); + + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The sourceNetworkUri. + */ + java.lang.String getSourceNetworkUri(); + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The bytes for sourceNetworkUri. + */ + com.google.protobuf.ByteString getSourceNetworkUriBytes(); + + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The destinationNetworkUri. + */ + java.lang.String getDestinationNetworkUri(); + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The bytes for destinationNetworkUri. + */ + com.google.protobuf.ByteString getDestinationNetworkUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointOrBuilder.java new file mode 100644 index 00000000..376fe7ae --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/EndpointOrBuilder.java @@ -0,0 +1,240 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1; + +public interface EndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.Endpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+   * The IP protocol port of the endpoint.
+   * Only applicable when protocol is TCP or UDP.
+   * 
+ * + * int32 port = 2; + * + * @return The port. + */ + int getPort(); + + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The instance. + */ + java.lang.String getInstance(); + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The gkeMasterCluster. + */ + java.lang.String getGkeMasterCluster(); + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The bytes for gkeMasterCluster. + */ + com.google.protobuf.ByteString getGkeMasterClusterBytes(); + + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The cloudSqlInstance. + */ + java.lang.String getCloudSqlInstance(); + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The bytes for cloudSqlInstance. + */ + com.google.protobuf.ByteString getCloudSqlInstanceBytes(); + + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The enum numeric value on the wire for networkType. + */ + int getNetworkTypeValue(); + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * + * @return The networkType. + */ + com.google.cloud.networkmanagement.v1.Endpoint.NetworkType getNetworkType(); + + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a GCP
+   * project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a GCP
+   * project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfo.java new file mode 100644 index 00000000..d49b9572 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfo.java @@ -0,0 +1,2593 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a VPC firewall rule, an implied
+ * VPC firewall rule, or a hierarchical firewall policy rule.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.FirewallInfo} + */ +public final class FirewallInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.FirewallInfo) + FirewallInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirewallInfo.newBuilder() to construct. + private FirewallInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FirewallInfo() { + displayName_ = ""; + uri_ = ""; + direction_ = ""; + action_ = ""; + networkUri_ = ""; + targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + policy_ = ""; + firewallRuleType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FirewallInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FirewallInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + direction_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + action_ = s; + break; + } + case 40: + { + priority_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + targetTags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + targetTags_.add(s); + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + targetServiceAccounts_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + targetServiceAccounts_.add(s); + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + policy_ = s; + break; + } + case 80: + { + int rawValue = input.readEnum(); + + firewallRuleType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + targetTags_ = targetTags_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + targetServiceAccounts_ = targetServiceAccounts_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_FirewallInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_FirewallInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.FirewallInfo.class, + com.google.cloud.networkmanagement.v1.FirewallInfo.Builder.class); + } + + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType} + */ + public enum FirewallRuleType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type.
+     * 
+ * + * FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + */ + FIREWALL_RULE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Hierarchical firewall policy rule. For details, see
+     * [Hierarchical firewall policies
+     * overview](https://cloud.google.com/vpc/docs/firewall-policies).
+     * 
+ * + * HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + */ + HIERARCHICAL_FIREWALL_POLICY_RULE(1), + /** + * + * + *
+     * VPC firewall rule. For details, see
+     * [VPC firewall rules
+     * overview](https://cloud.google.com/vpc/docs/firewalls).
+     * 
+ * + * VPC_FIREWALL_RULE = 2; + */ + VPC_FIREWALL_RULE(2), + /** + * + * + *
+     * Implied VPC firewall rule. For details, see
+     * [Implied
+     * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).
+     * 
+ * + * IMPLIED_VPC_FIREWALL_RULE = 3; + */ + IMPLIED_VPC_FIREWALL_RULE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type.
+     * 
+ * + * FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + */ + public static final int FIREWALL_RULE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Hierarchical firewall policy rule. For details, see
+     * [Hierarchical firewall policies
+     * overview](https://cloud.google.com/vpc/docs/firewall-policies).
+     * 
+ * + * HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + */ + public static final int HIERARCHICAL_FIREWALL_POLICY_RULE_VALUE = 1; + /** + * + * + *
+     * VPC firewall rule. For details, see
+     * [VPC firewall rules
+     * overview](https://cloud.google.com/vpc/docs/firewalls).
+     * 
+ * + * VPC_FIREWALL_RULE = 2; + */ + public static final int VPC_FIREWALL_RULE_VALUE = 2; + /** + * + * + *
+     * Implied VPC firewall rule. For details, see
+     * [Implied
+     * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).
+     * 
+ * + * IMPLIED_VPC_FIREWALL_RULE = 3; + */ + public static final int IMPLIED_VPC_FIREWALL_RULE_VALUE = 3; + + 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 FirewallRuleType 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 FirewallRuleType forNumber(int value) { + switch (value) { + case 0: + return FIREWALL_RULE_TYPE_UNSPECIFIED; + case 1: + return HIERARCHICAL_FIREWALL_POLICY_RULE; + case 2: + return VPC_FIREWALL_RULE; + case 3: + return IMPLIED_VPC_FIREWALL_RULE; + 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 FirewallRuleType findValueByNumber(int number) { + return FirewallRuleType.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.networkmanagement.v1.FirewallInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FirewallRuleType[] VALUES = values(); + + public static FirewallRuleType 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 FirewallRuleType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType) + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIRECTION_FIELD_NUMBER = 3; + private volatile java.lang.Object direction_; + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The direction. + */ + @java.lang.Override + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + 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(); + direction_ = s; + return s; + } + } + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The bytes for direction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 4; + private volatile java.lang.Object action_; + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + 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(); + action_ = s; + return s; + } + } + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 5; + private int priority_; + /** + * + * + *
+   * The priority of the firewall rule.
+   * 
+ * + * int32 priority = 5; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int NETWORK_URI_FIELD_NUMBER = 6; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_TAGS_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList targetTags_; + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return A list containing the targetTags. + */ + public com.google.protobuf.ProtocolStringList getTargetTagsList() { + return targetTags_; + } + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return The count of targetTags. + */ + public int getTargetTagsCount() { + return targetTags_.size(); + } + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the element to return. + * @return The targetTags at the given index. + */ + public java.lang.String getTargetTags(int index) { + return targetTags_.get(index); + } + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the targetTags at the given index. + */ + public com.google.protobuf.ByteString getTargetTagsBytes(int index) { + return targetTags_.getByteString(index); + } + + public static final int TARGET_SERVICE_ACCOUNTS_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList targetServiceAccounts_; + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return A list containing the targetServiceAccounts. + */ + public com.google.protobuf.ProtocolStringList getTargetServiceAccountsList() { + return targetServiceAccounts_; + } + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return The count of targetServiceAccounts. + */ + public int getTargetServiceAccountsCount() { + return targetServiceAccounts_.size(); + } + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the element to return. + * @return The targetServiceAccounts at the given index. + */ + public java.lang.String getTargetServiceAccounts(int index) { + return targetServiceAccounts_.get(index); + } + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the value to return. + * @return The bytes of the targetServiceAccounts at the given index. + */ + public com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index) { + return targetServiceAccounts_.getByteString(index); + } + + public static final int POLICY_FIELD_NUMBER = 9; + private volatile java.lang.Object policy_; + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The policy. + */ + @java.lang.Override + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + 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(); + policy_ = s; + return s; + } + } + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The bytes for policy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIREWALL_RULE_TYPE_FIELD_NUMBER = 10; + private int firewallRuleType_; + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The enum numeric value on the wire for firewallRuleType. + */ + @java.lang.Override + public int getFirewallRuleTypeValue() { + return firewallRuleType_; + } + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The firewallRuleType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType getFirewallRuleType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType result = + com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType.valueOf( + firewallRuleType_); + return result == null + ? com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType.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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getDirectionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, direction_); + } + if (!getActionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, action_); + } + if (priority_ != 0) { + output.writeInt32(5, priority_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, networkUri_); + } + for (int i = 0; i < targetTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, targetTags_.getRaw(i)); + } + for (int i = 0; i < targetServiceAccounts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 8, targetServiceAccounts_.getRaw(i)); + } + if (!getPolicyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, policy_); + } + if (firewallRuleType_ + != com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + .FIREWALL_RULE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, firewallRuleType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getDirectionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, direction_); + } + if (!getActionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, action_); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, priority_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, networkUri_); + } + { + int dataSize = 0; + for (int i = 0; i < targetTags_.size(); i++) { + dataSize += computeStringSizeNoTag(targetTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetTagsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < targetServiceAccounts_.size(); i++) { + dataSize += computeStringSizeNoTag(targetServiceAccounts_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetServiceAccountsList().size(); + } + if (!getPolicyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, policy_); + } + if (firewallRuleType_ + != com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + .FIREWALL_RULE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, firewallRuleType_); + } + size += unknownFields.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.networkmanagement.v1.FirewallInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.FirewallInfo other = + (com.google.cloud.networkmanagement.v1.FirewallInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getDirection().equals(other.getDirection())) return false; + if (!getAction().equals(other.getAction())) return false; + if (getPriority() != other.getPriority()) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getTargetTagsList().equals(other.getTargetTagsList())) return false; + if (!getTargetServiceAccountsList().equals(other.getTargetServiceAccountsList())) return false; + if (!getPolicy().equals(other.getPolicy())) return false; + if (firewallRuleType_ != other.firewallRuleType_) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + DIRECTION_FIELD_NUMBER; + hash = (53 * hash) + getDirection().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + if (getTargetTagsCount() > 0) { + hash = (37 * hash) + TARGET_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTargetTagsList().hashCode(); + } + if (getTargetServiceAccountsCount() > 0) { + hash = (37 * hash) + TARGET_SERVICE_ACCOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getTargetServiceAccountsList().hashCode(); + } + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + hash = (37 * hash) + FIREWALL_RULE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + firewallRuleType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.FirewallInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.FirewallInfo 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.networkmanagement.v1.FirewallInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.FirewallInfo 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.networkmanagement.v1.FirewallInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.FirewallInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.FirewallInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.FirewallInfo 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.networkmanagement.v1.FirewallInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.FirewallInfo 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.networkmanagement.v1.FirewallInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.FirewallInfo 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.networkmanagement.v1.FirewallInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a VPC firewall rule, an implied
+   * VPC firewall rule, or a hierarchical firewall policy rule.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.FirewallInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.FirewallInfo) + com.google.cloud.networkmanagement.v1.FirewallInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_FirewallInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_FirewallInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.FirewallInfo.class, + com.google.cloud.networkmanagement.v1.FirewallInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.FirewallInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + direction_ = ""; + + action_ = ""; + + priority_ = 0; + + networkUri_ = ""; + + targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + policy_ = ""; + + firewallRuleType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_FirewallInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.FirewallInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.FirewallInfo build() { + com.google.cloud.networkmanagement.v1.FirewallInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.FirewallInfo buildPartial() { + com.google.cloud.networkmanagement.v1.FirewallInfo result = + new com.google.cloud.networkmanagement.v1.FirewallInfo(this); + int from_bitField0_ = bitField0_; + result.displayName_ = displayName_; + result.uri_ = uri_; + result.direction_ = direction_; + result.action_ = action_; + result.priority_ = priority_; + result.networkUri_ = networkUri_; + if (((bitField0_ & 0x00000001) != 0)) { + targetTags_ = targetTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.targetTags_ = targetTags_; + if (((bitField0_ & 0x00000002) != 0)) { + targetServiceAccounts_ = targetServiceAccounts_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.targetServiceAccounts_ = targetServiceAccounts_; + result.policy_ = policy_; + result.firewallRuleType_ = firewallRuleType_; + 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.networkmanagement.v1.FirewallInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.FirewallInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.FirewallInfo other) { + if (other == com.google.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getDirection().isEmpty()) { + direction_ = other.direction_; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + onChanged(); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.targetTags_.isEmpty()) { + if (targetTags_.isEmpty()) { + targetTags_ = other.targetTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTargetTagsIsMutable(); + targetTags_.addAll(other.targetTags_); + } + onChanged(); + } + if (!other.targetServiceAccounts_.isEmpty()) { + if (targetServiceAccounts_.isEmpty()) { + targetServiceAccounts_ = other.targetServiceAccounts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.addAll(other.targetServiceAccounts_); + } + onChanged(); + } + if (!other.getPolicy().isEmpty()) { + policy_ = other.policy_; + onChanged(); + } + if (other.firewallRuleType_ != 0) { + setFirewallRuleTypeValue(other.getFirewallRuleTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.FirewallInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.FirewallInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object direction_ = ""; + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @return The direction. + */ + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + direction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @return The bytes for direction. + */ + public com.google.protobuf.ByteString getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @param value The direction to set. + * @return This builder for chaining. + */ + public Builder setDirection(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + direction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @return This builder for chaining. + */ + public Builder clearDirection() { + + direction_ = getDefaultInstance().getDirection(); + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @param value The bytes for direction to set. + * @return This builder for chaining. + */ + public Builder setDirectionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + direction_ = value; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = getDefaultInstance().getAction(); + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + action_ = value; + onChanged(); + return this; + } + + private int priority_; + /** + * + * + *
+     * The priority of the firewall rule.
+     * 
+ * + * int32 priority = 5; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + /** + * + * + *
+     * The priority of the firewall rule.
+     * 
+ * + * int32 priority = 5; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The priority of the firewall rule.
+     * 
+ * + * int32 priority = 5; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + + priority_ = 0; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList targetTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTargetTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + targetTags_ = new com.google.protobuf.LazyStringArrayList(targetTags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @return A list containing the targetTags. + */ + public com.google.protobuf.ProtocolStringList getTargetTagsList() { + return targetTags_.getUnmodifiableView(); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @return The count of targetTags. + */ + public int getTargetTagsCount() { + return targetTags_.size(); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the element to return. + * @return The targetTags at the given index. + */ + public java.lang.String getTargetTags(int index) { + return targetTags_.get(index); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the targetTags at the given index. + */ + public com.google.protobuf.ByteString getTargetTagsBytes(int index) { + return targetTags_.getByteString(index); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param index The index to set the value at. + * @param value The targetTags to set. + * @return This builder for chaining. + */ + public Builder setTargetTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetTagsIsMutable(); + targetTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param value The targetTags to add. + * @return This builder for chaining. + */ + public Builder addTargetTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetTagsIsMutable(); + targetTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param values The targetTags to add. + * @return This builder for chaining. + */ + public Builder addAllTargetTags(java.lang.Iterable values) { + ensureTargetTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetTags_); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @return This builder for chaining. + */ + public Builder clearTargetTags() { + targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param value The bytes of the targetTags to add. + * @return This builder for chaining. + */ + public Builder addTargetTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetTagsIsMutable(); + targetTags_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList targetServiceAccounts_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTargetServiceAccountsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + targetServiceAccounts_ = + new com.google.protobuf.LazyStringArrayList(targetServiceAccounts_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @return A list containing the targetServiceAccounts. + */ + public com.google.protobuf.ProtocolStringList getTargetServiceAccountsList() { + return targetServiceAccounts_.getUnmodifiableView(); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @return The count of targetServiceAccounts. + */ + public int getTargetServiceAccountsCount() { + return targetServiceAccounts_.size(); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the element to return. + * @return The targetServiceAccounts at the given index. + */ + public java.lang.String getTargetServiceAccounts(int index) { + return targetServiceAccounts_.get(index); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the value to return. + * @return The bytes of the targetServiceAccounts at the given index. + */ + public com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index) { + return targetServiceAccounts_.getByteString(index); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index to set the value at. + * @param value The targetServiceAccounts to set. + * @return This builder for chaining. + */ + public Builder setTargetServiceAccounts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param value The targetServiceAccounts to add. + * @return This builder for chaining. + */ + public Builder addTargetServiceAccounts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param values The targetServiceAccounts to add. + * @return This builder for chaining. + */ + public Builder addAllTargetServiceAccounts(java.lang.Iterable values) { + ensureTargetServiceAccountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetServiceAccounts_); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @return This builder for chaining. + */ + public Builder clearTargetServiceAccounts() { + targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param value The bytes of the targetServiceAccounts to add. + * @return This builder for chaining. + */ + public Builder addTargetServiceAccountsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.add(value); + onChanged(); + return this; + } + + private java.lang.Object policy_ = ""; + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @return The policy. + */ + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @return The bytes for policy. + */ + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @param value The policy to set. + * @return This builder for chaining. + */ + public Builder setPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + policy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @return This builder for chaining. + */ + public Builder clearPolicy() { + + policy_ = getDefaultInstance().getPolicy(); + onChanged(); + return this; + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @param value The bytes for policy to set. + * @return This builder for chaining. + */ + public Builder setPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + policy_ = value; + onChanged(); + return this; + } + + private int firewallRuleType_ = 0; + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The enum numeric value on the wire for firewallRuleType. + */ + @java.lang.Override + public int getFirewallRuleTypeValue() { + return firewallRuleType_; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @param value The enum numeric value on the wire for firewallRuleType to set. + * @return This builder for chaining. + */ + public Builder setFirewallRuleTypeValue(int value) { + + firewallRuleType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The firewallRuleType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + getFirewallRuleType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType result = + com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType.valueOf( + firewallRuleType_); + return result == null + ? com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @param value The firewallRuleType to set. + * @return This builder for chaining. + */ + public Builder setFirewallRuleType( + com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType value) { + if (value == null) { + throw new NullPointerException(); + } + + firewallRuleType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return This builder for chaining. + */ + public Builder clearFirewallRuleType() { + + firewallRuleType_ = 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.networkmanagement.v1.FirewallInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.FirewallInfo) + private static final com.google.cloud.networkmanagement.v1.FirewallInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.FirewallInfo(); + } + + public static com.google.cloud.networkmanagement.v1.FirewallInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FirewallInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FirewallInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.FirewallInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java new file mode 100644 index 00000000..5752a38b --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java @@ -0,0 +1,329 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface FirewallInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.FirewallInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The direction. + */ + java.lang.String getDirection(); + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The bytes for direction. + */ + com.google.protobuf.ByteString getDirectionBytes(); + + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The action. + */ + java.lang.String getAction(); + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); + + /** + * + * + *
+   * The priority of the firewall rule.
+   * 
+ * + * int32 priority = 5; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return A list containing the targetTags. + */ + java.util.List getTargetTagsList(); + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return The count of targetTags. + */ + int getTargetTagsCount(); + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the element to return. + * @return The targetTags at the given index. + */ + java.lang.String getTargetTags(int index); + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the targetTags at the given index. + */ + com.google.protobuf.ByteString getTargetTagsBytes(int index); + + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return A list containing the targetServiceAccounts. + */ + java.util.List getTargetServiceAccountsList(); + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return The count of targetServiceAccounts. + */ + int getTargetServiceAccountsCount(); + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the element to return. + * @return The targetServiceAccounts at the given index. + */ + java.lang.String getTargetServiceAccounts(int index); + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the value to return. + * @return The bytes of the targetServiceAccounts at the given index. + */ + com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index); + + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The policy. + */ + java.lang.String getPolicy(); + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The bytes for policy. + */ + com.google.protobuf.ByteString getPolicyBytes(); + + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The enum numeric value on the wire for firewallRuleType. + */ + int getFirewallRuleTypeValue(); + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The firewallRuleType. + */ + com.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType getFirewallRuleType(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardInfo.java new file mode 100644 index 00000000..9b1a98ed --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardInfo.java @@ -0,0 +1,1041 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Details of the final state "forward" and associated resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ForwardInfo} + */ +public final class ForwardInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.ForwardInfo) + ForwardInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForwardInfo.newBuilder() to construct. + private ForwardInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ForwardInfo() { + target_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ForwardInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ForwardInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + target_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ForwardInfo.class, + com.google.cloud.networkmanagement.v1.ForwardInfo.Builder.class); + } + + /** + * + * + *
+   * Forward target types.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.ForwardInfo.Target} + */ + public enum Target implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + TARGET_UNSPECIFIED(0), + /** + * + * + *
+     * Forwarded to a VPC peering network.
+     * 
+ * + * PEERING_VPC = 1; + */ + PEERING_VPC(1), + /** + * + * + *
+     * Forwarded to a Cloud VPN gateway.
+     * 
+ * + * VPN_GATEWAY = 2; + */ + VPN_GATEWAY(2), + /** + * + * + *
+     * Forwarded to a Cloud Interconnect connection.
+     * 
+ * + * INTERCONNECT = 3; + */ + INTERCONNECT(3), + /** + * + * + *
+     * Forwarded to a Google Kubernetes Engine Container cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + GKE_MASTER(4), + /** + * + * + *
+     * Forwarded to the next hop of a custom route imported from a peering VPC.
+     * 
+ * + * IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + */ + IMPORTED_CUSTOM_ROUTE_NEXT_HOP(5), + /** + * + * + *
+     * Forwarded to a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 6; + */ + CLOUD_SQL_INSTANCE(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + public static final int TARGET_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Forwarded to a VPC peering network.
+     * 
+ * + * PEERING_VPC = 1; + */ + public static final int PEERING_VPC_VALUE = 1; + /** + * + * + *
+     * Forwarded to a Cloud VPN gateway.
+     * 
+ * + * VPN_GATEWAY = 2; + */ + public static final int VPN_GATEWAY_VALUE = 2; + /** + * + * + *
+     * Forwarded to a Cloud Interconnect connection.
+     * 
+ * + * INTERCONNECT = 3; + */ + public static final int INTERCONNECT_VALUE = 3; + /** + * + * + *
+     * Forwarded to a Google Kubernetes Engine Container cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + public static final int GKE_MASTER_VALUE = 4; + /** + * + * + *
+     * Forwarded to the next hop of a custom route imported from a peering VPC.
+     * 
+ * + * IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + */ + public static final int IMPORTED_CUSTOM_ROUTE_NEXT_HOP_VALUE = 5; + /** + * + * + *
+     * Forwarded to a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 6; + */ + public static final int CLOUD_SQL_INSTANCE_VALUE = 6; + + 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 Target 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 Target forNumber(int value) { + switch (value) { + case 0: + return TARGET_UNSPECIFIED; + case 1: + return PEERING_VPC; + case 2: + return VPN_GATEWAY; + case 3: + return INTERCONNECT; + case 4: + return GKE_MASTER; + case 5: + return IMPORTED_CUSTOM_ROUTE_NEXT_HOP; + case 6: + return CLOUD_SQL_INSTANCE; + 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 Target findValueByNumber(int number) { + return Target.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.networkmanagement.v1.ForwardInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Target[] VALUES = values(); + + public static Target 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 Target(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.ForwardInfo.Target) + } + + public static final int TARGET_FIELD_NUMBER = 1; + private int target_; + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardInfo.Target getTarget() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.ForwardInfo.Target result = + com.google.cloud.networkmanagement.v1.ForwardInfo.Target.valueOf(target_); + return result == null + ? com.google.cloud.networkmanagement.v1.ForwardInfo.Target.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object resourceUri_; + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = 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 (target_ + != com.google.cloud.networkmanagement.v1.ForwardInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, target_); + } + if (!getResourceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (target_ + != com.google.cloud.networkmanagement.v1.ForwardInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, target_); + } + if (!getResourceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += unknownFields.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.networkmanagement.v1.ForwardInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.ForwardInfo other = + (com.google.cloud.networkmanagement.v1.ForwardInfo) obj; + + if (target_ != other.target_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + target_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.ForwardInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ForwardInfo 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.networkmanagement.v1.ForwardInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ForwardInfo 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.networkmanagement.v1.ForwardInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ForwardInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.ForwardInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ForwardInfo 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.networkmanagement.v1.ForwardInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ForwardInfo 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.networkmanagement.v1.ForwardInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ForwardInfo 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.networkmanagement.v1.ForwardInfo 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; + } + /** + * + * + *
+   * Details of the final state "forward" and associated resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ForwardInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.ForwardInfo) + com.google.cloud.networkmanagement.v1.ForwardInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ForwardInfo.class, + com.google.cloud.networkmanagement.v1.ForwardInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.ForwardInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + target_ = 0; + + resourceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardInfo build() { + com.google.cloud.networkmanagement.v1.ForwardInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardInfo buildPartial() { + com.google.cloud.networkmanagement.v1.ForwardInfo result = + new com.google.cloud.networkmanagement.v1.ForwardInfo(this); + result.target_ = target_; + result.resourceUri_ = resourceUri_; + 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.networkmanagement.v1.ForwardInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.ForwardInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.ForwardInfo other) { + if (other == com.google.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance()) + return this; + if (other.target_ != 0) { + setTargetValue(other.getTargetValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.ForwardInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.ForwardInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int target_ = 0; + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @param value The enum numeric value on the wire for target to set. + * @return This builder for chaining. + */ + public Builder setTargetValue(int value) { + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardInfo.Target getTarget() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.ForwardInfo.Target result = + com.google.cloud.networkmanagement.v1.ForwardInfo.Target.valueOf(target_); + return result == null + ? com.google.cloud.networkmanagement.v1.ForwardInfo.Target.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(com.google.cloud.networkmanagement.v1.ForwardInfo.Target value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + + resourceUri_ = getDefaultInstance().getResourceUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUri_ = value; + 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.networkmanagement.v1.ForwardInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.ForwardInfo) + private static final com.google.cloud.networkmanagement.v1.ForwardInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.ForwardInfo(); + } + + public static com.google.cloud.networkmanagement.v1.ForwardInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForwardInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ForwardInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.ForwardInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardInfoOrBuilder.java new file mode 100644 index 00000000..652e8b2b --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface ForwardInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.ForwardInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + int getTargetValue(); + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * + * @return The target. + */ + com.google.cloud.networkmanagement.v1.ForwardInfo.Target getTarget(); + + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardingRuleInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardingRuleInfo.java new file mode 100644 index 00000000..770b3c1b --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardingRuleInfo.java @@ -0,0 +1,1711 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine forwarding rule.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ForwardingRuleInfo} + */ +public final class ForwardingRuleInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.ForwardingRuleInfo) + ForwardingRuleInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForwardingRuleInfo.newBuilder() to construct. + private ForwardingRuleInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ForwardingRuleInfo() { + displayName_ = ""; + uri_ = ""; + matchedProtocol_ = ""; + matchedPortRange_ = ""; + vip_ = ""; + target_ = ""; + networkUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ForwardingRuleInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ForwardingRuleInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + matchedProtocol_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + vip_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + matchedPortRange_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.class, + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHED_PROTOCOL_FIELD_NUMBER = 3; + private volatile java.lang.Object matchedProtocol_; + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The matchedProtocol. + */ + @java.lang.Override + public java.lang.String getMatchedProtocol() { + java.lang.Object ref = matchedProtocol_; + 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(); + matchedProtocol_ = s; + return s; + } + } + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The bytes for matchedProtocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchedProtocolBytes() { + java.lang.Object ref = matchedProtocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHED_PORT_RANGE_FIELD_NUMBER = 6; + private volatile java.lang.Object matchedPortRange_; + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The matchedPortRange. + */ + @java.lang.Override + public java.lang.String getMatchedPortRange() { + java.lang.Object ref = matchedPortRange_; + 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(); + matchedPortRange_ = s; + return s; + } + } + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The bytes for matchedPortRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchedPortRangeBytes() { + java.lang.Object ref = matchedPortRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedPortRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIP_FIELD_NUMBER = 4; + private volatile java.lang.Object vip_; + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The vip. + */ + @java.lang.Override + public java.lang.String getVip() { + java.lang.Object ref = vip_; + 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(); + vip_ = s; + return s; + } + } + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The bytes for vip. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVipBytes() { + java.lang.Object ref = vip_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_FIELD_NUMBER = 5; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @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; + } + } + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @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 NETWORK_URI_FIELD_NUMBER = 7; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getMatchedProtocolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, matchedProtocol_); + } + if (!getVipBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, vip_); + } + if (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, target_); + } + if (!getMatchedPortRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, matchedPortRange_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getMatchedProtocolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, matchedProtocol_); + } + if (!getVipBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, vip_); + } + if (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, target_); + } + if (!getMatchedPortRangeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, matchedPortRange_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, networkUri_); + } + size += unknownFields.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.networkmanagement.v1.ForwardingRuleInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo other = + (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getMatchedProtocol().equals(other.getMatchedProtocol())) return false; + if (!getMatchedPortRange().equals(other.getMatchedPortRange())) return false; + if (!getVip().equals(other.getVip())) return false; + if (!getTarget().equals(other.getTarget())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + MATCHED_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getMatchedProtocol().hashCode(); + hash = (37 * hash) + MATCHED_PORT_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getMatchedPortRange().hashCode(); + hash = (37 * hash) + VIP_FIELD_NUMBER; + hash = (53 * hash) + getVip().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ForwardingRuleInfo 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.networkmanagement.v1.ForwardingRuleInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ForwardingRuleInfo 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.networkmanagement.v1.ForwardingRuleInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.ForwardingRuleInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ForwardingRuleInfo 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.networkmanagement.v1.ForwardingRuleInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ForwardingRuleInfo 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.networkmanagement.v1.ForwardingRuleInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ForwardingRuleInfo 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.networkmanagement.v1.ForwardingRuleInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine forwarding rule.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ForwardingRuleInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.ForwardingRuleInfo) + com.google.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.class, + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + matchedProtocol_ = ""; + + matchedPortRange_ = ""; + + vip_ = ""; + + target_ = ""; + + networkUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardingRuleInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardingRuleInfo build() { + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardingRuleInfo buildPartial() { + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo result = + new com.google.cloud.networkmanagement.v1.ForwardingRuleInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.matchedProtocol_ = matchedProtocol_; + result.matchedPortRange_ = matchedPortRange_; + result.vip_ = vip_; + result.target_ = target_; + result.networkUri_ = networkUri_; + 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.networkmanagement.v1.ForwardingRuleInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.ForwardingRuleInfo other) { + if (other == com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getMatchedProtocol().isEmpty()) { + matchedProtocol_ = other.matchedProtocol_; + onChanged(); + } + if (!other.getMatchedPortRange().isEmpty()) { + matchedPortRange_ = other.matchedPortRange_; + onChanged(); + } + if (!other.getVip().isEmpty()) { + vip_ = other.vip_; + onChanged(); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object matchedProtocol_ = ""; + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @return The matchedProtocol. + */ + public java.lang.String getMatchedProtocol() { + java.lang.Object ref = matchedProtocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedProtocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @return The bytes for matchedProtocol. + */ + public com.google.protobuf.ByteString getMatchedProtocolBytes() { + java.lang.Object ref = matchedProtocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @param value The matchedProtocol to set. + * @return This builder for chaining. + */ + public Builder setMatchedProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + matchedProtocol_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @return This builder for chaining. + */ + public Builder clearMatchedProtocol() { + + matchedProtocol_ = getDefaultInstance().getMatchedProtocol(); + onChanged(); + return this; + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @param value The bytes for matchedProtocol to set. + * @return This builder for chaining. + */ + public Builder setMatchedProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + matchedProtocol_ = value; + onChanged(); + return this; + } + + private java.lang.Object matchedPortRange_ = ""; + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @return The matchedPortRange. + */ + public java.lang.String getMatchedPortRange() { + java.lang.Object ref = matchedPortRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedPortRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @return The bytes for matchedPortRange. + */ + public com.google.protobuf.ByteString getMatchedPortRangeBytes() { + java.lang.Object ref = matchedPortRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedPortRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @param value The matchedPortRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedPortRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + matchedPortRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @return This builder for chaining. + */ + public Builder clearMatchedPortRange() { + + matchedPortRange_ = getDefaultInstance().getMatchedPortRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @param value The bytes for matchedPortRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedPortRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + matchedPortRange_ = value; + onChanged(); + return this; + } + + private java.lang.Object vip_ = ""; + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @return The vip. + */ + public java.lang.String getVip() { + java.lang.Object ref = vip_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vip_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @return The bytes for vip. + */ + public com.google.protobuf.ByteString getVipBytes() { + java.lang.Object ref = vip_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @param value The vip to set. + * @return This builder for chaining. + */ + public Builder setVip(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vip_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @return This builder for chaining. + */ + public Builder clearVip() { + + vip_ = getDefaultInstance().getVip(); + onChanged(); + return this; + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @param value The bytes for vip to set. + * @return This builder for chaining. + */ + public Builder setVipBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vip_ = value; + onChanged(); + return this; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @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; + } + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @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; + } + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + 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.networkmanagement.v1.ForwardingRuleInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.ForwardingRuleInfo) + private static final com.google.cloud.networkmanagement.v1.ForwardingRuleInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.ForwardingRuleInfo(); + } + + public static com.google.cloud.networkmanagement.v1.ForwardingRuleInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForwardingRuleInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ForwardingRuleInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.ForwardingRuleInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardingRuleInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardingRuleInfoOrBuilder.java new file mode 100644 index 00000000..9c8c5c37 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ForwardingRuleInfoOrBuilder.java @@ -0,0 +1,200 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface ForwardingRuleInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.ForwardingRuleInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The matchedProtocol. + */ + java.lang.String getMatchedProtocol(); + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The bytes for matchedProtocol. + */ + com.google.protobuf.ByteString getMatchedProtocolBytes(); + + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The matchedPortRange. + */ + java.lang.String getMatchedPortRange(); + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The bytes for matchedPortRange. + */ + com.google.protobuf.ByteString getMatchedPortRangeBytes(); + + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The vip. + */ + java.lang.String getVip(); + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The bytes for vip. + */ + com.google.protobuf.ByteString getVipBytes(); + + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GKEMasterInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GKEMasterInfo.java new file mode 100644 index 00000000..ecbaddd0 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GKEMasterInfo.java @@ -0,0 +1,1175 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Google Kubernetes Engine (GKE)
+ * cluster master.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.GKEMasterInfo} + */ +public final class GKEMasterInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.GKEMasterInfo) + GKEMasterInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use GKEMasterInfo.newBuilder() to construct. + private GKEMasterInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GKEMasterInfo() { + clusterUri_ = ""; + clusterNetworkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GKEMasterInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GKEMasterInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + clusterUri_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + clusterNetworkUri_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + internalIp_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalIp_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.GKEMasterInfo.class, + com.google.cloud.networkmanagement.v1.GKEMasterInfo.Builder.class); + } + + public static final int CLUSTER_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object clusterUri_; + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The clusterUri. + */ + @java.lang.Override + public java.lang.String getClusterUri() { + java.lang.Object ref = clusterUri_; + 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(); + clusterUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The bytes for clusterUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterUriBytes() { + java.lang.Object ref = clusterUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_NETWORK_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object clusterNetworkUri_; + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The clusterNetworkUri. + */ + @java.lang.Override + public java.lang.String getClusterNetworkUri() { + java.lang.Object ref = clusterNetworkUri_; + 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(); + clusterNetworkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The bytes for clusterNetworkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterNetworkUriBytes() { + java.lang.Object ref = clusterNetworkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_FIELD_NUMBER = 5; + private volatile java.lang.Object internalIp_; + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + @java.lang.Override + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + 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(); + internalIp_ = s; + return s; + } + } + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 6; + private volatile java.lang.Object externalIp_; + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + 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(); + externalIp_ = s; + return s; + } + } + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = 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 (!getClusterUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterUri_); + } + if (!getClusterNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterNetworkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalIp_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getClusterUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterUri_); + } + if (!getClusterNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterNetworkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalIp_); + } + size += unknownFields.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.networkmanagement.v1.GKEMasterInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.GKEMasterInfo other = + (com.google.cloud.networkmanagement.v1.GKEMasterInfo) obj; + + if (!getClusterUri().equals(other.getClusterUri())) return false; + if (!getClusterNetworkUri().equals(other.getClusterNetworkUri())) return false; + if (!getInternalIp().equals(other.getInternalIp())) return false; + if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CLUSTER_URI_FIELD_NUMBER; + hash = (53 * hash) + getClusterUri().hashCode(); + hash = (37 * hash) + CLUSTER_NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getClusterNetworkUri().hashCode(); + hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getInternalIp().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.GKEMasterInfo 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.networkmanagement.v1.GKEMasterInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.GKEMasterInfo 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.networkmanagement.v1.GKEMasterInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.GKEMasterInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.GKEMasterInfo 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.networkmanagement.v1.GKEMasterInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.GKEMasterInfo 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.networkmanagement.v1.GKEMasterInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.GKEMasterInfo 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.networkmanagement.v1.GKEMasterInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Google Kubernetes Engine (GKE)
+   * cluster master.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.GKEMasterInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.GKEMasterInfo) + com.google.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.GKEMasterInfo.class, + com.google.cloud.networkmanagement.v1.GKEMasterInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.GKEMasterInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + clusterUri_ = ""; + + clusterNetworkUri_ = ""; + + internalIp_ = ""; + + externalIp_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GKEMasterInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GKEMasterInfo build() { + com.google.cloud.networkmanagement.v1.GKEMasterInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GKEMasterInfo buildPartial() { + com.google.cloud.networkmanagement.v1.GKEMasterInfo result = + new com.google.cloud.networkmanagement.v1.GKEMasterInfo(this); + result.clusterUri_ = clusterUri_; + result.clusterNetworkUri_ = clusterNetworkUri_; + result.internalIp_ = internalIp_; + result.externalIp_ = externalIp_; + 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.networkmanagement.v1.GKEMasterInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.GKEMasterInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.GKEMasterInfo other) { + if (other == com.google.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance()) + return this; + if (!other.getClusterUri().isEmpty()) { + clusterUri_ = other.clusterUri_; + onChanged(); + } + if (!other.getClusterNetworkUri().isEmpty()) { + clusterNetworkUri_ = other.clusterNetworkUri_; + onChanged(); + } + if (!other.getInternalIp().isEmpty()) { + internalIp_ = other.internalIp_; + onChanged(); + } + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.GKEMasterInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.GKEMasterInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object clusterUri_ = ""; + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @return The clusterUri. + */ + public java.lang.String getClusterUri() { + java.lang.Object ref = clusterUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @return The bytes for clusterUri. + */ + public com.google.protobuf.ByteString getClusterUriBytes() { + java.lang.Object ref = clusterUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @param value The clusterUri to set. + * @return This builder for chaining. + */ + public Builder setClusterUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearClusterUri() { + + clusterUri_ = getDefaultInstance().getClusterUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @param value The bytes for clusterUri to set. + * @return This builder for chaining. + */ + public Builder setClusterUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object clusterNetworkUri_ = ""; + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @return The clusterNetworkUri. + */ + public java.lang.String getClusterNetworkUri() { + java.lang.Object ref = clusterNetworkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterNetworkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @return The bytes for clusterNetworkUri. + */ + public com.google.protobuf.ByteString getClusterNetworkUriBytes() { + java.lang.Object ref = clusterNetworkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @param value The clusterNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setClusterNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterNetworkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearClusterNetworkUri() { + + clusterNetworkUri_ = getDefaultInstance().getClusterNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @param value The bytes for clusterNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setClusterNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterNetworkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object internalIp_ = ""; + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + internalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearInternalIp() { + + internalIp_ = getDefaultInstance().getInternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The bytes for internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + internalIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + + externalIp_ = getDefaultInstance().getExternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalIp_ = value; + 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.networkmanagement.v1.GKEMasterInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.GKEMasterInfo) + private static final com.google.cloud.networkmanagement.v1.GKEMasterInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.GKEMasterInfo(); + } + + public static com.google.cloud.networkmanagement.v1.GKEMasterInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GKEMasterInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GKEMasterInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.GKEMasterInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GKEMasterInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GKEMasterInfoOrBuilder.java new file mode 100644 index 00000000..55126798 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GKEMasterInfoOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface GKEMasterInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.GKEMasterInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The clusterUri. + */ + java.lang.String getClusterUri(); + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The bytes for clusterUri. + */ + com.google.protobuf.ByteString getClusterUriBytes(); + + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The clusterNetworkUri. + */ + java.lang.String getClusterNetworkUri(); + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The bytes for clusterNetworkUri. + */ + com.google.protobuf.ByteString getClusterNetworkUriBytes(); + + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + java.lang.String getInternalIp(); + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + com.google.protobuf.ByteString getInternalIpBytes(); + + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GetConnectivityTestRequest.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GetConnectivityTestRequest.java new file mode 100644 index 00000000..48c9d1a5 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GetConnectivityTestRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Request for the `GetConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.GetConnectivityTestRequest} + */ +public final class GetConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.GetConnectivityTestRequest) + GetConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetConnectivityTestRequest.newBuilder() to construct. + private GetConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetConnectivityTestRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. `ConnectivityTest` resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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. `ConnectivityTest` resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.networkmanagement.v1.GetConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest 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.networkmanagement.v1.GetConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest 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.networkmanagement.v1.GetConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest 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.networkmanagement.v1.GetConnectivityTestRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest 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.networkmanagement.v1.GetConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest 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.networkmanagement.v1.GetConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `GetConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.GetConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.GetConnectivityTestRequest) + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(this); + result.name_ = name_; + 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.networkmanagement.v1.GetConnectivityTestRequest) { + return mergeFrom((com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + 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.networkmanagement.v1.GetConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.GetConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1.GetConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.GetConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GetConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GetConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..ccd54598 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/GetConnectivityTestRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +public interface GetConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.GetConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. `ConnectivityTest` resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. `ConnectivityTest` resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/InstanceInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/InstanceInfo.java new file mode 100644 index 00000000..ecaca8b9 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/InstanceInfo.java @@ -0,0 +1,1997 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine instance.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.InstanceInfo} + */ +public final class InstanceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.InstanceInfo) + InstanceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceInfo.newBuilder() to construct. + private InstanceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceInfo() { + displayName_ = ""; + uri_ = ""; + interface_ = ""; + networkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + serviceAccount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InstanceInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + interface_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + internalIp_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalIp_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + networkTags_.add(s); + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + networkTags_ = networkTags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_InstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_InstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.InstanceInfo.class, + com.google.cloud.networkmanagement.v1.InstanceInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACE_FIELD_NUMBER = 3; + private volatile java.lang.Object interface_; + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @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 network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @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 NETWORK_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_FIELD_NUMBER = 5; + private volatile java.lang.Object internalIp_; + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + @java.lang.Override + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + 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(); + internalIp_ = s; + return s; + } + } + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 6; + private volatile java.lang.Object externalIp_; + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + 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(); + externalIp_ = s; + return s; + } + } + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_TAGS_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList networkTags_; + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_; + } + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 8; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The serviceAccount. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getInterfaceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, interface_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, networkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalIp_); + } + for (int i = 0; i < networkTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkTags_.getRaw(i)); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, serviceAccount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getInterfaceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, interface_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, networkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalIp_); + } + { + int dataSize = 0; + for (int i = 0; i < networkTags_.size(); i++) { + dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getNetworkTagsList().size(); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, serviceAccount_); + } + size += unknownFields.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.networkmanagement.v1.InstanceInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.InstanceInfo other = + (com.google.cloud.networkmanagement.v1.InstanceInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getInterface().equals(other.getInterface())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getInternalIp().equals(other.getInternalIp())) return false; + if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterface().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getInternalIp().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + if (getNetworkTagsCount() > 0) { + hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTagsList().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.InstanceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.InstanceInfo 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.networkmanagement.v1.InstanceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.InstanceInfo 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.networkmanagement.v1.InstanceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.InstanceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.InstanceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.InstanceInfo 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.networkmanagement.v1.InstanceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.InstanceInfo 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.networkmanagement.v1.InstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.InstanceInfo 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.networkmanagement.v1.InstanceInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine instance.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.InstanceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.InstanceInfo) + com.google.cloud.networkmanagement.v1.InstanceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_InstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_InstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.InstanceInfo.class, + com.google.cloud.networkmanagement.v1.InstanceInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.InstanceInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + interface_ = ""; + + networkUri_ = ""; + + internalIp_ = ""; + + externalIp_ = ""; + + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAccount_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_InstanceInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.InstanceInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.InstanceInfo build() { + com.google.cloud.networkmanagement.v1.InstanceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.InstanceInfo buildPartial() { + com.google.cloud.networkmanagement.v1.InstanceInfo result = + new com.google.cloud.networkmanagement.v1.InstanceInfo(this); + int from_bitField0_ = bitField0_; + result.displayName_ = displayName_; + result.uri_ = uri_; + result.interface_ = interface_; + result.networkUri_ = networkUri_; + result.internalIp_ = internalIp_; + result.externalIp_ = externalIp_; + if (((bitField0_ & 0x00000001) != 0)) { + networkTags_ = networkTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.networkTags_ = networkTags_; + result.serviceAccount_ = serviceAccount_; + 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.networkmanagement.v1.InstanceInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.InstanceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.InstanceInfo other) { + if (other == com.google.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getInterface().isEmpty()) { + interface_ = other.interface_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.getInternalIp().isEmpty()) { + internalIp_ = other.internalIp_; + onChanged(); + } + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + onChanged(); + } + if (!other.networkTags_.isEmpty()) { + if (networkTags_.isEmpty()) { + networkTags_ = other.networkTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNetworkTagsIsMutable(); + networkTags_.addAll(other.networkTags_); + } + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.InstanceInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.InstanceInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object interface_ = ""; + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @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 network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @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 network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @return This builder for chaining. + */ + public Builder clearInterface() { + + interface_ = getDefaultInstance().getInterface(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object internalIp_ = ""; + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + internalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearInternalIp() { + + internalIp_ = getDefaultInstance().getInternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The bytes for internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + internalIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + + externalIp_ = getDefaultInstance().getExternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalIp_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList networkTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNetworkTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. + */ + public Builder setNetworkTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param value The networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param values The networkTags to add. + * @return This builder for chaining. + */ + public Builder addAllNetworkTags(java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @return This builder for chaining. + */ + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param value The bytes of the networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The serviceAccount. + */ + @java.lang.Deprecated + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + 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.networkmanagement.v1.InstanceInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.InstanceInfo) + private static final com.google.cloud.networkmanagement.v1.InstanceInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.InstanceInfo(); + } + + public static com.google.cloud.networkmanagement.v1.InstanceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstanceInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.InstanceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/InstanceInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/InstanceInfoOrBuilder.java new file mode 100644 index 00000000..b9fc7b82 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/InstanceInfoOrBuilder.java @@ -0,0 +1,253 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface InstanceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.InstanceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @return The interface. + */ + java.lang.String getInterface(); + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @return The bytes for interface. + */ + com.google.protobuf.ByteString getInterfaceBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + java.lang.String getInternalIp(); + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + com.google.protobuf.ByteString getInternalIpBytes(); + + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); + + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return A list containing the networkTags. + */ + java.util.List getNetworkTagsList(); + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return The count of networkTags. + */ + int getNetworkTagsCount(); + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + java.lang.String getNetworkTags(int index); + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + com.google.protobuf.ByteString getNetworkTagsBytes(int index); + + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The serviceAccount. + */ + @java.lang.Deprecated + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getServiceAccountBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsRequest.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsRequest.java new file mode 100644 index 00000000..ef189825 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsRequest.java @@ -0,0 +1,1387 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Request for the `ListConnectivityTests` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} + */ +public final class ListConnectivityTestsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) + ListConnectivityTestsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConnectivityTestsRequest.newBuilder() to construct. + private ListConnectivityTestsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConnectivityTestsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConnectivityTestsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListConnectivityTestsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.class, + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource of the Connectivity Tests:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource of the Connectivity Tests:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_; + /** + * + * + *
+   * Number of `ConnectivityTests` to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Page token from an earlier query, as returned in `next_page_token`.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Page token from an earlier query, as returned in `next_page_token`.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Lists the `ConnectivityTests` that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+   * `<=`,
+   * `>=`,
+   * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+   * roughly synonymous with equality). <field> can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+   * - Filter by labels:
+   *   - Resources that have a key called `foo`
+   *     labels.foo:*
+   *   - Resources that have a key called `foo` whose value is `bar`
+   *     labels.foo = bar
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Lists the `ConnectivityTests` that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+   * `<=`,
+   * `>=`,
+   * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+   * roughly synonymous with equality). <field> can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+   * - Filter by labels:
+   *   - Resources that have a key called `foo`
+   *     labels.foo:*
+   *   - Resources that have a key called `foo` whose value is `bar`
+   *     labels.foo = bar
+   * 
+ * + * 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; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.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.networkmanagement.v1.ListConnectivityTestsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest other = + (com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) 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 (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest 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.networkmanagement.v1.ListConnectivityTestsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest 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.networkmanagement.v1.ListConnectivityTestsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest 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.networkmanagement.v1.ListConnectivityTestsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + 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.networkmanagement.v1.ListConnectivityTestsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest 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.networkmanagement.v1.ListConnectivityTestsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `ListConnectivityTests` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.class, + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest build() { + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest buildPartial() { + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest result = + new com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + 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.networkmanagement.v1.ListConnectivityTestsRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest other) { + if (other + == com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of `ConnectivityTests` to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of `ConnectivityTests` to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of `ConnectivityTests` to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * 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; + 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.networkmanagement.v1.ListConnectivityTestsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) + private static final com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConnectivityTestsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListConnectivityTestsRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.ListConnectivityTestsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsRequestOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsRequestOrBuilder.java new file mode 100644 index 00000000..100dfd43 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +public interface ListConnectivityTestsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the Connectivity Tests:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource of the Connectivity Tests:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Number of `ConnectivityTests` to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Page token from an earlier query, as returned in `next_page_token`.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Page token from an earlier query, as returned in `next_page_token`.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Lists the `ConnectivityTests` that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+   * `<=`,
+   * `>=`,
+   * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+   * roughly synonymous with equality). <field> can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+   * - Filter by labels:
+   *   - Resources that have a key called `foo`
+   *     labels.foo:*
+   *   - Resources that have a key called `foo` whose value is `bar`
+   *     labels.foo = bar
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Lists the `ConnectivityTests` that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+   * `<=`,
+   * `>=`,
+   * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+   * roughly synonymous with equality). <field> can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+   * - Filter by labels:
+   *   - Resources that have a key called `foo`
+   *     labels.foo:*
+   *   - Resources that have a key called `foo` whose value is `bar`
+   *     labels.foo = bar
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsResponse.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsResponse.java new file mode 100644 index 00000000..2530719a --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsResponse.java @@ -0,0 +1,1431 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Response for the `ListConnectivityTests` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} + */ +public final class ListConnectivityTestsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) + ListConnectivityTestsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConnectivityTestsResponse.newBuilder() to construct. + private ListConnectivityTestsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConnectivityTestsResponse() { + resources_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConnectivityTestsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListConnectivityTestsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = + new java.util.ArrayList< + com.google.cloud.networkmanagement.v1.ConnectivityTest>(); + mutable_bitField0_ |= 0x00000001; + } + resources_.add( + input.readMessage( + com.google.cloud.networkmanagement.v1.ConnectivityTest.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.class, + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.Builder.class); + } + + public static final int RESOURCES_FIELD_NUMBER = 1; + private java.util.List resources_; + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public java.util.List getResourcesList() { + return resources_; + } + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public java.util.List + getResourcesOrBuilderList() { + return resources_; + } + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public int getResourcesCount() { + return resources_.size(); + } + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ConnectivityTest getResources(int index) { + return resources_.get(index); + } + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getResourcesOrBuilder( + int index) { + return resources_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Page token to fetch the next set of Connectivity Tests.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Page token to fetch the next set of Connectivity Tests.
+   * 
+ * + * 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; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * 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 (when querying all locations with `-`).
+   * 
+ * + * 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 < resources_.size(); i++) { + output.writeMessage(1, resources_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < resources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, resources_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 += unknownFields.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.networkmanagement.v1.ListConnectivityTestsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse other = + (com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) obj; + + if (!getResourcesList().equals(other.getResourcesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse 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.networkmanagement.v1.ListConnectivityTestsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse 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.networkmanagement.v1.ListConnectivityTestsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse 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.networkmanagement.v1.ListConnectivityTestsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + 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.networkmanagement.v1.ListConnectivityTestsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse 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.networkmanagement.v1.ListConnectivityTestsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for the `ListConnectivityTests` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.class, + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resourcesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse build() { + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse buildPartial() { + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse result = + new com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(this); + int from_bitField0_ = bitField0_; + if (resourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + 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.networkmanagement.v1.ListConnectivityTestsResponse) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse other) { + if (other + == com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + .getDefaultInstance()) return this; + if (resourcesBuilder_ == null) { + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + } else { + if (!other.resources_.isEmpty()) { + if (resourcesBuilder_.isEmpty()) { + resourcesBuilder_.dispose(); + resourcesBuilder_ = null; + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + resourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourcesFieldBuilder() + : null; + } else { + resourcesBuilder_.addAllMessages(other.resources_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List resources_ = + java.util.Collections.emptyList(); + + private void ensureResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resources_ = + new java.util.ArrayList( + resources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ConnectivityTest, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder> + resourcesBuilder_; + + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public java.util.List + getResourcesList() { + if (resourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resources_); + } else { + return resourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public int getResourcesCount() { + if (resourcesBuilder_ == null) { + return resources_.size(); + } else { + return resourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTest getResources(int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public Builder setResources( + int index, com.google.cloud.networkmanagement.v1.ConnectivityTest value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public Builder setResources( + int index, com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.set(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public Builder addResources(com.google.cloud.networkmanagement.v1.ConnectivityTest value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + } else { + resourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public Builder addResources( + int index, com.google.cloud.networkmanagement.v1.ConnectivityTest value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(index, value); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public Builder addResources( + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public Builder addResources( + int index, com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public Builder addAllResources( + java.lang.Iterable + values) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + onChanged(); + } else { + resourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public Builder removeResources(int index) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.remove(index); + onChanged(); + } else { + resourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder getResourcesBuilder( + int index) { + return getResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getResourcesOrBuilder( + int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public java.util.List + getResourcesOrBuilderList() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resources_); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder addResourcesBuilder() { + return getResourcesFieldBuilder() + .addBuilder(com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance()); + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder addResourcesBuilder( + int index) { + return getResourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance()); + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + public java.util.List + getResourcesBuilderList() { + return getResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ConnectivityTest, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ConnectivityTest, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder>( + resources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * 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; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * 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 (when querying all locations with `-`).
+     * 
+ * + * 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 (when querying all locations with `-`).
+     * 
+ * + * 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); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * 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); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * 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_); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * 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); + 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.networkmanagement.v1.ListConnectivityTestsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) + private static final com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(); + } + + public static com.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConnectivityTestsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListConnectivityTestsResponse(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.ListConnectivityTestsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsResponseOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsResponseOrBuilder.java new file mode 100644 index 00000000..e5c8cb79 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ListConnectivityTestsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +public interface ListConnectivityTestsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + java.util.List getResourcesList(); + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + com.google.cloud.networkmanagement.v1.ConnectivityTest getResources(int index); + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + int getResourcesCount(); + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + java.util.List + getResourcesOrBuilderList(); + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getResourcesOrBuilder(int index); + + /** + * + * + *
+   * Page token to fetch the next set of Connectivity Tests.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Page token to fetch the next set of Connectivity Tests.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * 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 (when querying all locations with `-`).
+   * 
+ * + * 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/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerBackend.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerBackend.java new file mode 100644 index 00000000..becbd99b --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerBackend.java @@ -0,0 +1,1736 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a specific load balancer backend.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.LoadBalancerBackend} + */ +public final class LoadBalancerBackend extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.LoadBalancerBackend) + LoadBalancerBackendOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoadBalancerBackend.newBuilder() to construct. + private LoadBalancerBackend(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoadBalancerBackend() { + displayName_ = ""; + uri_ = ""; + healthCheckFirewallState_ = 0; + healthCheckAllowingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + healthCheckBlockingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoadBalancerBackend(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LoadBalancerBackend( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + healthCheckFirewallState_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + healthCheckAllowingFirewallRules_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + healthCheckAllowingFirewallRules_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + healthCheckBlockingFirewallRules_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + healthCheckBlockingFirewallRules_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + healthCheckAllowingFirewallRules_ = healthCheckAllowingFirewallRules_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + healthCheckBlockingFirewallRules_ = healthCheckBlockingFirewallRules_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.class, + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder.class); + } + + /** + * + * + *
+   * State of a health check firewall configuration:
+   * 
+ * + * Protobuf enum {@code + * google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState} + */ + public enum HealthCheckFirewallState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State is unspecified. Default state if not populated.
+     * 
+ * + * HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + */ + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * There are configured firewall rules to allow health check probes to the
+     * backend.
+     * 
+ * + * CONFIGURED = 1; + */ + CONFIGURED(1), + /** + * + * + *
+     * There are firewall rules configured to allow partial health check ranges
+     * or block all health check ranges.
+     * If a health check probe is sent from denied IP ranges,
+     * the health check to the backend will fail. Then, the backend will be
+     * marked unhealthy and will not receive traffic sent to the load balancer.
+     * 
+ * + * MISCONFIGURED = 2; + */ + MISCONFIGURED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State is unspecified. Default state if not populated.
+     * 
+ * + * HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + */ + public static final int HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * There are configured firewall rules to allow health check probes to the
+     * backend.
+     * 
+ * + * CONFIGURED = 1; + */ + public static final int CONFIGURED_VALUE = 1; + /** + * + * + *
+     * There are firewall rules configured to allow partial health check ranges
+     * or block all health check ranges.
+     * If a health check probe is sent from denied IP ranges,
+     * the health check to the backend will fail. Then, the backend will be
+     * marked unhealthy and will not receive traffic sent to the load balancer.
+     * 
+ * + * MISCONFIGURED = 2; + */ + public static final int MISCONFIGURED_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 HealthCheckFirewallState 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 HealthCheckFirewallState forNumber(int value) { + switch (value) { + case 0: + return HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED; + case 1: + return CONFIGURED; + case 2: + return MISCONFIGURED; + 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 HealthCheckFirewallState findValueByNumber(int number) { + return HealthCheckFirewallState.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.networkmanagement.v1.LoadBalancerBackend.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HealthCheckFirewallState[] VALUES = values(); + + public static HealthCheckFirewallState 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 HealthCheckFirewallState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState) + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEALTH_CHECK_FIREWALL_STATE_FIELD_NUMBER = 3; + private int healthCheckFirewallState_; + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The enum numeric value on the wire for healthCheckFirewallState. + */ + @java.lang.Override + public int getHealthCheckFirewallStateValue() { + return healthCheckFirewallState_; + } + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The healthCheckFirewallState. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + getHealthCheckFirewallState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState result = + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState.valueOf( + healthCheckFirewallState_); + return result == null + ? com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + .UNRECOGNIZED + : result; + } + + public static final int HEALTH_CHECK_ALLOWING_FIREWALL_RULES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList healthCheckAllowingFirewallRules_; + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return A list containing the healthCheckAllowingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckAllowingFirewallRulesList() { + return healthCheckAllowingFirewallRules_; + } + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return The count of healthCheckAllowingFirewallRules. + */ + public int getHealthCheckAllowingFirewallRulesCount() { + return healthCheckAllowingFirewallRules_.size(); + } + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the element to return. + * @return The healthCheckAllowingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckAllowingFirewallRules(int index) { + return healthCheckAllowingFirewallRules_.get(index); + } + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckAllowingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckAllowingFirewallRulesBytes(int index) { + return healthCheckAllowingFirewallRules_.getByteString(index); + } + + public static final int HEALTH_CHECK_BLOCKING_FIREWALL_RULES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList healthCheckBlockingFirewallRules_; + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return A list containing the healthCheckBlockingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckBlockingFirewallRulesList() { + return healthCheckBlockingFirewallRules_; + } + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return The count of healthCheckBlockingFirewallRules. + */ + public int getHealthCheckBlockingFirewallRulesCount() { + return healthCheckBlockingFirewallRules_.size(); + } + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the element to return. + * @return The healthCheckBlockingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckBlockingFirewallRules(int index) { + return healthCheckBlockingFirewallRules_.get(index); + } + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckBlockingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckBlockingFirewallRulesBytes(int index) { + return healthCheckBlockingFirewallRules_.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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (healthCheckFirewallState_ + != com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + .HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, healthCheckFirewallState_); + } + for (int i = 0; i < healthCheckAllowingFirewallRules_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 4, healthCheckAllowingFirewallRules_.getRaw(i)); + } + for (int i = 0; i < healthCheckBlockingFirewallRules_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, healthCheckBlockingFirewallRules_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (healthCheckFirewallState_ + != com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + .HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, healthCheckFirewallState_); + } + { + int dataSize = 0; + for (int i = 0; i < healthCheckAllowingFirewallRules_.size(); i++) { + dataSize += computeStringSizeNoTag(healthCheckAllowingFirewallRules_.getRaw(i)); + } + size += dataSize; + size += 1 * getHealthCheckAllowingFirewallRulesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < healthCheckBlockingFirewallRules_.size(); i++) { + dataSize += computeStringSizeNoTag(healthCheckBlockingFirewallRules_.getRaw(i)); + } + size += dataSize; + size += 1 * getHealthCheckBlockingFirewallRulesList().size(); + } + size += unknownFields.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.networkmanagement.v1.LoadBalancerBackend)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.LoadBalancerBackend other = + (com.google.cloud.networkmanagement.v1.LoadBalancerBackend) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (healthCheckFirewallState_ != other.healthCheckFirewallState_) return false; + if (!getHealthCheckAllowingFirewallRulesList() + .equals(other.getHealthCheckAllowingFirewallRulesList())) return false; + if (!getHealthCheckBlockingFirewallRulesList() + .equals(other.getHealthCheckBlockingFirewallRulesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + HEALTH_CHECK_FIREWALL_STATE_FIELD_NUMBER; + hash = (53 * hash) + healthCheckFirewallState_; + if (getHealthCheckAllowingFirewallRulesCount() > 0) { + hash = (37 * hash) + HEALTH_CHECK_ALLOWING_FIREWALL_RULES_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheckAllowingFirewallRulesList().hashCode(); + } + if (getHealthCheckBlockingFirewallRulesCount() > 0) { + hash = (37 * hash) + HEALTH_CHECK_BLOCKING_FIREWALL_RULES_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheckBlockingFirewallRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerBackend 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.networkmanagement.v1.LoadBalancerBackend parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerBackend 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.networkmanagement.v1.LoadBalancerBackend parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerBackend parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerBackend 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.networkmanagement.v1.LoadBalancerBackend parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerBackend 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.networkmanagement.v1.LoadBalancerBackend parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerBackend 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.networkmanagement.v1.LoadBalancerBackend 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a specific load balancer backend.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.LoadBalancerBackend} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.LoadBalancerBackend) + com.google.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.class, + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.LoadBalancerBackend.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + healthCheckFirewallState_ = 0; + + healthCheckAllowingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + healthCheckBlockingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.LoadBalancerBackend.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend build() { + com.google.cloud.networkmanagement.v1.LoadBalancerBackend result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend buildPartial() { + com.google.cloud.networkmanagement.v1.LoadBalancerBackend result = + new com.google.cloud.networkmanagement.v1.LoadBalancerBackend(this); + int from_bitField0_ = bitField0_; + result.displayName_ = displayName_; + result.uri_ = uri_; + result.healthCheckFirewallState_ = healthCheckFirewallState_; + if (((bitField0_ & 0x00000001) != 0)) { + healthCheckAllowingFirewallRules_ = healthCheckAllowingFirewallRules_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.healthCheckAllowingFirewallRules_ = healthCheckAllowingFirewallRules_; + if (((bitField0_ & 0x00000002) != 0)) { + healthCheckBlockingFirewallRules_ = healthCheckBlockingFirewallRules_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.healthCheckBlockingFirewallRules_ = healthCheckBlockingFirewallRules_; + 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.networkmanagement.v1.LoadBalancerBackend) { + return mergeFrom((com.google.cloud.networkmanagement.v1.LoadBalancerBackend) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.LoadBalancerBackend other) { + if (other == com.google.cloud.networkmanagement.v1.LoadBalancerBackend.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (other.healthCheckFirewallState_ != 0) { + setHealthCheckFirewallStateValue(other.getHealthCheckFirewallStateValue()); + } + if (!other.healthCheckAllowingFirewallRules_.isEmpty()) { + if (healthCheckAllowingFirewallRules_.isEmpty()) { + healthCheckAllowingFirewallRules_ = other.healthCheckAllowingFirewallRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.addAll(other.healthCheckAllowingFirewallRules_); + } + onChanged(); + } + if (!other.healthCheckBlockingFirewallRules_.isEmpty()) { + if (healthCheckBlockingFirewallRules_.isEmpty()) { + healthCheckBlockingFirewallRules_ = other.healthCheckBlockingFirewallRules_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.addAll(other.healthCheckBlockingFirewallRules_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.LoadBalancerBackend parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.LoadBalancerBackend) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private int healthCheckFirewallState_ = 0; + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The enum numeric value on the wire for healthCheckFirewallState. + */ + @java.lang.Override + public int getHealthCheckFirewallStateValue() { + return healthCheckFirewallState_; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @param value The enum numeric value on the wire for healthCheckFirewallState to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckFirewallStateValue(int value) { + + healthCheckFirewallState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The healthCheckFirewallState. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + getHealthCheckFirewallState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState result = + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + .valueOf(healthCheckFirewallState_); + return result == null + ? com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @param value The healthCheckFirewallState to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckFirewallState( + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState value) { + if (value == null) { + throw new NullPointerException(); + } + + healthCheckFirewallState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckFirewallState() { + + healthCheckFirewallState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList healthCheckAllowingFirewallRules_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureHealthCheckAllowingFirewallRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + healthCheckAllowingFirewallRules_ = + new com.google.protobuf.LazyStringArrayList(healthCheckAllowingFirewallRules_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return A list containing the healthCheckAllowingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckAllowingFirewallRulesList() { + return healthCheckAllowingFirewallRules_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return The count of healthCheckAllowingFirewallRules. + */ + public int getHealthCheckAllowingFirewallRulesCount() { + return healthCheckAllowingFirewallRules_.size(); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the element to return. + * @return The healthCheckAllowingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckAllowingFirewallRules(int index) { + return healthCheckAllowingFirewallRules_.get(index); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckAllowingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckAllowingFirewallRulesBytes(int index) { + return healthCheckAllowingFirewallRules_.getByteString(index); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index to set the value at. + * @param value The healthCheckAllowingFirewallRules to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckAllowingFirewallRules(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param value The healthCheckAllowingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckAllowingFirewallRules(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param values The healthCheckAllowingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addAllHealthCheckAllowingFirewallRules( + java.lang.Iterable values) { + ensureHealthCheckAllowingFirewallRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, healthCheckAllowingFirewallRules_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckAllowingFirewallRules() { + healthCheckAllowingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param value The bytes of the healthCheckAllowingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckAllowingFirewallRulesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList healthCheckBlockingFirewallRules_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureHealthCheckBlockingFirewallRulesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + healthCheckBlockingFirewallRules_ = + new com.google.protobuf.LazyStringArrayList(healthCheckBlockingFirewallRules_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return A list containing the healthCheckBlockingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckBlockingFirewallRulesList() { + return healthCheckBlockingFirewallRules_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return The count of healthCheckBlockingFirewallRules. + */ + public int getHealthCheckBlockingFirewallRulesCount() { + return healthCheckBlockingFirewallRules_.size(); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the element to return. + * @return The healthCheckBlockingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckBlockingFirewallRules(int index) { + return healthCheckBlockingFirewallRules_.get(index); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckBlockingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckBlockingFirewallRulesBytes(int index) { + return healthCheckBlockingFirewallRules_.getByteString(index); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index to set the value at. + * @param value The healthCheckBlockingFirewallRules to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckBlockingFirewallRules(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param value The healthCheckBlockingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckBlockingFirewallRules(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param values The healthCheckBlockingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addAllHealthCheckBlockingFirewallRules( + java.lang.Iterable values) { + ensureHealthCheckBlockingFirewallRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, healthCheckBlockingFirewallRules_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckBlockingFirewallRules() { + healthCheckBlockingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param value The bytes of the healthCheckBlockingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckBlockingFirewallRulesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.add(value); + 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.networkmanagement.v1.LoadBalancerBackend) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.LoadBalancerBackend) + private static final com.google.cloud.networkmanagement.v1.LoadBalancerBackend DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.LoadBalancerBackend(); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerBackend getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoadBalancerBackend parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LoadBalancerBackend(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.LoadBalancerBackend getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerBackendOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerBackendOrBuilder.java new file mode 100644 index 00000000..7ef01f29 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerBackendOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface LoadBalancerBackendOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.LoadBalancerBackend) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The enum numeric value on the wire for healthCheckFirewallState. + */ + int getHealthCheckFirewallStateValue(); + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The healthCheckFirewallState. + */ + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + getHealthCheckFirewallState(); + + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return A list containing the healthCheckAllowingFirewallRules. + */ + java.util.List getHealthCheckAllowingFirewallRulesList(); + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return The count of healthCheckAllowingFirewallRules. + */ + int getHealthCheckAllowingFirewallRulesCount(); + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the element to return. + * @return The healthCheckAllowingFirewallRules at the given index. + */ + java.lang.String getHealthCheckAllowingFirewallRules(int index); + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckAllowingFirewallRules at the given index. + */ + com.google.protobuf.ByteString getHealthCheckAllowingFirewallRulesBytes(int index); + + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return A list containing the healthCheckBlockingFirewallRules. + */ + java.util.List getHealthCheckBlockingFirewallRulesList(); + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return The count of healthCheckBlockingFirewallRules. + */ + int getHealthCheckBlockingFirewallRulesCount(); + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the element to return. + * @return The healthCheckBlockingFirewallRules at the given index. + */ + java.lang.String getHealthCheckBlockingFirewallRules(int index); + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckBlockingFirewallRules at the given index. + */ + com.google.protobuf.ByteString getHealthCheckBlockingFirewallRulesBytes(int index); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerInfo.java new file mode 100644 index 00000000..86ebe214 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerInfo.java @@ -0,0 +1,2061 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a load balancer.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.LoadBalancerInfo} + */ +public final class LoadBalancerInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.LoadBalancerInfo) + LoadBalancerInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoadBalancerInfo.newBuilder() to construct. + private LoadBalancerInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoadBalancerInfo() { + loadBalancerType_ = 0; + healthCheckUri_ = ""; + backends_ = java.util.Collections.emptyList(); + backendType_ = 0; + backendUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoadBalancerInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LoadBalancerInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + loadBalancerType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + healthCheckUri_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + backends_ = + new java.util.ArrayList< + com.google.cloud.networkmanagement.v1.LoadBalancerBackend>(); + mutable_bitField0_ |= 0x00000001; + } + backends_.add( + input.readMessage( + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.parser(), + extensionRegistry)); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + backendType_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + backendUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + backends_ = java.util.Collections.unmodifiableList(backends_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.class, + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.Builder.class); + } + + /** + * + * + *
+   * The type definition for a load balancer:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType} + */ + public enum LoadBalancerType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + */ + LOAD_BALANCER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Internal TCP/UDP load balancer.
+     * 
+ * + * INTERNAL_TCP_UDP = 1; + */ + INTERNAL_TCP_UDP(1), + /** + * + * + *
+     * Network TCP/UDP load balancer.
+     * 
+ * + * NETWORK_TCP_UDP = 2; + */ + NETWORK_TCP_UDP(2), + /** + * + * + *
+     * HTTP(S) proxy load balancer.
+     * 
+ * + * HTTP_PROXY = 3; + */ + HTTP_PROXY(3), + /** + * + * + *
+     * TCP proxy load balancer.
+     * 
+ * + * TCP_PROXY = 4; + */ + TCP_PROXY(4), + /** + * + * + *
+     * SSL proxy load balancer.
+     * 
+ * + * SSL_PROXY = 5; + */ + SSL_PROXY(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + */ + public static final int LOAD_BALANCER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Internal TCP/UDP load balancer.
+     * 
+ * + * INTERNAL_TCP_UDP = 1; + */ + public static final int INTERNAL_TCP_UDP_VALUE = 1; + /** + * + * + *
+     * Network TCP/UDP load balancer.
+     * 
+ * + * NETWORK_TCP_UDP = 2; + */ + public static final int NETWORK_TCP_UDP_VALUE = 2; + /** + * + * + *
+     * HTTP(S) proxy load balancer.
+     * 
+ * + * HTTP_PROXY = 3; + */ + public static final int HTTP_PROXY_VALUE = 3; + /** + * + * + *
+     * TCP proxy load balancer.
+     * 
+ * + * TCP_PROXY = 4; + */ + public static final int TCP_PROXY_VALUE = 4; + /** + * + * + *
+     * SSL proxy load balancer.
+     * 
+ * + * SSL_PROXY = 5; + */ + public static final int SSL_PROXY_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 LoadBalancerType 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 LoadBalancerType forNumber(int value) { + switch (value) { + case 0: + return LOAD_BALANCER_TYPE_UNSPECIFIED; + case 1: + return INTERNAL_TCP_UDP; + case 2: + return NETWORK_TCP_UDP; + case 3: + return HTTP_PROXY; + case 4: + return TCP_PROXY; + case 5: + return SSL_PROXY; + 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 LoadBalancerType findValueByNumber(int number) { + return LoadBalancerType.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.networkmanagement.v1.LoadBalancerInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final LoadBalancerType[] VALUES = values(); + + public static LoadBalancerType 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 LoadBalancerType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType) + } + + /** + * + * + *
+   * The type definition for a load balancer backend configuration:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType} + */ + public enum BackendType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * BACKEND_TYPE_UNSPECIFIED = 0; + */ + BACKEND_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Backend Service as the load balancer's backend.
+     * 
+ * + * BACKEND_SERVICE = 1; + */ + BACKEND_SERVICE(1), + /** + * + * + *
+     * Target Pool as the load balancer's backend.
+     * 
+ * + * TARGET_POOL = 2; + */ + TARGET_POOL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * BACKEND_TYPE_UNSPECIFIED = 0; + */ + public static final int BACKEND_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Backend Service as the load balancer's backend.
+     * 
+ * + * BACKEND_SERVICE = 1; + */ + public static final int BACKEND_SERVICE_VALUE = 1; + /** + * + * + *
+     * Target Pool as the load balancer's backend.
+     * 
+ * + * TARGET_POOL = 2; + */ + public static final int TARGET_POOL_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 BackendType 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 BackendType forNumber(int value) { + switch (value) { + case 0: + return BACKEND_TYPE_UNSPECIFIED; + case 1: + return BACKEND_SERVICE; + case 2: + return TARGET_POOL; + 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 BackendType findValueByNumber(int number) { + return BackendType.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.networkmanagement.v1.LoadBalancerInfo.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final BackendType[] VALUES = values(); + + public static BackendType 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 BackendType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType) + } + + public static final int LOAD_BALANCER_TYPE_FIELD_NUMBER = 1; + private int loadBalancerType_; + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The enum numeric value on the wire for loadBalancerType. + */ + @java.lang.Override + public int getLoadBalancerTypeValue() { + return loadBalancerType_; + } + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The loadBalancerType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + getLoadBalancerType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType result = + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType.valueOf( + loadBalancerType_); + return result == null + ? com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType.UNRECOGNIZED + : result; + } + + public static final int HEALTH_CHECK_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object healthCheckUri_; + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The healthCheckUri. + */ + @java.lang.Override + public java.lang.String getHealthCheckUri() { + java.lang.Object ref = healthCheckUri_; + 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(); + healthCheckUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The bytes for healthCheckUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHealthCheckUriBytes() { + java.lang.Object ref = healthCheckUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthCheckUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKENDS_FIELD_NUMBER = 3; + private java.util.List backends_; + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public java.util.List + getBackendsList() { + return backends_; + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder> + getBackendsOrBuilderList() { + return backends_; + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public int getBackendsCount() { + return backends_.size(); + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend getBackends(int index) { + return backends_.get(index); + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder getBackendsOrBuilder( + int index) { + return backends_.get(index); + } + + public static final int BACKEND_TYPE_FIELD_NUMBER = 4; + private int backendType_; + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * @return The enum numeric value on the wire for backendType. + */ + @java.lang.Override + public int getBackendTypeValue() { + return backendType_; + } + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * @return The backendType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType getBackendType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType result = + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType.valueOf(backendType_); + return result == null + ? com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType.UNRECOGNIZED + : result; + } + + public static final int BACKEND_URI_FIELD_NUMBER = 5; + private volatile java.lang.Object backendUri_; + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The backendUri. + */ + @java.lang.Override + public java.lang.String getBackendUri() { + java.lang.Object ref = backendUri_; + 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(); + backendUri_ = s; + return s; + } + } + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The bytes for backendUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackendUriBytes() { + java.lang.Object ref = backendUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backendUri_ = 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 (loadBalancerType_ + != com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + .LOAD_BALANCER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, loadBalancerType_); + } + if (!getHealthCheckUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, healthCheckUri_); + } + for (int i = 0; i < backends_.size(); i++) { + output.writeMessage(3, backends_.get(i)); + } + if (backendType_ + != com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType + .BACKEND_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, backendType_); + } + if (!getBackendUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, backendUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (loadBalancerType_ + != com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + .LOAD_BALANCER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, loadBalancerType_); + } + if (!getHealthCheckUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, healthCheckUri_); + } + for (int i = 0; i < backends_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, backends_.get(i)); + } + if (backendType_ + != com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType + .BACKEND_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, backendType_); + } + if (!getBackendUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, backendUri_); + } + size += unknownFields.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.networkmanagement.v1.LoadBalancerInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.LoadBalancerInfo other = + (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) obj; + + if (loadBalancerType_ != other.loadBalancerType_) return false; + if (!getHealthCheckUri().equals(other.getHealthCheckUri())) return false; + if (!getBackendsList().equals(other.getBackendsList())) return false; + if (backendType_ != other.backendType_) return false; + if (!getBackendUri().equals(other.getBackendUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + LOAD_BALANCER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + loadBalancerType_; + hash = (37 * hash) + HEALTH_CHECK_URI_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheckUri().hashCode(); + if (getBackendsCount() > 0) { + hash = (37 * hash) + BACKENDS_FIELD_NUMBER; + hash = (53 * hash) + getBackendsList().hashCode(); + } + hash = (37 * hash) + BACKEND_TYPE_FIELD_NUMBER; + hash = (53 * hash) + backendType_; + hash = (37 * hash) + BACKEND_URI_FIELD_NUMBER; + hash = (53 * hash) + getBackendUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerInfo 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.networkmanagement.v1.LoadBalancerInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerInfo 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.networkmanagement.v1.LoadBalancerInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerInfo 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.networkmanagement.v1.LoadBalancerInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerInfo 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.networkmanagement.v1.LoadBalancerInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerInfo 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.networkmanagement.v1.LoadBalancerInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a load balancer.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.LoadBalancerInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.LoadBalancerInfo) + com.google.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.class, + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.LoadBalancerInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBackendsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + loadBalancerType_ = 0; + + healthCheckUri_ = ""; + + if (backendsBuilder_ == null) { + backends_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + backendsBuilder_.clear(); + } + backendType_ = 0; + + backendUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo build() { + com.google.cloud.networkmanagement.v1.LoadBalancerInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo buildPartial() { + com.google.cloud.networkmanagement.v1.LoadBalancerInfo result = + new com.google.cloud.networkmanagement.v1.LoadBalancerInfo(this); + int from_bitField0_ = bitField0_; + result.loadBalancerType_ = loadBalancerType_; + result.healthCheckUri_ = healthCheckUri_; + if (backendsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backends_ = java.util.Collections.unmodifiableList(backends_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backends_ = backends_; + } else { + result.backends_ = backendsBuilder_.build(); + } + result.backendType_ = backendType_; + result.backendUri_ = backendUri_; + 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.networkmanagement.v1.LoadBalancerInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.LoadBalancerInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.LoadBalancerInfo other) { + if (other == com.google.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance()) + return this; + if (other.loadBalancerType_ != 0) { + setLoadBalancerTypeValue(other.getLoadBalancerTypeValue()); + } + if (!other.getHealthCheckUri().isEmpty()) { + healthCheckUri_ = other.healthCheckUri_; + onChanged(); + } + if (backendsBuilder_ == null) { + if (!other.backends_.isEmpty()) { + if (backends_.isEmpty()) { + backends_ = other.backends_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackendsIsMutable(); + backends_.addAll(other.backends_); + } + onChanged(); + } + } else { + if (!other.backends_.isEmpty()) { + if (backendsBuilder_.isEmpty()) { + backendsBuilder_.dispose(); + backendsBuilder_ = null; + backends_ = other.backends_; + bitField0_ = (bitField0_ & ~0x00000001); + backendsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBackendsFieldBuilder() + : null; + } else { + backendsBuilder_.addAllMessages(other.backends_); + } + } + } + if (other.backendType_ != 0) { + setBackendTypeValue(other.getBackendTypeValue()); + } + if (!other.getBackendUri().isEmpty()) { + backendUri_ = other.backendUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.LoadBalancerInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int loadBalancerType_ = 0; + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The enum numeric value on the wire for loadBalancerType. + */ + @java.lang.Override + public int getLoadBalancerTypeValue() { + return loadBalancerType_; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @param value The enum numeric value on the wire for loadBalancerType to set. + * @return This builder for chaining. + */ + public Builder setLoadBalancerTypeValue(int value) { + + loadBalancerType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The loadBalancerType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + getLoadBalancerType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType result = + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType.valueOf( + loadBalancerType_); + return result == null + ? com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @param value The loadBalancerType to set. + * @return This builder for chaining. + */ + public Builder setLoadBalancerType( + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType value) { + if (value == null) { + throw new NullPointerException(); + } + + loadBalancerType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearLoadBalancerType() { + + loadBalancerType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object healthCheckUri_ = ""; + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @return The healthCheckUri. + */ + public java.lang.String getHealthCheckUri() { + java.lang.Object ref = healthCheckUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + healthCheckUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @return The bytes for healthCheckUri. + */ + public com.google.protobuf.ByteString getHealthCheckUriBytes() { + java.lang.Object ref = healthCheckUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthCheckUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @param value The healthCheckUri to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + healthCheckUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckUri() { + + healthCheckUri_ = getDefaultInstance().getHealthCheckUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @param value The bytes for healthCheckUri to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + healthCheckUri_ = value; + onChanged(); + return this; + } + + private java.util.List backends_ = + java.util.Collections.emptyList(); + + private void ensureBackendsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backends_ = + new java.util.ArrayList( + backends_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.LoadBalancerBackend, + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder, + com.google.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder> + backendsBuilder_; + + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public java.util.List + getBackendsList() { + if (backendsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backends_); + } else { + return backendsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public int getBackendsCount() { + if (backendsBuilder_ == null) { + return backends_.size(); + } else { + return backendsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend getBackends(int index) { + if (backendsBuilder_ == null) { + return backends_.get(index); + } else { + return backendsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public Builder setBackends( + int index, com.google.cloud.networkmanagement.v1.LoadBalancerBackend value) { + if (backendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackendsIsMutable(); + backends_.set(index, value); + onChanged(); + } else { + backendsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public Builder setBackends( + int index, + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder builderForValue) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.set(index, builderForValue.build()); + onChanged(); + } else { + backendsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public Builder addBackends(com.google.cloud.networkmanagement.v1.LoadBalancerBackend value) { + if (backendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackendsIsMutable(); + backends_.add(value); + onChanged(); + } else { + backendsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public Builder addBackends( + int index, com.google.cloud.networkmanagement.v1.LoadBalancerBackend value) { + if (backendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackendsIsMutable(); + backends_.add(index, value); + onChanged(); + } else { + backendsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public Builder addBackends( + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder builderForValue) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.add(builderForValue.build()); + onChanged(); + } else { + backendsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public Builder addBackends( + int index, + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder builderForValue) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.add(index, builderForValue.build()); + onChanged(); + } else { + backendsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public Builder addAllBackends( + java.lang.Iterable + values) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backends_); + onChanged(); + } else { + backendsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public Builder clearBackends() { + if (backendsBuilder_ == null) { + backends_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backendsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public Builder removeBackends(int index) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.remove(index); + onChanged(); + } else { + backendsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder getBackendsBuilder( + int index) { + return getBackendsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public com.google.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder getBackendsOrBuilder( + int index) { + if (backendsBuilder_ == null) { + return backends_.get(index); + } else { + return backendsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public java.util.List< + ? extends com.google.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder> + getBackendsOrBuilderList() { + if (backendsBuilder_ != null) { + return backendsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backends_); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder addBackendsBuilder() { + return getBackendsFieldBuilder() + .addBuilder( + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.getDefaultInstance()); + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder addBackendsBuilder( + int index) { + return getBackendsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.getDefaultInstance()); + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + public java.util.List + getBackendsBuilderList() { + return getBackendsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.LoadBalancerBackend, + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder, + com.google.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder> + getBackendsFieldBuilder() { + if (backendsBuilder_ == null) { + backendsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.LoadBalancerBackend, + com.google.cloud.networkmanagement.v1.LoadBalancerBackend.Builder, + com.google.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder>( + backends_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + backends_ = null; + } + return backendsBuilder_; + } + + private int backendType_ = 0; + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The enum numeric value on the wire for backendType. + */ + @java.lang.Override + public int getBackendTypeValue() { + return backendType_; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @param value The enum numeric value on the wire for backendType to set. + * @return This builder for chaining. + */ + public Builder setBackendTypeValue(int value) { + + backendType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The backendType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType getBackendType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType result = + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType.valueOf(backendType_); + return result == null + ? com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @param value The backendType to set. + * @return This builder for chaining. + */ + public Builder setBackendType( + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType value) { + if (value == null) { + throw new NullPointerException(); + } + + backendType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearBackendType() { + + backendType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object backendUri_ = ""; + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @return The backendUri. + */ + public java.lang.String getBackendUri() { + java.lang.Object ref = backendUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backendUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @return The bytes for backendUri. + */ + public com.google.protobuf.ByteString getBackendUriBytes() { + java.lang.Object ref = backendUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backendUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @param value The backendUri to set. + * @return This builder for chaining. + */ + public Builder setBackendUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + backendUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearBackendUri() { + + backendUri_ = getDefaultInstance().getBackendUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @param value The bytes for backendUri to set. + * @return This builder for chaining. + */ + public Builder setBackendUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + backendUri_ = value; + 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.networkmanagement.v1.LoadBalancerInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.LoadBalancerInfo) + private static final com.google.cloud.networkmanagement.v1.LoadBalancerInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.LoadBalancerInfo(); + } + + public static com.google.cloud.networkmanagement.v1.LoadBalancerInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoadBalancerInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LoadBalancerInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.LoadBalancerInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerInfoOrBuilder.java new file mode 100644 index 00000000..b24cc026 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/LoadBalancerInfoOrBuilder.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface LoadBalancerInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.LoadBalancerInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The enum numeric value on the wire for loadBalancerType. + */ + int getLoadBalancerTypeValue(); + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The loadBalancerType. + */ + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType getLoadBalancerType(); + + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The healthCheckUri. + */ + java.lang.String getHealthCheckUri(); + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The bytes for healthCheckUri. + */ + com.google.protobuf.ByteString getHealthCheckUriBytes(); + + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + java.util.List getBackendsList(); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + com.google.cloud.networkmanagement.v1.LoadBalancerBackend getBackends(int index); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + int getBackendsCount(); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + java.util.List + getBackendsOrBuilderList(); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + com.google.cloud.networkmanagement.v1.LoadBalancerBackendOrBuilder getBackendsOrBuilder( + int index); + + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * @return The enum numeric value on the wire for backendType. + */ + int getBackendTypeValue(); + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * + * @return The backendType. + */ + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType getBackendType(); + + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The backendUri. + */ + java.lang.String getBackendUri(); + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The bytes for backendUri. + */ + com.google.protobuf.ByteString getBackendUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/NetworkInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/NetworkInfo.java new file mode 100644 index 00000000..50b697bf --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/NetworkInfo.java @@ -0,0 +1,994 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine network.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.NetworkInfo} + */ +public final class NetworkInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.NetworkInfo) + NetworkInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkInfo.newBuilder() to construct. + private NetworkInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkInfo() { + displayName_ = ""; + uri_ = ""; + matchedIpRange_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NetworkInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + matchedIpRange_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_NetworkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_NetworkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.NetworkInfo.class, + com.google.cloud.networkmanagement.v1.NetworkInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHED_IP_RANGE_FIELD_NUMBER = 4; + private volatile java.lang.Object matchedIpRange_; + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The matchedIpRange. + */ + @java.lang.Override + public java.lang.String getMatchedIpRange() { + java.lang.Object ref = matchedIpRange_; + 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(); + matchedIpRange_ = s; + return s; + } + } + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The bytes for matchedIpRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchedIpRangeBytes() { + java.lang.Object ref = matchedIpRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedIpRange_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getMatchedIpRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, matchedIpRange_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getMatchedIpRangeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, matchedIpRange_); + } + size += unknownFields.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.networkmanagement.v1.NetworkInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.NetworkInfo other = + (com.google.cloud.networkmanagement.v1.NetworkInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getMatchedIpRange().equals(other.getMatchedIpRange())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + MATCHED_IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getMatchedIpRange().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.NetworkInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.NetworkInfo 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.networkmanagement.v1.NetworkInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.NetworkInfo 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.networkmanagement.v1.NetworkInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.NetworkInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.NetworkInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.NetworkInfo 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.networkmanagement.v1.NetworkInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.NetworkInfo 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.networkmanagement.v1.NetworkInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.NetworkInfo 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.networkmanagement.v1.NetworkInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine network.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.NetworkInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.NetworkInfo) + com.google.cloud.networkmanagement.v1.NetworkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_NetworkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_NetworkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.NetworkInfo.class, + com.google.cloud.networkmanagement.v1.NetworkInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.NetworkInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + matchedIpRange_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_NetworkInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.NetworkInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.NetworkInfo build() { + com.google.cloud.networkmanagement.v1.NetworkInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.NetworkInfo buildPartial() { + com.google.cloud.networkmanagement.v1.NetworkInfo result = + new com.google.cloud.networkmanagement.v1.NetworkInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.matchedIpRange_ = matchedIpRange_; + 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.networkmanagement.v1.NetworkInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.NetworkInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.NetworkInfo other) { + if (other == com.google.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getMatchedIpRange().isEmpty()) { + matchedIpRange_ = other.matchedIpRange_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.NetworkInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.NetworkInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object matchedIpRange_ = ""; + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @return The matchedIpRange. + */ + public java.lang.String getMatchedIpRange() { + java.lang.Object ref = matchedIpRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedIpRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @return The bytes for matchedIpRange. + */ + public com.google.protobuf.ByteString getMatchedIpRangeBytes() { + java.lang.Object ref = matchedIpRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @param value The matchedIpRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + matchedIpRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @return This builder for chaining. + */ + public Builder clearMatchedIpRange() { + + matchedIpRange_ = getDefaultInstance().getMatchedIpRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @param value The bytes for matchedIpRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + matchedIpRange_ = value; + 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.networkmanagement.v1.NetworkInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.NetworkInfo) + private static final com.google.cloud.networkmanagement.v1.NetworkInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.NetworkInfo(); + } + + public static com.google.cloud.networkmanagement.v1.NetworkInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.NetworkInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/NetworkInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/NetworkInfoOrBuilder.java new file mode 100644 index 00000000..ec69c355 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/NetworkInfoOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface NetworkInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.NetworkInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The matchedIpRange. + */ + java.lang.String getMatchedIpRange(); + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The bytes for matchedIpRange. + */ + com.google.protobuf.ByteString getMatchedIpRangeBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/OperationMetadata.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/OperationMetadata.java new file mode 100644 index 00000000..3e7ca26d --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/OperationMetadata.java @@ -0,0 +1,1811 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Metadata describing an [Operation][google.longrunning.Operation]
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.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_ = ""; + statusDetail_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + verb_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + statusDetail_ = s; + break; + } + case 48: + { + cancelRequested_ = input.readBool(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.OperationMetadata.class, + com.google.cloud.networkmanagement.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Target of the operation - for example
+   * projects/project-1/locations/global/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * + * @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; + } + } + /** + * + * + *
+   * Target of the operation - for example
+   * projects/project-1/locations/global/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * + * @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; + private volatile java.lang.Object verb_; + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @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; + } + } + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @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_DETAIL_FIELD_NUMBER = 5; + private volatile java.lang.Object statusDetail_; + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + @java.lang.Override + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + 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(); + statusDetail_ = s; + return s; + } + } + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CANCEL_REQUESTED_FIELD_NUMBER = 6; + private boolean cancelRequested_; + /** + * + * + *
+   * Specifies if cancellation was requested for the operation.
+   * 
+ * + * bool cancel_requested = 6; + * + * @return The cancelRequested. + */ + @java.lang.Override + public boolean getCancelRequested() { + return cancelRequested_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + * + * + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * + * @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; + } + } + /** + * + * + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * + * @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 (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!getVerbBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!getStatusDetailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusDetail_); + } + if (cancelRequested_ != false) { + output.writeBool(6, cancelRequested_); + } + if (!getApiVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + unknownFields.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 (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!getVerbBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!getStatusDetailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusDetail_); + } + if (cancelRequested_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, cancelRequested_); + } + if (!getApiVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += unknownFields.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.networkmanagement.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.OperationMetadata other = + (com.google.cloud.networkmanagement.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 (!getStatusDetail().equals(other.getStatusDetail())) return false; + if (getCancelRequested() != other.getCancelRequested()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) 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_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getStatusDetail().hashCode(); + hash = (37 * hash) + CANCEL_REQUESTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCancelRequested()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.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.networkmanagement.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.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.networkmanagement.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.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.networkmanagement.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.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.networkmanagement.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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; + } + /** + * + * + *
+   * Metadata describing an [Operation][google.longrunning.Operation]
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.OperationMetadata) + com.google.cloud.networkmanagement.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.OperationMetadata.class, + com.google.cloud.networkmanagement.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusDetail_ = ""; + + cancelRequested_ = false; + + apiVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.OperationMetadata build() { + com.google.cloud.networkmanagement.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.OperationMetadata buildPartial() { + com.google.cloud.networkmanagement.v1.OperationMetadata result = + new com.google.cloud.networkmanagement.v1.OperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusDetail_ = statusDetail_; + result.cancelRequested_ = cancelRequested_; + result.apiVersion_ = apiVersion_; + 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.networkmanagement.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.networkmanagement.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.OperationMetadata other) { + if (other == com.google.cloud.networkmanagement.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusDetail().isEmpty()) { + statusDetail_ = other.statusDetail_; + onChanged(); + } + if (other.getCancelRequested() != false) { + setCancelRequested(other.getCancelRequested()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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_; + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @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(); + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + 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_; + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @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(); + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + 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_ = ""; + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @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; + } + } + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @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; + } + } + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object statusDetail_ = ""; + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @param value The statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusDetail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @return This builder for chaining. + */ + public Builder clearStatusDetail() { + + statusDetail_ = getDefaultInstance().getStatusDetail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @param value The bytes for statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusDetail_ = value; + onChanged(); + return this; + } + + private boolean cancelRequested_; + /** + * + * + *
+     * Specifies if cancellation was requested for the operation.
+     * 
+ * + * bool cancel_requested = 6; + * + * @return The cancelRequested. + */ + @java.lang.Override + public boolean getCancelRequested() { + return cancelRequested_; + } + /** + * + * + *
+     * Specifies if cancellation was requested for the operation.
+     * 
+ * + * bool cancel_requested = 6; + * + * @param value The cancelRequested to set. + * @return This builder for chaining. + */ + public Builder setCancelRequested(boolean value) { + + cancelRequested_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if cancellation was requested for the operation.
+     * 
+ * + * bool cancel_requested = 6; + * + * @return This builder for chaining. + */ + public Builder clearCancelRequested() { + + cancelRequested_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @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; + } + } + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @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; + } + } + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @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; + 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.networkmanagement.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.OperationMetadata) + private static final com.google.cloud.networkmanagement.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.OperationMetadata(); + } + + public static com.google.cloud.networkmanagement.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 { + return new OperationMetadata(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..f23df362 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,210 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Target of the operation - for example
+   * projects/project-1/locations/global/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Target of the operation - for example
+   * projects/project-1/locations/global/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + java.lang.String getStatusDetail(); + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + com.google.protobuf.ByteString getStatusDetailBytes(); + + /** + * + * + *
+   * Specifies if cancellation was requested for the operation.
+   * 
+ * + * bool cancel_requested = 6; + * + * @return The cancelRequested. + */ + boolean getCancelRequested(); + + /** + * + * + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityDetails.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityDetails.java new file mode 100644 index 00000000..47747e2e --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityDetails.java @@ -0,0 +1,1919 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Results of the configuration analysis from the last run of the test.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ReachabilityDetails} + */ +public final class ReachabilityDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.ReachabilityDetails) + ReachabilityDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReachabilityDetails.newBuilder() to construct. + private ReachabilityDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReachabilityDetails() { + result_ = 0; + traces_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReachabilityDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReachabilityDetails( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + result_ = rawValue; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (verifyTime_ != null) { + subBuilder = verifyTime_.toBuilder(); + } + verifyTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(verifyTime_); + verifyTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + traces_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + traces_.add( + input.readMessage( + com.google.cloud.networkmanagement.v1.Trace.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + traces_ = java.util.Collections.unmodifiableList(traces_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ReachabilityDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ReachabilityDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ReachabilityDetails.class, + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Builder.class); + } + + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.ReachabilityDetails.Result} + */ + public enum Result implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No result was specified.
+     * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + RESULT_UNSPECIFIED(0), + /** + * + * + *
+     * Possible scenarios are:
+     * * The configuration analysis determined that a packet originating from
+     *   the source is expected to reach the destination.
+     * * The analysis didn't complete because the user lacks permission for
+     *   some of the resources in the trace. However, at the time the user's
+     *   permission became insufficient, the trace had been successful so far.
+     * 
+ * + * REACHABLE = 1; + */ + REACHABLE(1), + /** + * + * + *
+     * A packet originating from the source is expected to be dropped before
+     * reaching the destination.
+     * 
+ * + * UNREACHABLE = 2; + */ + UNREACHABLE(2), + /** + * + * + *
+     * The source and destination endpoints do not uniquely identify
+     * the test location in the network, and the reachability result contains
+     * multiple traces. For some traces, a packet could be delivered, and for
+     * others, it would not be.
+     * 
+ * + * AMBIGUOUS = 4; + */ + AMBIGUOUS(4), + /** + * + * + *
+     * The configuration analysis did not complete. Possible reasons are:
+     * * A permissions error occurred--for example, the user might not have
+     *   read permission for all of the resources named in the test.
+     * * An internal error occurred.
+     * * The analyzer received an invalid or unsupported argument or was unable
+     *   to identify a known endpoint.
+     * 
+ * + * UNDETERMINED = 5; + */ + UNDETERMINED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No result was specified.
+     * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + public static final int RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Possible scenarios are:
+     * * The configuration analysis determined that a packet originating from
+     *   the source is expected to reach the destination.
+     * * The analysis didn't complete because the user lacks permission for
+     *   some of the resources in the trace. However, at the time the user's
+     *   permission became insufficient, the trace had been successful so far.
+     * 
+ * + * REACHABLE = 1; + */ + public static final int REACHABLE_VALUE = 1; + /** + * + * + *
+     * A packet originating from the source is expected to be dropped before
+     * reaching the destination.
+     * 
+ * + * UNREACHABLE = 2; + */ + public static final int UNREACHABLE_VALUE = 2; + /** + * + * + *
+     * The source and destination endpoints do not uniquely identify
+     * the test location in the network, and the reachability result contains
+     * multiple traces. For some traces, a packet could be delivered, and for
+     * others, it would not be.
+     * 
+ * + * AMBIGUOUS = 4; + */ + public static final int AMBIGUOUS_VALUE = 4; + /** + * + * + *
+     * The configuration analysis did not complete. Possible reasons are:
+     * * A permissions error occurred--for example, the user might not have
+     *   read permission for all of the resources named in the test.
+     * * An internal error occurred.
+     * * The analyzer received an invalid or unsupported argument or was unable
+     *   to identify a known endpoint.
+     * 
+ * + * UNDETERMINED = 5; + */ + public static final int UNDETERMINED_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 Result 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 Result forNumber(int value) { + switch (value) { + case 0: + return RESULT_UNSPECIFIED; + case 1: + return REACHABLE; + case 2: + return UNREACHABLE; + case 4: + return AMBIGUOUS; + case 5: + return UNDETERMINED; + 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 Result findValueByNumber(int number) { + return Result.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.networkmanagement.v1.ReachabilityDetails.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Result[] VALUES = values(); + + public static Result 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 Result(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.ReachabilityDetails.Result) + } + + public static final int RESULT_FIELD_NUMBER = 1; + private int result_; + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result getResult() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result.valueOf(result_); + return result == null + ? com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result.UNRECOGNIZED + : result; + } + + public static final int VERIFY_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp verifyTime_; + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + @java.lang.Override + public boolean hasVerifyTime() { + return verifyTime_ != null; + } + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getVerifyTime() { + return verifyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : verifyTime_; + } + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + return getVerifyTime(); + } + + public static final int ERROR_FIELD_NUMBER = 3; + private com.google.rpc.Status error_; + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int TRACES_FIELD_NUMBER = 5; + private java.util.List traces_; + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public java.util.List getTracesList() { + return traces_; + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public java.util.List + getTracesOrBuilderList() { + return traces_; + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public int getTracesCount() { + return traces_.size(); + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Trace getTraces(int index) { + return traces_.get(index); + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.TraceOrBuilder getTracesOrBuilder(int index) { + return traces_.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 (result_ + != com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result.RESULT_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, result_); + } + if (verifyTime_ != null) { + output.writeMessage(2, getVerifyTime()); + } + if (error_ != null) { + output.writeMessage(3, getError()); + } + for (int i = 0; i < traces_.size(); i++) { + output.writeMessage(5, traces_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (result_ + != com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result.RESULT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, result_); + } + if (verifyTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVerifyTime()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getError()); + } + for (int i = 0; i < traces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, traces_.get(i)); + } + size += unknownFields.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.networkmanagement.v1.ReachabilityDetails)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.ReachabilityDetails other = + (com.google.cloud.networkmanagement.v1.ReachabilityDetails) obj; + + if (result_ != other.result_) return false; + if (hasVerifyTime() != other.hasVerifyTime()) return false; + if (hasVerifyTime()) { + if (!getVerifyTime().equals(other.getVerifyTime())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (!getTracesList().equals(other.getTracesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; + if (hasVerifyTime()) { + hash = (37 * hash) + VERIFY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getVerifyTime().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (getTracesCount() > 0) { + hash = (37 * hash) + TRACES_FIELD_NUMBER; + hash = (53 * hash) + getTracesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ReachabilityDetails 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.networkmanagement.v1.ReachabilityDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ReachabilityDetails 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.networkmanagement.v1.ReachabilityDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.ReachabilityDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ReachabilityDetails 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.networkmanagement.v1.ReachabilityDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ReachabilityDetails 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.networkmanagement.v1.ReachabilityDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.ReachabilityDetails 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.networkmanagement.v1.ReachabilityDetails 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; + } + /** + * + * + *
+   * Results of the configuration analysis from the last run of the test.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.ReachabilityDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.ReachabilityDetails) + com.google.cloud.networkmanagement.v1.ReachabilityDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ReachabilityDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ReachabilityDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.ReachabilityDetails.class, + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.ReachabilityDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTracesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + result_ = 0; + + if (verifyTimeBuilder_ == null) { + verifyTime_ = null; + } else { + verifyTime_ = null; + verifyTimeBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (tracesBuilder_ == null) { + traces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tracesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1_ReachabilityDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ReachabilityDetails getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ReachabilityDetails build() { + com.google.cloud.networkmanagement.v1.ReachabilityDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ReachabilityDetails buildPartial() { + com.google.cloud.networkmanagement.v1.ReachabilityDetails result = + new com.google.cloud.networkmanagement.v1.ReachabilityDetails(this); + int from_bitField0_ = bitField0_; + result.result_ = result_; + if (verifyTimeBuilder_ == null) { + result.verifyTime_ = verifyTime_; + } else { + result.verifyTime_ = verifyTimeBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (tracesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + traces_ = java.util.Collections.unmodifiableList(traces_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.traces_ = traces_; + } else { + result.traces_ = tracesBuilder_.build(); + } + 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.networkmanagement.v1.ReachabilityDetails) { + return mergeFrom((com.google.cloud.networkmanagement.v1.ReachabilityDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.ReachabilityDetails other) { + if (other == com.google.cloud.networkmanagement.v1.ReachabilityDetails.getDefaultInstance()) + return this; + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + if (other.hasVerifyTime()) { + mergeVerifyTime(other.getVerifyTime()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (tracesBuilder_ == null) { + if (!other.traces_.isEmpty()) { + if (traces_.isEmpty()) { + traces_ = other.traces_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTracesIsMutable(); + traces_.addAll(other.traces_); + } + onChanged(); + } + } else { + if (!other.traces_.isEmpty()) { + if (tracesBuilder_.isEmpty()) { + tracesBuilder_.dispose(); + tracesBuilder_ = null; + traces_ = other.traces_; + bitField0_ = (bitField0_ & ~0x00000001); + tracesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTracesFieldBuilder() + : null; + } else { + tracesBuilder_.addAllMessages(other.traces_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.ReachabilityDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.ReachabilityDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int result_ = 0; + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + + result_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result getResult() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result.valueOf(result_); + return result == null + ? com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult( + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result value) { + if (value == null) { + throw new NullPointerException(); + } + + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return This builder for chaining. + */ + public Builder clearResult() { + + result_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp verifyTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + verifyTimeBuilder_; + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + public boolean hasVerifyTime() { + return verifyTimeBuilder_ != null || verifyTime_ != null; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + public com.google.protobuf.Timestamp getVerifyTime() { + if (verifyTimeBuilder_ == null) { + return verifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : verifyTime_; + } else { + return verifyTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder setVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + verifyTime_ = value; + onChanged(); + } else { + verifyTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder setVerifyTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (verifyTimeBuilder_ == null) { + verifyTime_ = builderForValue.build(); + onChanged(); + } else { + verifyTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder mergeVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (verifyTime_ != null) { + verifyTime_ = + com.google.protobuf.Timestamp.newBuilder(verifyTime_).mergeFrom(value).buildPartial(); + } else { + verifyTime_ = value; + } + onChanged(); + } else { + verifyTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder clearVerifyTime() { + if (verifyTimeBuilder_ == null) { + verifyTime_ = null; + onChanged(); + } else { + verifyTime_ = null; + verifyTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getVerifyTimeBuilder() { + + onChanged(); + return getVerifyTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + if (verifyTimeBuilder_ != null) { + return verifyTimeBuilder_.getMessageOrBuilder(); + } else { + return verifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : verifyTime_; + } + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getVerifyTimeFieldBuilder() { + if (verifyTimeBuilder_ == null) { + verifyTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getVerifyTime(), getParentForChildren(), isClean()); + verifyTime_ = null; + } + return verifyTimeBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private java.util.List traces_ = + java.util.Collections.emptyList(); + + private void ensureTracesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + traces_ = new java.util.ArrayList(traces_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Trace, + com.google.cloud.networkmanagement.v1.Trace.Builder, + com.google.cloud.networkmanagement.v1.TraceOrBuilder> + tracesBuilder_; + + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public java.util.List getTracesList() { + if (tracesBuilder_ == null) { + return java.util.Collections.unmodifiableList(traces_); + } else { + return tracesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public int getTracesCount() { + if (tracesBuilder_ == null) { + return traces_.size(); + } else { + return tracesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1.Trace getTraces(int index) { + if (tracesBuilder_ == null) { + return traces_.get(index); + } else { + return tracesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder setTraces(int index, com.google.cloud.networkmanagement.v1.Trace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.set(index, value); + onChanged(); + } else { + tracesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder setTraces( + int index, com.google.cloud.networkmanagement.v1.Trace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.set(index, builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addTraces(com.google.cloud.networkmanagement.v1.Trace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.add(value); + onChanged(); + } else { + tracesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addTraces(int index, com.google.cloud.networkmanagement.v1.Trace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.add(index, value); + onChanged(); + } else { + tracesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addTraces(com.google.cloud.networkmanagement.v1.Trace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addTraces( + int index, com.google.cloud.networkmanagement.v1.Trace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(index, builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder addAllTraces( + java.lang.Iterable values) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, traces_); + onChanged(); + } else { + tracesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder clearTraces() { + if (tracesBuilder_ == null) { + traces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tracesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public Builder removeTraces(int index) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.remove(index); + onChanged(); + } else { + tracesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1.Trace.Builder getTracesBuilder(int index) { + return getTracesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1.TraceOrBuilder getTracesOrBuilder(int index) { + if (tracesBuilder_ == null) { + return traces_.get(index); + } else { + return tracesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public java.util.List + getTracesOrBuilderList() { + if (tracesBuilder_ != null) { + return tracesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(traces_); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1.Trace.Builder addTracesBuilder() { + return getTracesFieldBuilder() + .addBuilder(com.google.cloud.networkmanagement.v1.Trace.getDefaultInstance()); + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1.Trace.Builder addTracesBuilder(int index) { + return getTracesFieldBuilder() + .addBuilder(index, com.google.cloud.networkmanagement.v1.Trace.getDefaultInstance()); + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + public java.util.List + getTracesBuilderList() { + return getTracesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Trace, + com.google.cloud.networkmanagement.v1.Trace.Builder, + com.google.cloud.networkmanagement.v1.TraceOrBuilder> + getTracesFieldBuilder() { + if (tracesBuilder_ == null) { + tracesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Trace, + com.google.cloud.networkmanagement.v1.Trace.Builder, + com.google.cloud.networkmanagement.v1.TraceOrBuilder>( + traces_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + traces_ = null; + } + return tracesBuilder_; + } + + @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.networkmanagement.v1.ReachabilityDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.ReachabilityDetails) + private static final com.google.cloud.networkmanagement.v1.ReachabilityDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.ReachabilityDetails(); + } + + public static com.google.cloud.networkmanagement.v1.ReachabilityDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReachabilityDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReachabilityDetails(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.ReachabilityDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityDetailsOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityDetailsOrBuilder.java new file mode 100644 index 00000000..72bd0f90 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityDetailsOrBuilder.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1; + +public interface ReachabilityDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.ReachabilityDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * + * @return The result. + */ + com.google.cloud.networkmanagement.v1.ReachabilityDetails.Result getResult(); + + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + boolean hasVerifyTime(); + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + com.google.protobuf.Timestamp getVerifyTime(); + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder(); + + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + java.util.List getTracesList(); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + com.google.cloud.networkmanagement.v1.Trace getTraces(int index); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + int getTracesCount(); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + java.util.List + getTracesOrBuilderList(); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + com.google.cloud.networkmanagement.v1.TraceOrBuilder getTracesOrBuilder(int index); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceProto.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceProto.java new file mode 100644 index 00000000..beb3a7fa --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/ReachabilityServiceProto.java @@ -0,0 +1,259 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +public final class ReachabilityServiceProto { + private ReachabilityServiceProto() {} + + 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_networkmanagement_v1_ListConnectivityTestsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/networkmanagement/v1/reac" + + "hability.proto\022!google.cloud.networkmana" + + "gement.v1\032\034google/api/annotations.proto\032" + + "\027google/api/client.proto\032\037google/api/fie" + + "ld_behavior.proto\032\031google/api/resource.p" + + "roto\0329google/cloud/networkmanagement/v1/" + + "connectivity_test.proto\032#google/longrunn" + + "ing/operations.proto\032 google/protobuf/fi" + + "eld_mask.proto\032\037google/protobuf/timestam" + + "p.proto\"|\n\034ListConnectivityTestsRequest\022" + + "\023\n\006parent\030\001 \001(\tB\003\340A\002\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\010o" + + "rder_by\030\005 \001(\t\"\225\001\n\035ListConnectivityTestsR" + + "esponse\022F\n\tresources\030\001 \003(\01323.google.clou" + + "d.networkmanagement.v1.ConnectivityTest\022" + + "\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030" + + "\003 \003(\t\"/\n\032GetConnectivityTestRequest\022\021\n\004n" + + "ame\030\001 \001(\tB\003\340A\002\"\226\001\n\035CreateConnectivityTes" + + "tRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\024\n\007test_id" + + "\030\002 \001(\tB\003\340A\002\022J\n\010resource\030\003 \001(\01323.google.c" + + "loud.networkmanagement.v1.ConnectivityTe" + + "stB\003\340A\002\"\241\001\n\035UpdateConnectivityTestReques" + + "t\0224\n\013update_mask\030\001 \001(\0132\032.google.protobuf" + + ".FieldMaskB\003\340A\002\022J\n\010resource\030\002 \001(\01323.goog" + + "le.cloud.networkmanagement.v1.Connectivi" + + "tyTestB\003\340A\002\"2\n\035DeleteConnectivityTestReq" + + "uest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"1\n\034RerunConnecti" + + "vityTestRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"\326\001\n\021O" + + "perationMetadata\022/\n\013create_time\030\001 \001(\0132\032." + + "google.protobuf.Timestamp\022,\n\010end_time\030\002 " + + "\001(\0132\032.google.protobuf.Timestamp\022\016\n\006targe" + + "t\030\003 \001(\t\022\014\n\004verb\030\004 \001(\t\022\025\n\rstatus_detail\030\005" + + " \001(\t\022\030\n\020cancel_requested\030\006 \001(\010\022\023\n\013api_ve" + + "rsion\030\007 \001(\t2\226\r\n\023ReachabilityService\022\347\001\n\025" + + "ListConnectivityTests\022?.google.cloud.net" + + "workmanagement.v1.ListConnectivityTestsR" + + "equest\032@.google.cloud.networkmanagement." + + "v1.ListConnectivityTestsResponse\"K\202\323\344\223\002<" + + "\022:/v1/{parent=projects/*/locations/globa" + + "l}/connectivityTests\332A\006parent\022\324\001\n\023GetCon" + + "nectivityTest\022=.google.cloud.networkmana" + + "gement.v1.GetConnectivityTestRequest\0323.g" + + "oogle.cloud.networkmanagement.v1.Connect" + + "ivityTest\"I\202\323\344\223\002<\022:/v1/{name=projects/*/" + + "locations/global/connectivityTests/*}\332A\004" + + "name\022\254\002\n\026CreateConnectivityTest\022@.google" + + ".cloud.networkmanagement.v1.CreateConnec" + + "tivityTestRequest\032\035.google.longrunning.O" + + "peration\"\260\001\202\323\344\223\002F\":/v1/{parent=projects/" + + "*/locations/global}/connectivityTests:\010r" + + "esource\332A\027parent,test_id,resource\312AG\n2go" + + "ogle.cloud.networkmanagement.v1.Connecti" + + "vityTest\022\021OperationMetadata\022\262\002\n\026UpdateCo" + + "nnectivityTest\022@.google.cloud.networkman" + + "agement.v1.UpdateConnectivityTestRequest" + + "\032\035.google.longrunning.Operation\"\266\001\202\323\344\223\002O" + + "2C/v1/{resource.name=projects/*/location" + + "s/global/connectivityTests/*}:\010resource\332" + + "A\024update_mask,resource\312AG\n2google.cloud." + + "networkmanagement.v1.ConnectivityTest\022\021O" + + "perationMetadata\022\217\002\n\025RerunConnectivityTe" + + "st\022?.google.cloud.networkmanagement.v1.R" + + "erunConnectivityTestRequest\032\035.google.lon" + + "grunning.Operation\"\225\001\202\323\344\223\002E\"@/v1/{name=p" + + "rojects/*/locations/global/connectivityT" + + "ests/*}:rerun:\001*\312AG\n2google.cloud.networ" + + "kmanagement.v1.ConnectivityTest\022\021Operati" + + "onMetadata\022\361\001\n\026DeleteConnectivityTest\022@." + + "google.cloud.networkmanagement.v1.Delete" + + "ConnectivityTestRequest\032\035.google.longrun" + + "ning.Operation\"v\202\323\344\223\002<*:/v1/{name=projec" + + "ts/*/locations/global/connectivityTests/" + + "*}\332A\004name\312A*\n\025google.protobuf.Empty\022\021Ope" + + "rationMetadata\032T\312A networkmanagement.goo" + + "gleapis.com\322A.https://www.googleapis.com" + + "/auth/cloud-platformB\206\002\n%com.google.clou" + + "d.networkmanagement.v1B\030ReachabilityServ" + + "iceProtoP\001ZRgoogle.golang.org/genproto/g" + + "oogleapis/cloud/networkmanagement/v1;net" + + "workmanagement\252\002!Google.Cloud.NetworkMan" + + "agement.V1\312\002!Google\\Cloud\\NetworkManagem" + + "ent\\V1\352\002$Google::Cloud::NetworkManagemen" + + "t::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.networkmanagement.v1.TestOuterClass.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_ListConnectivityTestsResponse_descriptor, + new java.lang.String[] { + "Resources", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_GetConnectivityTestRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_CreateConnectivityTestRequest_descriptor, + new java.lang.String[] { + "Parent", "TestId", "Resource", + }); + internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Resource", + }); + internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_DeleteConnectivityTestRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkmanagement_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_networkmanagement_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusDetail", + "CancelRequested", + "ApiVersion", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.networkmanagement.v1.TestOuterClass.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RerunConnectivityTestRequest.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RerunConnectivityTestRequest.java new file mode 100644 index 00000000..9de551bb --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RerunConnectivityTestRequest.java @@ -0,0 +1,655 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Request for the `RerunConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} + */ +public final class RerunConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) + RerunConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RerunConnectivityTestRequest.newBuilder() to construct. + private RerunConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RerunConnectivityTestRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RerunConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RerunConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.networkmanagement.v1.RerunConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest 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.networkmanagement.v1.RerunConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest 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.networkmanagement.v1.RerunConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest 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.networkmanagement.v1.RerunConnectivityTestRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + 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.networkmanagement.v1.RerunConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest 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.networkmanagement.v1.RerunConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `RerunConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_RerunConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(this); + result.name_ = name_; + 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.networkmanagement.v1.RerunConnectivityTestRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + 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.networkmanagement.v1.RerunConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RerunConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RerunConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.RerunConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RerunConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RerunConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..ce053af0 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RerunConnectivityTestRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +public interface RerunConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RouteInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RouteInfo.java new file mode 100644 index 00000000..c59bd416 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RouteInfo.java @@ -0,0 +1,2647 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine route.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.RouteInfo} + */ +public final class RouteInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.RouteInfo) + RouteInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use RouteInfo.newBuilder() to construct. + private RouteInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RouteInfo() { + routeType_ = 0; + nextHopType_ = 0; + displayName_ = ""; + uri_ = ""; + destIpRange_ = ""; + nextHop_ = ""; + networkUri_ = ""; + instanceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RouteInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RouteInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + destIpRange_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextHop_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 48: + { + priority_ = input.readInt32(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + instanceTags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instanceTags_.add(s); + break; + } + case 64: + { + int rawValue = input.readEnum(); + + routeType_ = rawValue; + break; + } + case 72: + { + int rawValue = input.readEnum(); + + nextHopType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + instanceTags_ = instanceTags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_RouteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_RouteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.RouteInfo.class, + com.google.cloud.networkmanagement.v1.RouteInfo.Builder.class); + } + + /** + * + * + *
+   * Type of route:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.RouteInfo.RouteType} + */ + public enum RouteType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + ROUTE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Route is a subnet route automatically created by the system.
+     * 
+ * + * SUBNET = 1; + */ + SUBNET(1), + /** + * + * + *
+     * Static route created by the user, including the default route to the
+     * internet.
+     * 
+ * + * STATIC = 2; + */ + STATIC(2), + /** + * + * + *
+     * Dynamic route exchanged between BGP peers.
+     * 
+ * + * DYNAMIC = 3; + */ + DYNAMIC(3), + /** + * + * + *
+     * A subnet route received from peering network.
+     * 
+ * + * PEERING_SUBNET = 4; + */ + PEERING_SUBNET(4), + /** + * + * + *
+     * A static route received from peering network.
+     * 
+ * + * PEERING_STATIC = 5; + */ + PEERING_STATIC(5), + /** + * + * + *
+     * A dynamic route received from peering network.
+     * 
+ * + * PEERING_DYNAMIC = 6; + */ + PEERING_DYNAMIC(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + public static final int ROUTE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Route is a subnet route automatically created by the system.
+     * 
+ * + * SUBNET = 1; + */ + public static final int SUBNET_VALUE = 1; + /** + * + * + *
+     * Static route created by the user, including the default route to the
+     * internet.
+     * 
+ * + * STATIC = 2; + */ + public static final int STATIC_VALUE = 2; + /** + * + * + *
+     * Dynamic route exchanged between BGP peers.
+     * 
+ * + * DYNAMIC = 3; + */ + public static final int DYNAMIC_VALUE = 3; + /** + * + * + *
+     * A subnet route received from peering network.
+     * 
+ * + * PEERING_SUBNET = 4; + */ + public static final int PEERING_SUBNET_VALUE = 4; + /** + * + * + *
+     * A static route received from peering network.
+     * 
+ * + * PEERING_STATIC = 5; + */ + public static final int PEERING_STATIC_VALUE = 5; + /** + * + * + *
+     * A dynamic route received from peering network.
+     * 
+ * + * PEERING_DYNAMIC = 6; + */ + public static final int PEERING_DYNAMIC_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RouteType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RouteType forNumber(int value) { + switch (value) { + case 0: + return ROUTE_TYPE_UNSPECIFIED; + case 1: + return SUBNET; + case 2: + return STATIC; + case 3: + return DYNAMIC; + case 4: + return PEERING_SUBNET; + case 5: + return PEERING_STATIC; + case 6: + return PEERING_DYNAMIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RouteType findValueByNumber(int number) { + return RouteType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.RouteInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final RouteType[] VALUES = values(); + + public static RouteType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RouteType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.RouteInfo.RouteType) + } + + /** + * + * + *
+   * Type of next hop:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.RouteInfo.NextHopType} + */ + public enum NextHopType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * NEXT_HOP_TYPE_UNSPECIFIED = 0; + */ + NEXT_HOP_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Next hop is an IP address.
+     * 
+ * + * NEXT_HOP_IP = 1; + */ + NEXT_HOP_IP(1), + /** + * + * + *
+     * Next hop is a Compute Engine instance.
+     * 
+ * + * NEXT_HOP_INSTANCE = 2; + */ + NEXT_HOP_INSTANCE(2), + /** + * + * + *
+     * Next hop is a VPC network gateway.
+     * 
+ * + * NEXT_HOP_NETWORK = 3; + */ + NEXT_HOP_NETWORK(3), + /** + * + * + *
+     * Next hop is a peering VPC.
+     * 
+ * + * NEXT_HOP_PEERING = 4; + */ + NEXT_HOP_PEERING(4), + /** + * + * + *
+     * Next hop is an interconnect.
+     * 
+ * + * NEXT_HOP_INTERCONNECT = 5; + */ + NEXT_HOP_INTERCONNECT(5), + /** + * + * + *
+     * Next hop is a VPN tunnel.
+     * 
+ * + * NEXT_HOP_VPN_TUNNEL = 6; + */ + NEXT_HOP_VPN_TUNNEL(6), + /** + * + * + *
+     * Next hop is a VPN gateway. This scenario only happens when tracing
+     * connectivity from an on-premises network to Google Cloud through a VPN.
+     * The analysis simulates a packet departing from the on-premises network
+     * through a VPN tunnel and arriving at a Cloud VPN gateway.
+     * 
+ * + * NEXT_HOP_VPN_GATEWAY = 7; + */ + NEXT_HOP_VPN_GATEWAY(7), + /** + * + * + *
+     * Next hop is an internet gateway.
+     * 
+ * + * NEXT_HOP_INTERNET_GATEWAY = 8; + */ + NEXT_HOP_INTERNET_GATEWAY(8), + /** + * + * + *
+     * Next hop is blackhole; that is, the next hop either does not exist or is
+     * not running.
+     * 
+ * + * NEXT_HOP_BLACKHOLE = 9; + */ + NEXT_HOP_BLACKHOLE(9), + /** + * + * + *
+     * Next hop is the forwarding rule of an Internal Load Balancer.
+     * 
+ * + * NEXT_HOP_ILB = 10; + */ + NEXT_HOP_ILB(10), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * NEXT_HOP_TYPE_UNSPECIFIED = 0; + */ + public static final int NEXT_HOP_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Next hop is an IP address.
+     * 
+ * + * NEXT_HOP_IP = 1; + */ + public static final int NEXT_HOP_IP_VALUE = 1; + /** + * + * + *
+     * Next hop is a Compute Engine instance.
+     * 
+ * + * NEXT_HOP_INSTANCE = 2; + */ + public static final int NEXT_HOP_INSTANCE_VALUE = 2; + /** + * + * + *
+     * Next hop is a VPC network gateway.
+     * 
+ * + * NEXT_HOP_NETWORK = 3; + */ + public static final int NEXT_HOP_NETWORK_VALUE = 3; + /** + * + * + *
+     * Next hop is a peering VPC.
+     * 
+ * + * NEXT_HOP_PEERING = 4; + */ + public static final int NEXT_HOP_PEERING_VALUE = 4; + /** + * + * + *
+     * Next hop is an interconnect.
+     * 
+ * + * NEXT_HOP_INTERCONNECT = 5; + */ + public static final int NEXT_HOP_INTERCONNECT_VALUE = 5; + /** + * + * + *
+     * Next hop is a VPN tunnel.
+     * 
+ * + * NEXT_HOP_VPN_TUNNEL = 6; + */ + public static final int NEXT_HOP_VPN_TUNNEL_VALUE = 6; + /** + * + * + *
+     * Next hop is a VPN gateway. This scenario only happens when tracing
+     * connectivity from an on-premises network to Google Cloud through a VPN.
+     * The analysis simulates a packet departing from the on-premises network
+     * through a VPN tunnel and arriving at a Cloud VPN gateway.
+     * 
+ * + * NEXT_HOP_VPN_GATEWAY = 7; + */ + public static final int NEXT_HOP_VPN_GATEWAY_VALUE = 7; + /** + * + * + *
+     * Next hop is an internet gateway.
+     * 
+ * + * NEXT_HOP_INTERNET_GATEWAY = 8; + */ + public static final int NEXT_HOP_INTERNET_GATEWAY_VALUE = 8; + /** + * + * + *
+     * Next hop is blackhole; that is, the next hop either does not exist or is
+     * not running.
+     * 
+ * + * NEXT_HOP_BLACKHOLE = 9; + */ + public static final int NEXT_HOP_BLACKHOLE_VALUE = 9; + /** + * + * + *
+     * Next hop is the forwarding rule of an Internal Load Balancer.
+     * 
+ * + * NEXT_HOP_ILB = 10; + */ + public static final int NEXT_HOP_ILB_VALUE = 10; + + 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 NextHopType 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 NextHopType forNumber(int value) { + switch (value) { + case 0: + return NEXT_HOP_TYPE_UNSPECIFIED; + case 1: + return NEXT_HOP_IP; + case 2: + return NEXT_HOP_INSTANCE; + case 3: + return NEXT_HOP_NETWORK; + case 4: + return NEXT_HOP_PEERING; + case 5: + return NEXT_HOP_INTERCONNECT; + case 6: + return NEXT_HOP_VPN_TUNNEL; + case 7: + return NEXT_HOP_VPN_GATEWAY; + case 8: + return NEXT_HOP_INTERNET_GATEWAY; + case 9: + return NEXT_HOP_BLACKHOLE; + case 10: + return NEXT_HOP_ILB; + 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 NextHopType findValueByNumber(int number) { + return NextHopType.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.networkmanagement.v1.RouteInfo.getDescriptor().getEnumTypes().get(1); + } + + private static final NextHopType[] VALUES = values(); + + public static NextHopType 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 NextHopType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.RouteInfo.NextHopType) + } + + public static final int ROUTE_TYPE_FIELD_NUMBER = 8; + private int routeType_; + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The enum numeric value on the wire for routeType. + */ + @java.lang.Override + public int getRouteTypeValue() { + return routeType_; + } + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The routeType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfo.RouteType getRouteType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.RouteInfo.RouteType result = + com.google.cloud.networkmanagement.v1.RouteInfo.RouteType.valueOf(routeType_); + return result == null + ? com.google.cloud.networkmanagement.v1.RouteInfo.RouteType.UNRECOGNIZED + : result; + } + + public static final int NEXT_HOP_TYPE_FIELD_NUMBER = 9; + private int nextHopType_; + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The enum numeric value on the wire for nextHopType. + */ + @java.lang.Override + public int getNextHopTypeValue() { + return nextHopType_; + } + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The nextHopType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType getNextHopType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType result = + com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType.valueOf(nextHopType_); + return result == null + ? com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType.UNRECOGNIZED + : result; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEST_IP_RANGE_FIELD_NUMBER = 3; + private volatile java.lang.Object destIpRange_; + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The destIpRange. + */ + @java.lang.Override + public java.lang.String getDestIpRange() { + java.lang.Object ref = destIpRange_; + 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(); + destIpRange_ = s; + return s; + } + } + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The bytes for destIpRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestIpRangeBytes() { + java.lang.Object ref = destIpRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEXT_HOP_FIELD_NUMBER = 4; + private volatile java.lang.Object nextHop_; + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The nextHop. + */ + @java.lang.Override + public java.lang.String getNextHop() { + java.lang.Object ref = nextHop_; + 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(); + nextHop_ = s; + return s; + } + } + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The bytes for nextHop. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextHopBytes() { + java.lang.Object ref = nextHop_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextHop_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 5; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 6; + private int priority_; + /** + * + * + *
+   * Priority of the route.
+   * 
+ * + * int32 priority = 6; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int INSTANCE_TAGS_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList instanceTags_; + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return A list containing the instanceTags. + */ + public com.google.protobuf.ProtocolStringList getInstanceTagsList() { + return instanceTags_; + } + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return The count of instanceTags. + */ + public int getInstanceTagsCount() { + return instanceTags_.size(); + } + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the element to return. + * @return The instanceTags at the given index. + */ + public java.lang.String getInstanceTags(int index) { + return instanceTags_.get(index); + } + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the instanceTags at the given index. + */ + public com.google.protobuf.ByteString getInstanceTagsBytes(int index) { + return instanceTags_.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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getDestIpRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, destIpRange_); + } + if (!getNextHopBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, nextHop_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, networkUri_); + } + if (priority_ != 0) { + output.writeInt32(6, priority_); + } + for (int i = 0; i < instanceTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, instanceTags_.getRaw(i)); + } + if (routeType_ + != com.google.cloud.networkmanagement.v1.RouteInfo.RouteType.ROUTE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, routeType_); + } + if (nextHopType_ + != com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType.NEXT_HOP_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, nextHopType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getDestIpRangeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, destIpRange_); + } + if (!getNextHopBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, nextHop_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, networkUri_); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, priority_); + } + { + int dataSize = 0; + for (int i = 0; i < instanceTags_.size(); i++) { + dataSize += computeStringSizeNoTag(instanceTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getInstanceTagsList().size(); + } + if (routeType_ + != com.google.cloud.networkmanagement.v1.RouteInfo.RouteType.ROUTE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, routeType_); + } + if (nextHopType_ + != com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType.NEXT_HOP_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, nextHopType_); + } + size += unknownFields.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.networkmanagement.v1.RouteInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.RouteInfo other = + (com.google.cloud.networkmanagement.v1.RouteInfo) obj; + + if (routeType_ != other.routeType_) return false; + if (nextHopType_ != other.nextHopType_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getDestIpRange().equals(other.getDestIpRange())) return false; + if (!getNextHop().equals(other.getNextHop())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (getPriority() != other.getPriority()) return false; + if (!getInstanceTagsList().equals(other.getInstanceTagsList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ROUTE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + routeType_; + hash = (37 * hash) + NEXT_HOP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nextHopType_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + DEST_IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getDestIpRange().hashCode(); + hash = (37 * hash) + NEXT_HOP_FIELD_NUMBER; + hash = (53 * hash) + getNextHop().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + if (getInstanceTagsCount() > 0) { + hash = (37 * hash) + INSTANCE_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getInstanceTagsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.RouteInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.RouteInfo 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.networkmanagement.v1.RouteInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.RouteInfo 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.networkmanagement.v1.RouteInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.RouteInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.RouteInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.RouteInfo 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.networkmanagement.v1.RouteInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.RouteInfo 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.networkmanagement.v1.RouteInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.RouteInfo 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.networkmanagement.v1.RouteInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine route.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.RouteInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.RouteInfo) + com.google.cloud.networkmanagement.v1.RouteInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_RouteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_RouteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.RouteInfo.class, + com.google.cloud.networkmanagement.v1.RouteInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.RouteInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + routeType_ = 0; + + nextHopType_ = 0; + + displayName_ = ""; + + uri_ = ""; + + destIpRange_ = ""; + + nextHop_ = ""; + + networkUri_ = ""; + + priority_ = 0; + + instanceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_RouteInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfo build() { + com.google.cloud.networkmanagement.v1.RouteInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfo buildPartial() { + com.google.cloud.networkmanagement.v1.RouteInfo result = + new com.google.cloud.networkmanagement.v1.RouteInfo(this); + int from_bitField0_ = bitField0_; + result.routeType_ = routeType_; + result.nextHopType_ = nextHopType_; + result.displayName_ = displayName_; + result.uri_ = uri_; + result.destIpRange_ = destIpRange_; + result.nextHop_ = nextHop_; + result.networkUri_ = networkUri_; + result.priority_ = priority_; + if (((bitField0_ & 0x00000001) != 0)) { + instanceTags_ = instanceTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instanceTags_ = instanceTags_; + 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.networkmanagement.v1.RouteInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.RouteInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.RouteInfo other) { + if (other == com.google.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance()) + return this; + if (other.routeType_ != 0) { + setRouteTypeValue(other.getRouteTypeValue()); + } + if (other.nextHopType_ != 0) { + setNextHopTypeValue(other.getNextHopTypeValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getDestIpRange().isEmpty()) { + destIpRange_ = other.destIpRange_; + onChanged(); + } + if (!other.getNextHop().isEmpty()) { + nextHop_ = other.nextHop_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (!other.instanceTags_.isEmpty()) { + if (instanceTags_.isEmpty()) { + instanceTags_ = other.instanceTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstanceTagsIsMutable(); + instanceTags_.addAll(other.instanceTags_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.RouteInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.networkmanagement.v1.RouteInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int routeType_ = 0; + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The enum numeric value on the wire for routeType. + */ + @java.lang.Override + public int getRouteTypeValue() { + return routeType_; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @param value The enum numeric value on the wire for routeType to set. + * @return This builder for chaining. + */ + public Builder setRouteTypeValue(int value) { + + routeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The routeType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfo.RouteType getRouteType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.RouteInfo.RouteType result = + com.google.cloud.networkmanagement.v1.RouteInfo.RouteType.valueOf(routeType_); + return result == null + ? com.google.cloud.networkmanagement.v1.RouteInfo.RouteType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @param value The routeType to set. + * @return This builder for chaining. + */ + public Builder setRouteType(com.google.cloud.networkmanagement.v1.RouteInfo.RouteType value) { + if (value == null) { + throw new NullPointerException(); + } + + routeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return This builder for chaining. + */ + public Builder clearRouteType() { + + routeType_ = 0; + onChanged(); + return this; + } + + private int nextHopType_ = 0; + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The enum numeric value on the wire for nextHopType. + */ + @java.lang.Override + public int getNextHopTypeValue() { + return nextHopType_; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @param value The enum numeric value on the wire for nextHopType to set. + * @return This builder for chaining. + */ + public Builder setNextHopTypeValue(int value) { + + nextHopType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The nextHopType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType getNextHopType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType result = + com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType.valueOf(nextHopType_); + return result == null + ? com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @param value The nextHopType to set. + * @return This builder for chaining. + */ + public Builder setNextHopType( + com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType value) { + if (value == null) { + throw new NullPointerException(); + } + + nextHopType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return This builder for chaining. + */ + public Builder clearNextHopType() { + + nextHopType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object destIpRange_ = ""; + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @return The destIpRange. + */ + public java.lang.String getDestIpRange() { + java.lang.Object ref = destIpRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destIpRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @return The bytes for destIpRange. + */ + public com.google.protobuf.ByteString getDestIpRangeBytes() { + java.lang.Object ref = destIpRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @param value The destIpRange to set. + * @return This builder for chaining. + */ + public Builder setDestIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destIpRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @return This builder for chaining. + */ + public Builder clearDestIpRange() { + + destIpRange_ = getDefaultInstance().getDestIpRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @param value The bytes for destIpRange to set. + * @return This builder for chaining. + */ + public Builder setDestIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destIpRange_ = value; + onChanged(); + return this; + } + + private java.lang.Object nextHop_ = ""; + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @return The nextHop. + */ + public java.lang.String getNextHop() { + java.lang.Object ref = nextHop_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextHop_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @return The bytes for nextHop. + */ + public com.google.protobuf.ByteString getNextHopBytes() { + java.lang.Object ref = nextHop_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextHop_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @param value The nextHop to set. + * @return This builder for chaining. + */ + public Builder setNextHop(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextHop_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @return This builder for chaining. + */ + public Builder clearNextHop() { + + nextHop_ = getDefaultInstance().getNextHop(); + onChanged(); + return this; + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @param value The bytes for nextHop to set. + * @return This builder for chaining. + */ + public Builder setNextHopBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextHop_ = value; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private int priority_; + /** + * + * + *
+     * Priority of the route.
+     * 
+ * + * int32 priority = 6; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + /** + * + * + *
+     * Priority of the route.
+     * 
+ * + * int32 priority = 6; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Priority of the route.
+     * 
+ * + * int32 priority = 6; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + + priority_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList instanceTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstanceTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instanceTags_ = new com.google.protobuf.LazyStringArrayList(instanceTags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @return A list containing the instanceTags. + */ + public com.google.protobuf.ProtocolStringList getInstanceTagsList() { + return instanceTags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @return The count of instanceTags. + */ + public int getInstanceTagsCount() { + return instanceTags_.size(); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the element to return. + * @return The instanceTags at the given index. + */ + public java.lang.String getInstanceTags(int index) { + return instanceTags_.get(index); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the instanceTags at the given index. + */ + public com.google.protobuf.ByteString getInstanceTagsBytes(int index) { + return instanceTags_.getByteString(index); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index to set the value at. + * @param value The instanceTags to set. + * @return This builder for chaining. + */ + public Builder setInstanceTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceTagsIsMutable(); + instanceTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param value The instanceTags to add. + * @return This builder for chaining. + */ + public Builder addInstanceTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceTagsIsMutable(); + instanceTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param values The instanceTags to add. + * @return This builder for chaining. + */ + public Builder addAllInstanceTags(java.lang.Iterable values) { + ensureInstanceTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceTags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @return This builder for chaining. + */ + public Builder clearInstanceTags() { + instanceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param value The bytes of the instanceTags to add. + * @return This builder for chaining. + */ + public Builder addInstanceTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInstanceTagsIsMutable(); + instanceTags_.add(value); + 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.networkmanagement.v1.RouteInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.RouteInfo) + private static final com.google.cloud.networkmanagement.v1.RouteInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.RouteInfo(); + } + + public static com.google.cloud.networkmanagement.v1.RouteInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RouteInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RouteInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.RouteInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RouteInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RouteInfoOrBuilder.java new file mode 100644 index 00000000..926b7f2d --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/RouteInfoOrBuilder.java @@ -0,0 +1,270 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface RouteInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.RouteInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The enum numeric value on the wire for routeType. + */ + int getRouteTypeValue(); + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * + * @return The routeType. + */ + com.google.cloud.networkmanagement.v1.RouteInfo.RouteType getRouteType(); + + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The enum numeric value on the wire for nextHopType. + */ + int getNextHopTypeValue(); + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The nextHopType. + */ + com.google.cloud.networkmanagement.v1.RouteInfo.NextHopType getNextHopType(); + + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The destIpRange. + */ + java.lang.String getDestIpRange(); + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The bytes for destIpRange. + */ + com.google.protobuf.ByteString getDestIpRangeBytes(); + + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The nextHop. + */ + java.lang.String getNextHop(); + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The bytes for nextHop. + */ + com.google.protobuf.ByteString getNextHopBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Priority of the route.
+   * 
+ * + * int32 priority = 6; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return A list containing the instanceTags. + */ + java.util.List getInstanceTagsList(); + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return The count of instanceTags. + */ + int getInstanceTagsCount(); + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the element to return. + * @return The instanceTags at the given index. + */ + java.lang.String getInstanceTags(int index); + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the instanceTags at the given index. + */ + com.google.protobuf.ByteString getInstanceTagsBytes(int index); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/Step.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/Step.java new file mode 100644 index 00000000..f8a49e8e --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/Step.java @@ -0,0 +1,6441 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * A simulated forwarding path is composed of multiple steps.
+ * Each step has a well-defined state and an associated configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.Step} + */ +public final class Step extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.Step) + StepOrBuilder { + private static final long serialVersionUID = 0L; + // Use Step.newBuilder() to construct. + private Step(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Step() { + description_ = ""; + state_ = 0; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Step(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Step( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 24: + { + causesDrop_ = input.readBool(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 42: + { + com.google.cloud.networkmanagement.v1.InstanceInfo.Builder subBuilder = null; + if (stepInfoCase_ == 5) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.InstanceInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 5; + break; + } + case 50: + { + com.google.cloud.networkmanagement.v1.FirewallInfo.Builder subBuilder = null; + if (stepInfoCase_ == 6) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.FirewallInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 6; + break; + } + case 58: + { + com.google.cloud.networkmanagement.v1.RouteInfo.Builder subBuilder = null; + if (stepInfoCase_ == 7) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.RouteInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 7; + break; + } + case 66: + { + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder subBuilder = null; + if (stepInfoCase_ == 8) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.EndpointInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 8; + break; + } + case 74: + { + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder subBuilder = null; + if (stepInfoCase_ == 9) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 9; + break; + } + case 82: + { + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.Builder subBuilder = null; + if (stepInfoCase_ == 10) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 10; + break; + } + case 90: + { + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.Builder subBuilder = null; + if (stepInfoCase_ == 11) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 11; + break; + } + case 98: + { + com.google.cloud.networkmanagement.v1.DeliverInfo.Builder subBuilder = null; + if (stepInfoCase_ == 12) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.DeliverInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 12; + break; + } + case 106: + { + com.google.cloud.networkmanagement.v1.ForwardInfo.Builder subBuilder = null; + if (stepInfoCase_ == 13) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.ForwardInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 13; + break; + } + case 114: + { + com.google.cloud.networkmanagement.v1.AbortInfo.Builder subBuilder = null; + if (stepInfoCase_ == 14) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.AbortInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 14; + break; + } + case 122: + { + com.google.cloud.networkmanagement.v1.DropInfo.Builder subBuilder = null; + if (stepInfoCase_ == 15) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.DropInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 15; + break; + } + case 130: + { + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.Builder subBuilder = null; + if (stepInfoCase_ == 16) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 16; + break; + } + case 138: + { + com.google.cloud.networkmanagement.v1.NetworkInfo.Builder subBuilder = null; + if (stepInfoCase_ == 17) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.NetworkInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 17; + break; + } + case 146: + { + com.google.cloud.networkmanagement.v1.GKEMasterInfo.Builder subBuilder = null; + if (stepInfoCase_ == 18) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.GKEMasterInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 18; + break; + } + case 154: + { + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder subBuilder = null; + if (stepInfoCase_ == 19) { + subBuilder = + ((com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 19; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.Step.class, + com.google.cloud.networkmanagement.v1.Step.Builder.class); + } + + /** + * + * + *
+   * Type of states that are defined in the network state machine.
+   * Each step in the packet trace is in a specific state.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.Step.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Initial state: packet originating from a Compute Engine instance.
+     * An InstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_INSTANCE = 1; + */ + START_FROM_INSTANCE(1), + /** + * + * + *
+     * Initial state: packet originating from the internet.
+     * The endpoint information is populated.
+     * 
+ * + * START_FROM_INTERNET = 2; + */ + START_FROM_INTERNET(2), + /** + * + * + *
+     * Initial state: packet originating from a VPC or on-premises network
+     * with internal source IP.
+     * If the source is a VPC network visible to the user, a NetworkInfo
+     * is populated with details of the network.
+     * 
+ * + * START_FROM_PRIVATE_NETWORK = 3; + */ + START_FROM_PRIVATE_NETWORK(3), + /** + * + * + *
+     * Initial state: packet originating from a Google Kubernetes Engine cluster
+     * master. A GKEMasterInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_GKE_MASTER = 21; + */ + START_FROM_GKE_MASTER(21), + /** + * + * + *
+     * Initial state: packet originating from a Cloud SQL instance.
+     * A CloudSQLInstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_CLOUD_SQL_INSTANCE = 22; + */ + START_FROM_CLOUD_SQL_INSTANCE(22), + /** + * + * + *
+     * Config checking state: verify ingress firewall rule.
+     * 
+ * + * APPLY_INGRESS_FIREWALL_RULE = 4; + */ + APPLY_INGRESS_FIREWALL_RULE(4), + /** + * + * + *
+     * Config checking state: verify egress firewall rule.
+     * 
+ * + * APPLY_EGRESS_FIREWALL_RULE = 5; + */ + APPLY_EGRESS_FIREWALL_RULE(5), + /** + * + * + *
+     * Config checking state: verify route.
+     * 
+ * + * APPLY_ROUTE = 6; + */ + APPLY_ROUTE(6), + /** + * + * + *
+     * Config checking state: match forwarding rule.
+     * 
+ * + * APPLY_FORWARDING_RULE = 7; + */ + APPLY_FORWARDING_RULE(7), + /** + * + * + *
+     * Config checking state: packet sent or received under foreign IP
+     * address and allowed.
+     * 
+ * + * SPOOFING_APPROVED = 8; + */ + SPOOFING_APPROVED(8), + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine instance.
+     * 
+ * + * ARRIVE_AT_INSTANCE = 9; + */ + ARRIVE_AT_INSTANCE(9), + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine internal load balancer.
+     * 
+ * + * ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + */ + ARRIVE_AT_INTERNAL_LOAD_BALANCER(10), + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine external load balancer.
+     * 
+ * + * ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + */ + ARRIVE_AT_EXTERNAL_LOAD_BALANCER(11), + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN gateway.
+     * 
+ * + * ARRIVE_AT_VPN_GATEWAY = 12; + */ + ARRIVE_AT_VPN_GATEWAY(12), + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN tunnel.
+     * 
+ * + * ARRIVE_AT_VPN_TUNNEL = 13; + */ + ARRIVE_AT_VPN_TUNNEL(13), + /** + * + * + *
+     * Transition state: packet header translated.
+     * 
+ * + * NAT = 14; + */ + NAT(14), + /** + * + * + *
+     * Transition state: original connection is terminated and a new proxied
+     * connection is initiated.
+     * 
+ * + * PROXY_CONNECTION = 15; + */ + PROXY_CONNECTION(15), + /** + * + * + *
+     * Final state: packet could be delivered.
+     * 
+ * + * DELIVER = 16; + */ + DELIVER(16), + /** + * + * + *
+     * Final state: packet could be dropped.
+     * 
+ * + * DROP = 17; + */ + DROP(17), + /** + * + * + *
+     * Final state: packet could be forwarded to a network with an unknown
+     * configuration.
+     * 
+ * + * FORWARD = 18; + */ + FORWARD(18), + /** + * + * + *
+     * Final state: analysis is aborted.
+     * 
+ * + * ABORT = 19; + */ + ABORT(19), + /** + * + * + *
+     * Special state: viewer of the test result does not have permission to
+     * see the configuration in this step.
+     * 
+ * + * VIEWER_PERMISSION_MISSING = 20; + */ + VIEWER_PERMISSION_MISSING(20), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Initial state: packet originating from a Compute Engine instance.
+     * An InstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_INSTANCE = 1; + */ + public static final int START_FROM_INSTANCE_VALUE = 1; + /** + * + * + *
+     * Initial state: packet originating from the internet.
+     * The endpoint information is populated.
+     * 
+ * + * START_FROM_INTERNET = 2; + */ + public static final int START_FROM_INTERNET_VALUE = 2; + /** + * + * + *
+     * Initial state: packet originating from a VPC or on-premises network
+     * with internal source IP.
+     * If the source is a VPC network visible to the user, a NetworkInfo
+     * is populated with details of the network.
+     * 
+ * + * START_FROM_PRIVATE_NETWORK = 3; + */ + public static final int START_FROM_PRIVATE_NETWORK_VALUE = 3; + /** + * + * + *
+     * Initial state: packet originating from a Google Kubernetes Engine cluster
+     * master. A GKEMasterInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_GKE_MASTER = 21; + */ + public static final int START_FROM_GKE_MASTER_VALUE = 21; + /** + * + * + *
+     * Initial state: packet originating from a Cloud SQL instance.
+     * A CloudSQLInstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_CLOUD_SQL_INSTANCE = 22; + */ + public static final int START_FROM_CLOUD_SQL_INSTANCE_VALUE = 22; + /** + * + * + *
+     * Config checking state: verify ingress firewall rule.
+     * 
+ * + * APPLY_INGRESS_FIREWALL_RULE = 4; + */ + public static final int APPLY_INGRESS_FIREWALL_RULE_VALUE = 4; + /** + * + * + *
+     * Config checking state: verify egress firewall rule.
+     * 
+ * + * APPLY_EGRESS_FIREWALL_RULE = 5; + */ + public static final int APPLY_EGRESS_FIREWALL_RULE_VALUE = 5; + /** + * + * + *
+     * Config checking state: verify route.
+     * 
+ * + * APPLY_ROUTE = 6; + */ + public static final int APPLY_ROUTE_VALUE = 6; + /** + * + * + *
+     * Config checking state: match forwarding rule.
+     * 
+ * + * APPLY_FORWARDING_RULE = 7; + */ + public static final int APPLY_FORWARDING_RULE_VALUE = 7; + /** + * + * + *
+     * Config checking state: packet sent or received under foreign IP
+     * address and allowed.
+     * 
+ * + * SPOOFING_APPROVED = 8; + */ + public static final int SPOOFING_APPROVED_VALUE = 8; + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine instance.
+     * 
+ * + * ARRIVE_AT_INSTANCE = 9; + */ + public static final int ARRIVE_AT_INSTANCE_VALUE = 9; + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine internal load balancer.
+     * 
+ * + * ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + */ + public static final int ARRIVE_AT_INTERNAL_LOAD_BALANCER_VALUE = 10; + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine external load balancer.
+     * 
+ * + * ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + */ + public static final int ARRIVE_AT_EXTERNAL_LOAD_BALANCER_VALUE = 11; + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN gateway.
+     * 
+ * + * ARRIVE_AT_VPN_GATEWAY = 12; + */ + public static final int ARRIVE_AT_VPN_GATEWAY_VALUE = 12; + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN tunnel.
+     * 
+ * + * ARRIVE_AT_VPN_TUNNEL = 13; + */ + public static final int ARRIVE_AT_VPN_TUNNEL_VALUE = 13; + /** + * + * + *
+     * Transition state: packet header translated.
+     * 
+ * + * NAT = 14; + */ + public static final int NAT_VALUE = 14; + /** + * + * + *
+     * Transition state: original connection is terminated and a new proxied
+     * connection is initiated.
+     * 
+ * + * PROXY_CONNECTION = 15; + */ + public static final int PROXY_CONNECTION_VALUE = 15; + /** + * + * + *
+     * Final state: packet could be delivered.
+     * 
+ * + * DELIVER = 16; + */ + public static final int DELIVER_VALUE = 16; + /** + * + * + *
+     * Final state: packet could be dropped.
+     * 
+ * + * DROP = 17; + */ + public static final int DROP_VALUE = 17; + /** + * + * + *
+     * Final state: packet could be forwarded to a network with an unknown
+     * configuration.
+     * 
+ * + * FORWARD = 18; + */ + public static final int FORWARD_VALUE = 18; + /** + * + * + *
+     * Final state: analysis is aborted.
+     * 
+ * + * ABORT = 19; + */ + public static final int ABORT_VALUE = 19; + /** + * + * + *
+     * Special state: viewer of the test result does not have permission to
+     * see the configuration in this step.
+     * 
+ * + * VIEWER_PERMISSION_MISSING = 20; + */ + public static final int VIEWER_PERMISSION_MISSING_VALUE = 20; + + 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 STATE_UNSPECIFIED; + case 1: + return START_FROM_INSTANCE; + case 2: + return START_FROM_INTERNET; + case 3: + return START_FROM_PRIVATE_NETWORK; + case 21: + return START_FROM_GKE_MASTER; + case 22: + return START_FROM_CLOUD_SQL_INSTANCE; + case 4: + return APPLY_INGRESS_FIREWALL_RULE; + case 5: + return APPLY_EGRESS_FIREWALL_RULE; + case 6: + return APPLY_ROUTE; + case 7: + return APPLY_FORWARDING_RULE; + case 8: + return SPOOFING_APPROVED; + case 9: + return ARRIVE_AT_INSTANCE; + case 10: + return ARRIVE_AT_INTERNAL_LOAD_BALANCER; + case 11: + return ARRIVE_AT_EXTERNAL_LOAD_BALANCER; + case 12: + return ARRIVE_AT_VPN_GATEWAY; + case 13: + return ARRIVE_AT_VPN_TUNNEL; + case 14: + return NAT; + case 15: + return PROXY_CONNECTION; + case 16: + return DELIVER; + case 17: + return DROP; + case 18: + return FORWARD; + case 19: + return ABORT; + case 20: + return VIEWER_PERMISSION_MISSING; + 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.networkmanagement.v1.Step.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.networkmanagement.v1.Step.State) + } + + private int stepInfoCase_ = 0; + private java.lang.Object stepInfo_; + + public enum StepInfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSTANCE(5), + FIREWALL(6), + ROUTE(7), + ENDPOINT(8), + FORWARDING_RULE(9), + VPN_GATEWAY(10), + VPN_TUNNEL(11), + DELIVER(12), + FORWARD(13), + ABORT(14), + DROP(15), + LOAD_BALANCER(16), + NETWORK(17), + GKE_MASTER(18), + CLOUD_SQL_INSTANCE(19), + STEPINFO_NOT_SET(0); + private final int value; + + private StepInfoCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StepInfoCase valueOf(int value) { + return forNumber(value); + } + + public static StepInfoCase forNumber(int value) { + switch (value) { + case 5: + return INSTANCE; + case 6: + return FIREWALL; + case 7: + return ROUTE; + case 8: + return ENDPOINT; + case 9: + return FORWARDING_RULE; + case 10: + return VPN_GATEWAY; + case 11: + return VPN_TUNNEL; + case 12: + return DELIVER; + case 13: + return FORWARD; + case 14: + return ABORT; + case 15: + return DROP; + case 16: + return LOAD_BALANCER; + case 17: + return NETWORK; + case 18: + return GKE_MASTER; + case 19: + return CLOUD_SQL_INSTANCE; + case 0: + return STEPINFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StepInfoCase getStepInfoCase() { + return StepInfoCase.forNumber(stepInfoCase_); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @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; + } + } + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @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 STATE_FIELD_NUMBER = 2; + private int state_; + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Step.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.Step.State result = + com.google.cloud.networkmanagement.v1.Step.State.valueOf(state_); + return result == null ? com.google.cloud.networkmanagement.v1.Step.State.UNRECOGNIZED : result; + } + + public static final int CAUSES_DROP_FIELD_NUMBER = 3; + private boolean causesDrop_; + /** + * + * + *
+   * This is a step that leads to the final state Drop.
+   * 
+ * + * bool causes_drop = 3; + * + * @return The causesDrop. + */ + @java.lang.Override + public boolean getCausesDrop() { + return causesDrop_; + } + + public static final int PROJECT_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object projectId_; + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return stepInfoCase_ == 5; + } + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.InstanceInfo getInstance() { + if (stepInfoCase_ == 5) { + return (com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.InstanceInfoOrBuilder getInstanceOrBuilder() { + if (stepInfoCase_ == 5) { + return (com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + + public static final int FIREWALL_FIELD_NUMBER = 6; + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return Whether the firewall field is set. + */ + @java.lang.Override + public boolean hasFirewall() { + return stepInfoCase_ == 6; + } + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return The firewall. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.FirewallInfo getFirewall() { + if (stepInfoCase_ == 6) { + return (com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.FirewallInfoOrBuilder getFirewallOrBuilder() { + if (stepInfoCase_ == 6) { + return (com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + + public static final int ROUTE_FIELD_NUMBER = 7; + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return Whether the route field is set. + */ + @java.lang.Override + public boolean hasRoute() { + return stepInfoCase_ == 7; + } + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return The route. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfo getRoute() { + if (stepInfoCase_ == 7) { + return (com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfoOrBuilder getRouteOrBuilder() { + if (stepInfoCase_ == 7) { + return (com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + + public static final int ENDPOINT_FIELD_NUMBER = 8; + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return Whether the endpoint field is set. + */ + @java.lang.Override + public boolean hasEndpoint() { + return stepInfoCase_ == 8; + } + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return The endpoint. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointInfo getEndpoint() { + if (stepInfoCase_ == 8) { + return (com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder getEndpointOrBuilder() { + if (stepInfoCase_ == 8) { + return (com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + + public static final int FORWARDING_RULE_FIELD_NUMBER = 9; + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return Whether the forwardingRule field is set. + */ + @java.lang.Override + public boolean hasForwardingRule() { + return stepInfoCase_ == 9; + } + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return The forwardingRule. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardingRuleInfo getForwardingRule() { + if (stepInfoCase_ == 9) { + return (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder + getForwardingRuleOrBuilder() { + if (stepInfoCase_ == 9) { + return (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + + public static final int VPN_GATEWAY_FIELD_NUMBER = 10; + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return Whether the vpnGateway field is set. + */ + @java.lang.Override + public boolean hasVpnGateway() { + return stepInfoCase_ == 10; + } + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return The vpnGateway. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnGatewayInfo getVpnGateway() { + if (stepInfoCase_ == 10) { + return (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder getVpnGatewayOrBuilder() { + if (stepInfoCase_ == 10) { + return (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + + public static final int VPN_TUNNEL_FIELD_NUMBER = 11; + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return Whether the vpnTunnel field is set. + */ + @java.lang.Override + public boolean hasVpnTunnel() { + return stepInfoCase_ == 11; + } + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return The vpnTunnel. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnTunnelInfo getVpnTunnel() { + if (stepInfoCase_ == 11) { + return (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder getVpnTunnelOrBuilder() { + if (stepInfoCase_ == 11) { + return (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + + public static final int DELIVER_FIELD_NUMBER = 12; + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return Whether the deliver field is set. + */ + @java.lang.Override + public boolean hasDeliver() { + return stepInfoCase_ == 12; + } + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return The deliver. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeliverInfo getDeliver() { + if (stepInfoCase_ == 12) { + return (com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeliverInfoOrBuilder getDeliverOrBuilder() { + if (stepInfoCase_ == 12) { + return (com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + + public static final int FORWARD_FIELD_NUMBER = 13; + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return Whether the forward field is set. + */ + @java.lang.Override + public boolean hasForward() { + return stepInfoCase_ == 13; + } + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return The forward. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardInfo getForward() { + if (stepInfoCase_ == 13) { + return (com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardInfoOrBuilder getForwardOrBuilder() { + if (stepInfoCase_ == 13) { + return (com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + + public static final int ABORT_FIELD_NUMBER = 14; + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return Whether the abort field is set. + */ + @java.lang.Override + public boolean hasAbort() { + return stepInfoCase_ == 14; + } + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return The abort. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.AbortInfo getAbort() { + if (stepInfoCase_ == 14) { + return (com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.AbortInfoOrBuilder getAbortOrBuilder() { + if (stepInfoCase_ == 14) { + return (com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + + public static final int DROP_FIELD_NUMBER = 15; + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return Whether the drop field is set. + */ + @java.lang.Override + public boolean hasDrop() { + return stepInfoCase_ == 15; + } + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return The drop. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DropInfo getDrop() { + if (stepInfoCase_ == 15) { + return (com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DropInfoOrBuilder getDropOrBuilder() { + if (stepInfoCase_ == 15) { + return (com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + + public static final int LOAD_BALANCER_FIELD_NUMBER = 16; + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return Whether the loadBalancer field is set. + */ + @java.lang.Override + public boolean hasLoadBalancer() { + return stepInfoCase_ == 16; + } + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return The loadBalancer. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo getLoadBalancer() { + if (stepInfoCase_ == 16) { + return (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder + getLoadBalancerOrBuilder() { + if (stepInfoCase_ == 16) { + return (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + + public static final int NETWORK_FIELD_NUMBER = 17; + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return stepInfoCase_ == 17; + } + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.NetworkInfo getNetwork() { + if (stepInfoCase_ == 17) { + return (com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.NetworkInfoOrBuilder getNetworkOrBuilder() { + if (stepInfoCase_ == 17) { + return (com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + + public static final int GKE_MASTER_FIELD_NUMBER = 18; + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return Whether the gkeMaster field is set. + */ + @java.lang.Override + public boolean hasGkeMaster() { + return stepInfoCase_ == 18; + } + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return The gkeMaster. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GKEMasterInfo getGkeMaster() { + if (stepInfoCase_ == 18) { + return (com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder getGkeMasterOrBuilder() { + if (stepInfoCase_ == 18) { + return (com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + + public static final int CLOUD_SQL_INSTANCE_FIELD_NUMBER = 19; + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * @return Whether the cloudSqlInstance field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstance() { + return stepInfoCase_ == 19; + } + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * @return The cloudSqlInstance. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo getCloudSqlInstance() { + if (stepInfoCase_ == 19) { + return (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder + getCloudSqlInstanceOrBuilder() { + if (stepInfoCase_ == 19) { + return (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } + + 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 (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (state_ != com.google.cloud.networkmanagement.v1.Step.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (causesDrop_ != false) { + output.writeBool(3, causesDrop_); + } + if (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, projectId_); + } + if (stepInfoCase_ == 5) { + output.writeMessage(5, (com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_); + } + if (stepInfoCase_ == 6) { + output.writeMessage(6, (com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_); + } + if (stepInfoCase_ == 7) { + output.writeMessage(7, (com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_); + } + if (stepInfoCase_ == 8) { + output.writeMessage(8, (com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_); + } + if (stepInfoCase_ == 9) { + output.writeMessage(9, (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_); + } + if (stepInfoCase_ == 10) { + output.writeMessage(10, (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_); + } + if (stepInfoCase_ == 11) { + output.writeMessage(11, (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_); + } + if (stepInfoCase_ == 12) { + output.writeMessage(12, (com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_); + } + if (stepInfoCase_ == 13) { + output.writeMessage(13, (com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_); + } + if (stepInfoCase_ == 14) { + output.writeMessage(14, (com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_); + } + if (stepInfoCase_ == 15) { + output.writeMessage(15, (com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_); + } + if (stepInfoCase_ == 16) { + output.writeMessage(16, (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_); + } + if (stepInfoCase_ == 17) { + output.writeMessage(17, (com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_); + } + if (stepInfoCase_ == 18) { + output.writeMessage(18, (com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_); + } + if (stepInfoCase_ == 19) { + output.writeMessage( + 19, (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (state_ != com.google.cloud.networkmanagement.v1.Step.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (causesDrop_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, causesDrop_); + } + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, projectId_); + } + if (stepInfoCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_); + } + if (stepInfoCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_); + } + if (stepInfoCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_); + } + if (stepInfoCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_); + } + if (stepInfoCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_); + } + if (stepInfoCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_); + } + if (stepInfoCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_); + } + if (stepInfoCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_); + } + if (stepInfoCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_); + } + if (stepInfoCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_); + } + if (stepInfoCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_); + } + if (stepInfoCase_ == 16) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 16, (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_); + } + if (stepInfoCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_); + } + if (stepInfoCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_); + } + if (stepInfoCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_); + } + size += unknownFields.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.networkmanagement.v1.Step)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.Step other = + (com.google.cloud.networkmanagement.v1.Step) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (getCausesDrop() != other.getCausesDrop()) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getStepInfoCase().equals(other.getStepInfoCase())) return false; + switch (stepInfoCase_) { + case 5: + if (!getInstance().equals(other.getInstance())) return false; + break; + case 6: + if (!getFirewall().equals(other.getFirewall())) return false; + break; + case 7: + if (!getRoute().equals(other.getRoute())) return false; + break; + case 8: + if (!getEndpoint().equals(other.getEndpoint())) return false; + break; + case 9: + if (!getForwardingRule().equals(other.getForwardingRule())) return false; + break; + case 10: + if (!getVpnGateway().equals(other.getVpnGateway())) return false; + break; + case 11: + if (!getVpnTunnel().equals(other.getVpnTunnel())) return false; + break; + case 12: + if (!getDeliver().equals(other.getDeliver())) return false; + break; + case 13: + if (!getForward().equals(other.getForward())) return false; + break; + case 14: + if (!getAbort().equals(other.getAbort())) return false; + break; + case 15: + if (!getDrop().equals(other.getDrop())) return false; + break; + case 16: + if (!getLoadBalancer().equals(other.getLoadBalancer())) return false; + break; + case 17: + if (!getNetwork().equals(other.getNetwork())) return false; + break; + case 18: + if (!getGkeMaster().equals(other.getGkeMaster())) return false; + break; + case 19: + if (!getCloudSqlInstance().equals(other.getCloudSqlInstance())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + CAUSES_DROP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCausesDrop()); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + switch (stepInfoCase_) { + case 5: + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + break; + case 6: + hash = (37 * hash) + FIREWALL_FIELD_NUMBER; + hash = (53 * hash) + getFirewall().hashCode(); + break; + case 7: + hash = (37 * hash) + ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getRoute().hashCode(); + break; + case 8: + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + break; + case 9: + hash = (37 * hash) + FORWARDING_RULE_FIELD_NUMBER; + hash = (53 * hash) + getForwardingRule().hashCode(); + break; + case 10: + hash = (37 * hash) + VPN_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getVpnGateway().hashCode(); + break; + case 11: + hash = (37 * hash) + VPN_TUNNEL_FIELD_NUMBER; + hash = (53 * hash) + getVpnTunnel().hashCode(); + break; + case 12: + hash = (37 * hash) + DELIVER_FIELD_NUMBER; + hash = (53 * hash) + getDeliver().hashCode(); + break; + case 13: + hash = (37 * hash) + FORWARD_FIELD_NUMBER; + hash = (53 * hash) + getForward().hashCode(); + break; + case 14: + hash = (37 * hash) + ABORT_FIELD_NUMBER; + hash = (53 * hash) + getAbort().hashCode(); + break; + case 15: + hash = (37 * hash) + DROP_FIELD_NUMBER; + hash = (53 * hash) + getDrop().hashCode(); + break; + case 16: + hash = (37 * hash) + LOAD_BALANCER_FIELD_NUMBER; + hash = (53 * hash) + getLoadBalancer().hashCode(); + break; + case 17: + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + break; + case 18: + hash = (37 * hash) + GKE_MASTER_FIELD_NUMBER; + hash = (53 * hash) + getGkeMaster().hashCode(); + break; + case 19: + hash = (37 * hash) + CLOUD_SQL_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstance().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.Step parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.Step 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.networkmanagement.v1.Step parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.Step 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.networkmanagement.v1.Step parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.Step parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.Step parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.Step 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.networkmanagement.v1.Step parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.Step 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.networkmanagement.v1.Step parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.Step 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.networkmanagement.v1.Step 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 simulated forwarding path is composed of multiple steps.
+   * Each step has a well-defined state and an associated configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.Step} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.Step) + com.google.cloud.networkmanagement.v1.StepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.Step.class, + com.google.cloud.networkmanagement.v1.Step.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.Step.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + description_ = ""; + + state_ = 0; + + causesDrop_ = false; + + projectId_ = ""; + + stepInfoCase_ = 0; + stepInfo_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Step_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Step getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.Step.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Step build() { + com.google.cloud.networkmanagement.v1.Step result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Step buildPartial() { + com.google.cloud.networkmanagement.v1.Step result = + new com.google.cloud.networkmanagement.v1.Step(this); + result.description_ = description_; + result.state_ = state_; + result.causesDrop_ = causesDrop_; + result.projectId_ = projectId_; + if (stepInfoCase_ == 5) { + if (instanceBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = instanceBuilder_.build(); + } + } + if (stepInfoCase_ == 6) { + if (firewallBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = firewallBuilder_.build(); + } + } + if (stepInfoCase_ == 7) { + if (routeBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = routeBuilder_.build(); + } + } + if (stepInfoCase_ == 8) { + if (endpointBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = endpointBuilder_.build(); + } + } + if (stepInfoCase_ == 9) { + if (forwardingRuleBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = forwardingRuleBuilder_.build(); + } + } + if (stepInfoCase_ == 10) { + if (vpnGatewayBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = vpnGatewayBuilder_.build(); + } + } + if (stepInfoCase_ == 11) { + if (vpnTunnelBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = vpnTunnelBuilder_.build(); + } + } + if (stepInfoCase_ == 12) { + if (deliverBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = deliverBuilder_.build(); + } + } + if (stepInfoCase_ == 13) { + if (forwardBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = forwardBuilder_.build(); + } + } + if (stepInfoCase_ == 14) { + if (abortBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = abortBuilder_.build(); + } + } + if (stepInfoCase_ == 15) { + if (dropBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = dropBuilder_.build(); + } + } + if (stepInfoCase_ == 16) { + if (loadBalancerBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = loadBalancerBuilder_.build(); + } + } + if (stepInfoCase_ == 17) { + if (networkBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = networkBuilder_.build(); + } + } + if (stepInfoCase_ == 18) { + if (gkeMasterBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = gkeMasterBuilder_.build(); + } + } + if (stepInfoCase_ == 19) { + if (cloudSqlInstanceBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = cloudSqlInstanceBuilder_.build(); + } + } + result.stepInfoCase_ = stepInfoCase_; + 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.networkmanagement.v1.Step) { + return mergeFrom((com.google.cloud.networkmanagement.v1.Step) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.Step other) { + if (other == com.google.cloud.networkmanagement.v1.Step.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getCausesDrop() != false) { + setCausesDrop(other.getCausesDrop()); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + switch (other.getStepInfoCase()) { + case INSTANCE: + { + mergeInstance(other.getInstance()); + break; + } + case FIREWALL: + { + mergeFirewall(other.getFirewall()); + break; + } + case ROUTE: + { + mergeRoute(other.getRoute()); + break; + } + case ENDPOINT: + { + mergeEndpoint(other.getEndpoint()); + break; + } + case FORWARDING_RULE: + { + mergeForwardingRule(other.getForwardingRule()); + break; + } + case VPN_GATEWAY: + { + mergeVpnGateway(other.getVpnGateway()); + break; + } + case VPN_TUNNEL: + { + mergeVpnTunnel(other.getVpnTunnel()); + break; + } + case DELIVER: + { + mergeDeliver(other.getDeliver()); + break; + } + case FORWARD: + { + mergeForward(other.getForward()); + break; + } + case ABORT: + { + mergeAbort(other.getAbort()); + break; + } + case DROP: + { + mergeDrop(other.getDrop()); + break; + } + case LOAD_BALANCER: + { + mergeLoadBalancer(other.getLoadBalancer()); + break; + } + case NETWORK: + { + mergeNetwork(other.getNetwork()); + break; + } + case GKE_MASTER: + { + mergeGkeMaster(other.getGkeMaster()); + break; + } + case CLOUD_SQL_INSTANCE: + { + mergeCloudSqlInstance(other.getCloudSqlInstance()); + break; + } + case STEPINFO_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.Step parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.networkmanagement.v1.Step) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int stepInfoCase_ = 0; + private java.lang.Object stepInfo_; + + public StepInfoCase getStepInfoCase() { + return StepInfoCase.forNumber(stepInfoCase_); + } + + public Builder clearStepInfo() { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @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; + } + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @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; + } + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @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; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Step.State state = 2; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Step.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.Step.State result = + com.google.cloud.networkmanagement.v1.Step.State.valueOf(state_); + return result == null + ? com.google.cloud.networkmanagement.v1.Step.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Step.State state = 2; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkmanagement.v1.Step.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private boolean causesDrop_; + /** + * + * + *
+     * This is a step that leads to the final state Drop.
+     * 
+ * + * bool causes_drop = 3; + * + * @return The causesDrop. + */ + @java.lang.Override + public boolean getCausesDrop() { + return causesDrop_; + } + /** + * + * + *
+     * This is a step that leads to the final state Drop.
+     * 
+ * + * bool causes_drop = 3; + * + * @param value The causesDrop to set. + * @return This builder for chaining. + */ + public Builder setCausesDrop(boolean value) { + + causesDrop_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This is a step that leads to the final state Drop.
+     * 
+ * + * bool causes_drop = 3; + * + * @return This builder for chaining. + */ + public Builder clearCausesDrop() { + + causesDrop_ = false; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.InstanceInfo, + com.google.cloud.networkmanagement.v1.InstanceInfo.Builder, + com.google.cloud.networkmanagement.v1.InstanceInfoOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return stepInfoCase_ == 5; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.InstanceInfo getInstance() { + if (instanceBuilder_ == null) { + if (stepInfoCase_ == 5) { + return (com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 5) { + return instanceBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public Builder setInstance(com.google.cloud.networkmanagement.v1.InstanceInfo value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + stepInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public Builder setInstance( + com.google.cloud.networkmanagement.v1.InstanceInfo.Builder builderForValue) { + if (instanceBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public Builder mergeInstance(com.google.cloud.networkmanagement.v1.InstanceInfo value) { + if (instanceBuilder_ == null) { + if (stepInfoCase_ == 5 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.InstanceInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 5) { + instanceBuilder_.mergeFrom(value); + } + instanceBuilder_.setMessage(value); + } + stepInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + if (stepInfoCase_ == 5) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 5) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + instanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + public com.google.cloud.networkmanagement.v1.InstanceInfo.Builder getInstanceBuilder() { + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.InstanceInfoOrBuilder getInstanceOrBuilder() { + if ((stepInfoCase_ == 5) && (instanceBuilder_ != null)) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 5) { + return (com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.InstanceInfo, + com.google.cloud.networkmanagement.v1.InstanceInfo.Builder, + com.google.cloud.networkmanagement.v1.InstanceInfoOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + if (!(stepInfoCase_ == 5)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.InstanceInfo.getDefaultInstance(); + } + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.InstanceInfo, + com.google.cloud.networkmanagement.v1.InstanceInfo.Builder, + com.google.cloud.networkmanagement.v1.InstanceInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.InstanceInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 5; + onChanged(); + ; + return instanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.FirewallInfo, + com.google.cloud.networkmanagement.v1.FirewallInfo.Builder, + com.google.cloud.networkmanagement.v1.FirewallInfoOrBuilder> + firewallBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return Whether the firewall field is set. + */ + @java.lang.Override + public boolean hasFirewall() { + return stepInfoCase_ == 6; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return The firewall. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.FirewallInfo getFirewall() { + if (firewallBuilder_ == null) { + if (stepInfoCase_ == 6) { + return (com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 6) { + return firewallBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public Builder setFirewall(com.google.cloud.networkmanagement.v1.FirewallInfo value) { + if (firewallBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + firewallBuilder_.setMessage(value); + } + stepInfoCase_ = 6; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public Builder setFirewall( + com.google.cloud.networkmanagement.v1.FirewallInfo.Builder builderForValue) { + if (firewallBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + firewallBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 6; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public Builder mergeFirewall(com.google.cloud.networkmanagement.v1.FirewallInfo value) { + if (firewallBuilder_ == null) { + if (stepInfoCase_ == 6 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.FirewallInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 6) { + firewallBuilder_.mergeFrom(value); + } + firewallBuilder_.setMessage(value); + } + stepInfoCase_ = 6; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public Builder clearFirewall() { + if (firewallBuilder_ == null) { + if (stepInfoCase_ == 6) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 6) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + firewallBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + public com.google.cloud.networkmanagement.v1.FirewallInfo.Builder getFirewallBuilder() { + return getFirewallFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.FirewallInfoOrBuilder getFirewallOrBuilder() { + if ((stepInfoCase_ == 6) && (firewallBuilder_ != null)) { + return firewallBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 6) { + return (com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.FirewallInfo, + com.google.cloud.networkmanagement.v1.FirewallInfo.Builder, + com.google.cloud.networkmanagement.v1.FirewallInfoOrBuilder> + getFirewallFieldBuilder() { + if (firewallBuilder_ == null) { + if (!(stepInfoCase_ == 6)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.FirewallInfo.getDefaultInstance(); + } + firewallBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.FirewallInfo, + com.google.cloud.networkmanagement.v1.FirewallInfo.Builder, + com.google.cloud.networkmanagement.v1.FirewallInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.FirewallInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 6; + onChanged(); + ; + return firewallBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.RouteInfo, + com.google.cloud.networkmanagement.v1.RouteInfo.Builder, + com.google.cloud.networkmanagement.v1.RouteInfoOrBuilder> + routeBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return Whether the route field is set. + */ + @java.lang.Override + public boolean hasRoute() { + return stepInfoCase_ == 7; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return The route. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfo getRoute() { + if (routeBuilder_ == null) { + if (stepInfoCase_ == 7) { + return (com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 7) { + return routeBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public Builder setRoute(com.google.cloud.networkmanagement.v1.RouteInfo value) { + if (routeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + routeBuilder_.setMessage(value); + } + stepInfoCase_ = 7; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public Builder setRoute( + com.google.cloud.networkmanagement.v1.RouteInfo.Builder builderForValue) { + if (routeBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + routeBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 7; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public Builder mergeRoute(com.google.cloud.networkmanagement.v1.RouteInfo value) { + if (routeBuilder_ == null) { + if (stepInfoCase_ == 7 + && stepInfo_ != com.google.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.RouteInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 7) { + routeBuilder_.mergeFrom(value); + } + routeBuilder_.setMessage(value); + } + stepInfoCase_ = 7; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public Builder clearRoute() { + if (routeBuilder_ == null) { + if (stepInfoCase_ == 7) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 7) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + routeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + public com.google.cloud.networkmanagement.v1.RouteInfo.Builder getRouteBuilder() { + return getRouteFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.RouteInfoOrBuilder getRouteOrBuilder() { + if ((stepInfoCase_ == 7) && (routeBuilder_ != null)) { + return routeBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 7) { + return (com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.RouteInfo, + com.google.cloud.networkmanagement.v1.RouteInfo.Builder, + com.google.cloud.networkmanagement.v1.RouteInfoOrBuilder> + getRouteFieldBuilder() { + if (routeBuilder_ == null) { + if (!(stepInfoCase_ == 7)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.RouteInfo.getDefaultInstance(); + } + routeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.RouteInfo, + com.google.cloud.networkmanagement.v1.RouteInfo.Builder, + com.google.cloud.networkmanagement.v1.RouteInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.RouteInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 7; + onChanged(); + ; + return routeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.EndpointInfo, + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder> + endpointBuilder_; + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return Whether the endpoint field is set. + */ + @java.lang.Override + public boolean hasEndpoint() { + return stepInfoCase_ == 8; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return The endpoint. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointInfo getEndpoint() { + if (endpointBuilder_ == null) { + if (stepInfoCase_ == 8) { + return (com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 8) { + return endpointBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public Builder setEndpoint(com.google.cloud.networkmanagement.v1.EndpointInfo value) { + if (endpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + endpointBuilder_.setMessage(value); + } + stepInfoCase_ = 8; + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public Builder setEndpoint( + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder builderForValue) { + if (endpointBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + endpointBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 8; + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public Builder mergeEndpoint(com.google.cloud.networkmanagement.v1.EndpointInfo value) { + if (endpointBuilder_ == null) { + if (stepInfoCase_ == 8 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.EndpointInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 8) { + endpointBuilder_.mergeFrom(value); + } + endpointBuilder_.setMessage(value); + } + stepInfoCase_ = 8; + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public Builder clearEndpoint() { + if (endpointBuilder_ == null) { + if (stepInfoCase_ == 8) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 8) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + endpointBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + public com.google.cloud.networkmanagement.v1.EndpointInfo.Builder getEndpointBuilder() { + return getEndpointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder getEndpointOrBuilder() { + if ((stepInfoCase_ == 8) && (endpointBuilder_ != null)) { + return endpointBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 8) { + return (com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.EndpointInfo, + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder> + getEndpointFieldBuilder() { + if (endpointBuilder_ == null) { + if (!(stepInfoCase_ == 8)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance(); + } + endpointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.EndpointInfo, + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.EndpointInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 8; + onChanged(); + ; + return endpointBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo, + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder, + com.google.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder> + forwardingRuleBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return Whether the forwardingRule field is set. + */ + @java.lang.Override + public boolean hasForwardingRule() { + return stepInfoCase_ == 9; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return The forwardingRule. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardingRuleInfo getForwardingRule() { + if (forwardingRuleBuilder_ == null) { + if (stepInfoCase_ == 9) { + return (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 9) { + return forwardingRuleBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + public Builder setForwardingRule( + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo value) { + if (forwardingRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + forwardingRuleBuilder_.setMessage(value); + } + stepInfoCase_ = 9; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + public Builder setForwardingRule( + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder builderForValue) { + if (forwardingRuleBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + forwardingRuleBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 9; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + public Builder mergeForwardingRule( + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo value) { + if (forwardingRuleBuilder_ == null) { + if (stepInfoCase_ == 9 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 9) { + forwardingRuleBuilder_.mergeFrom(value); + } + forwardingRuleBuilder_.setMessage(value); + } + stepInfoCase_ = 9; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + public Builder clearForwardingRule() { + if (forwardingRuleBuilder_ == null) { + if (stepInfoCase_ == 9) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 9) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + forwardingRuleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + public com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder + getForwardingRuleBuilder() { + return getForwardingRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder + getForwardingRuleOrBuilder() { + if ((stepInfoCase_ == 9) && (forwardingRuleBuilder_ != null)) { + return forwardingRuleBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 9) { + return (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo, + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder, + com.google.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder> + getForwardingRuleFieldBuilder() { + if (forwardingRuleBuilder_ == null) { + if (!(stepInfoCase_ == 9)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.getDefaultInstance(); + } + forwardingRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo, + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo.Builder, + com.google.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.ForwardingRuleInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 9; + onChanged(); + ; + return forwardingRuleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.VpnGatewayInfo, + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.Builder, + com.google.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder> + vpnGatewayBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return Whether the vpnGateway field is set. + */ + @java.lang.Override + public boolean hasVpnGateway() { + return stepInfoCase_ == 10; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return The vpnGateway. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnGatewayInfo getVpnGateway() { + if (vpnGatewayBuilder_ == null) { + if (stepInfoCase_ == 10) { + return (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 10) { + return vpnGatewayBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder setVpnGateway(com.google.cloud.networkmanagement.v1.VpnGatewayInfo value) { + if (vpnGatewayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + vpnGatewayBuilder_.setMessage(value); + } + stepInfoCase_ = 10; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder setVpnGateway( + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.Builder builderForValue) { + if (vpnGatewayBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + vpnGatewayBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 10; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder mergeVpnGateway(com.google.cloud.networkmanagement.v1.VpnGatewayInfo value) { + if (vpnGatewayBuilder_ == null) { + if (stepInfoCase_ == 10 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 10) { + vpnGatewayBuilder_.mergeFrom(value); + } + vpnGatewayBuilder_.setMessage(value); + } + stepInfoCase_ = 10; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder clearVpnGateway() { + if (vpnGatewayBuilder_ == null) { + if (stepInfoCase_ == 10) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 10) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + vpnGatewayBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + public com.google.cloud.networkmanagement.v1.VpnGatewayInfo.Builder getVpnGatewayBuilder() { + return getVpnGatewayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder getVpnGatewayOrBuilder() { + if ((stepInfoCase_ == 10) && (vpnGatewayBuilder_ != null)) { + return vpnGatewayBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 10) { + return (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.VpnGatewayInfo, + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.Builder, + com.google.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder> + getVpnGatewayFieldBuilder() { + if (vpnGatewayBuilder_ == null) { + if (!(stepInfoCase_ == 10)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + vpnGatewayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.VpnGatewayInfo, + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.Builder, + com.google.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 10; + onChanged(); + ; + return vpnGatewayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.VpnTunnelInfo, + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.Builder, + com.google.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder> + vpnTunnelBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return Whether the vpnTunnel field is set. + */ + @java.lang.Override + public boolean hasVpnTunnel() { + return stepInfoCase_ == 11; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return The vpnTunnel. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnTunnelInfo getVpnTunnel() { + if (vpnTunnelBuilder_ == null) { + if (stepInfoCase_ == 11) { + return (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 11) { + return vpnTunnelBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder setVpnTunnel(com.google.cloud.networkmanagement.v1.VpnTunnelInfo value) { + if (vpnTunnelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + vpnTunnelBuilder_.setMessage(value); + } + stepInfoCase_ = 11; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder setVpnTunnel( + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.Builder builderForValue) { + if (vpnTunnelBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + vpnTunnelBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 11; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder mergeVpnTunnel(com.google.cloud.networkmanagement.v1.VpnTunnelInfo value) { + if (vpnTunnelBuilder_ == null) { + if (stepInfoCase_ == 11 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 11) { + vpnTunnelBuilder_.mergeFrom(value); + } + vpnTunnelBuilder_.setMessage(value); + } + stepInfoCase_ = 11; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder clearVpnTunnel() { + if (vpnTunnelBuilder_ == null) { + if (stepInfoCase_ == 11) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 11) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + vpnTunnelBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + public com.google.cloud.networkmanagement.v1.VpnTunnelInfo.Builder getVpnTunnelBuilder() { + return getVpnTunnelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder getVpnTunnelOrBuilder() { + if ((stepInfoCase_ == 11) && (vpnTunnelBuilder_ != null)) { + return vpnTunnelBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 11) { + return (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.VpnTunnelInfo, + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.Builder, + com.google.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder> + getVpnTunnelFieldBuilder() { + if (vpnTunnelBuilder_ == null) { + if (!(stepInfoCase_ == 11)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + vpnTunnelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.VpnTunnelInfo, + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.Builder, + com.google.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 11; + onChanged(); + ; + return vpnTunnelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.DeliverInfo, + com.google.cloud.networkmanagement.v1.DeliverInfo.Builder, + com.google.cloud.networkmanagement.v1.DeliverInfoOrBuilder> + deliverBuilder_; + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return Whether the deliver field is set. + */ + @java.lang.Override + public boolean hasDeliver() { + return stepInfoCase_ == 12; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return The deliver. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeliverInfo getDeliver() { + if (deliverBuilder_ == null) { + if (stepInfoCase_ == 12) { + return (com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 12) { + return deliverBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public Builder setDeliver(com.google.cloud.networkmanagement.v1.DeliverInfo value) { + if (deliverBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + deliverBuilder_.setMessage(value); + } + stepInfoCase_ = 12; + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public Builder setDeliver( + com.google.cloud.networkmanagement.v1.DeliverInfo.Builder builderForValue) { + if (deliverBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + deliverBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 12; + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public Builder mergeDeliver(com.google.cloud.networkmanagement.v1.DeliverInfo value) { + if (deliverBuilder_ == null) { + if (stepInfoCase_ == 12 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.DeliverInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 12) { + deliverBuilder_.mergeFrom(value); + } + deliverBuilder_.setMessage(value); + } + stepInfoCase_ = 12; + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public Builder clearDeliver() { + if (deliverBuilder_ == null) { + if (stepInfoCase_ == 12) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 12) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + deliverBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + public com.google.cloud.networkmanagement.v1.DeliverInfo.Builder getDeliverBuilder() { + return getDeliverFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DeliverInfoOrBuilder getDeliverOrBuilder() { + if ((stepInfoCase_ == 12) && (deliverBuilder_ != null)) { + return deliverBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 12) { + return (com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.DeliverInfo, + com.google.cloud.networkmanagement.v1.DeliverInfo.Builder, + com.google.cloud.networkmanagement.v1.DeliverInfoOrBuilder> + getDeliverFieldBuilder() { + if (deliverBuilder_ == null) { + if (!(stepInfoCase_ == 12)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.DeliverInfo.getDefaultInstance(); + } + deliverBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.DeliverInfo, + com.google.cloud.networkmanagement.v1.DeliverInfo.Builder, + com.google.cloud.networkmanagement.v1.DeliverInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.DeliverInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 12; + onChanged(); + ; + return deliverBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ForwardInfo, + com.google.cloud.networkmanagement.v1.ForwardInfo.Builder, + com.google.cloud.networkmanagement.v1.ForwardInfoOrBuilder> + forwardBuilder_; + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return Whether the forward field is set. + */ + @java.lang.Override + public boolean hasForward() { + return stepInfoCase_ == 13; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return The forward. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardInfo getForward() { + if (forwardBuilder_ == null) { + if (stepInfoCase_ == 13) { + return (com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 13) { + return forwardBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public Builder setForward(com.google.cloud.networkmanagement.v1.ForwardInfo value) { + if (forwardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + forwardBuilder_.setMessage(value); + } + stepInfoCase_ = 13; + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public Builder setForward( + com.google.cloud.networkmanagement.v1.ForwardInfo.Builder builderForValue) { + if (forwardBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + forwardBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 13; + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public Builder mergeForward(com.google.cloud.networkmanagement.v1.ForwardInfo value) { + if (forwardBuilder_ == null) { + if (stepInfoCase_ == 13 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.ForwardInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 13) { + forwardBuilder_.mergeFrom(value); + } + forwardBuilder_.setMessage(value); + } + stepInfoCase_ = 13; + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public Builder clearForward() { + if (forwardBuilder_ == null) { + if (stepInfoCase_ == 13) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 13) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + forwardBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + public com.google.cloud.networkmanagement.v1.ForwardInfo.Builder getForwardBuilder() { + return getForwardFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ForwardInfoOrBuilder getForwardOrBuilder() { + if ((stepInfoCase_ == 13) && (forwardBuilder_ != null)) { + return forwardBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 13) { + return (com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ForwardInfo, + com.google.cloud.networkmanagement.v1.ForwardInfo.Builder, + com.google.cloud.networkmanagement.v1.ForwardInfoOrBuilder> + getForwardFieldBuilder() { + if (forwardBuilder_ == null) { + if (!(stepInfoCase_ == 13)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.ForwardInfo.getDefaultInstance(); + } + forwardBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ForwardInfo, + com.google.cloud.networkmanagement.v1.ForwardInfo.Builder, + com.google.cloud.networkmanagement.v1.ForwardInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.ForwardInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 13; + onChanged(); + ; + return forwardBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.AbortInfo, + com.google.cloud.networkmanagement.v1.AbortInfo.Builder, + com.google.cloud.networkmanagement.v1.AbortInfoOrBuilder> + abortBuilder_; + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return Whether the abort field is set. + */ + @java.lang.Override + public boolean hasAbort() { + return stepInfoCase_ == 14; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return The abort. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.AbortInfo getAbort() { + if (abortBuilder_ == null) { + if (stepInfoCase_ == 14) { + return (com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 14) { + return abortBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public Builder setAbort(com.google.cloud.networkmanagement.v1.AbortInfo value) { + if (abortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + abortBuilder_.setMessage(value); + } + stepInfoCase_ = 14; + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public Builder setAbort( + com.google.cloud.networkmanagement.v1.AbortInfo.Builder builderForValue) { + if (abortBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + abortBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 14; + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public Builder mergeAbort(com.google.cloud.networkmanagement.v1.AbortInfo value) { + if (abortBuilder_ == null) { + if (stepInfoCase_ == 14 + && stepInfo_ != com.google.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.AbortInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 14) { + abortBuilder_.mergeFrom(value); + } + abortBuilder_.setMessage(value); + } + stepInfoCase_ = 14; + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public Builder clearAbort() { + if (abortBuilder_ == null) { + if (stepInfoCase_ == 14) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 14) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + abortBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + public com.google.cloud.networkmanagement.v1.AbortInfo.Builder getAbortBuilder() { + return getAbortFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.AbortInfoOrBuilder getAbortOrBuilder() { + if ((stepInfoCase_ == 14) && (abortBuilder_ != null)) { + return abortBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 14) { + return (com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.AbortInfo, + com.google.cloud.networkmanagement.v1.AbortInfo.Builder, + com.google.cloud.networkmanagement.v1.AbortInfoOrBuilder> + getAbortFieldBuilder() { + if (abortBuilder_ == null) { + if (!(stepInfoCase_ == 14)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.AbortInfo.getDefaultInstance(); + } + abortBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.AbortInfo, + com.google.cloud.networkmanagement.v1.AbortInfo.Builder, + com.google.cloud.networkmanagement.v1.AbortInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.AbortInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 14; + onChanged(); + ; + return abortBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.DropInfo, + com.google.cloud.networkmanagement.v1.DropInfo.Builder, + com.google.cloud.networkmanagement.v1.DropInfoOrBuilder> + dropBuilder_; + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return Whether the drop field is set. + */ + @java.lang.Override + public boolean hasDrop() { + return stepInfoCase_ == 15; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return The drop. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DropInfo getDrop() { + if (dropBuilder_ == null) { + if (stepInfoCase_ == 15) { + return (com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 15) { + return dropBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public Builder setDrop(com.google.cloud.networkmanagement.v1.DropInfo value) { + if (dropBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + dropBuilder_.setMessage(value); + } + stepInfoCase_ = 15; + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public Builder setDrop(com.google.cloud.networkmanagement.v1.DropInfo.Builder builderForValue) { + if (dropBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + dropBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 15; + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public Builder mergeDrop(com.google.cloud.networkmanagement.v1.DropInfo value) { + if (dropBuilder_ == null) { + if (stepInfoCase_ == 15 + && stepInfo_ != com.google.cloud.networkmanagement.v1.DropInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.DropInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 15) { + dropBuilder_.mergeFrom(value); + } + dropBuilder_.setMessage(value); + } + stepInfoCase_ = 15; + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public Builder clearDrop() { + if (dropBuilder_ == null) { + if (stepInfoCase_ == 15) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 15) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + dropBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + public com.google.cloud.networkmanagement.v1.DropInfo.Builder getDropBuilder() { + return getDropFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.DropInfoOrBuilder getDropOrBuilder() { + if ((stepInfoCase_ == 15) && (dropBuilder_ != null)) { + return dropBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 15) { + return (com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.DropInfo, + com.google.cloud.networkmanagement.v1.DropInfo.Builder, + com.google.cloud.networkmanagement.v1.DropInfoOrBuilder> + getDropFieldBuilder() { + if (dropBuilder_ == null) { + if (!(stepInfoCase_ == 15)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.DropInfo.getDefaultInstance(); + } + dropBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.DropInfo, + com.google.cloud.networkmanagement.v1.DropInfo.Builder, + com.google.cloud.networkmanagement.v1.DropInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.DropInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 15; + onChanged(); + ; + return dropBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.LoadBalancerInfo, + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.Builder, + com.google.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder> + loadBalancerBuilder_; + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return Whether the loadBalancer field is set. + */ + @java.lang.Override + public boolean hasLoadBalancer() { + return stepInfoCase_ == 16; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return The loadBalancer. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo getLoadBalancer() { + if (loadBalancerBuilder_ == null) { + if (stepInfoCase_ == 16) { + return (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 16) { + return loadBalancerBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public Builder setLoadBalancer(com.google.cloud.networkmanagement.v1.LoadBalancerInfo value) { + if (loadBalancerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + loadBalancerBuilder_.setMessage(value); + } + stepInfoCase_ = 16; + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public Builder setLoadBalancer( + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.Builder builderForValue) { + if (loadBalancerBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + loadBalancerBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 16; + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public Builder mergeLoadBalancer(com.google.cloud.networkmanagement.v1.LoadBalancerInfo value) { + if (loadBalancerBuilder_ == null) { + if (stepInfoCase_ == 16 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 16) { + loadBalancerBuilder_.mergeFrom(value); + } + loadBalancerBuilder_.setMessage(value); + } + stepInfoCase_ = 16; + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public Builder clearLoadBalancer() { + if (loadBalancerBuilder_ == null) { + if (stepInfoCase_ == 16) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 16) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + loadBalancerBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + public com.google.cloud.networkmanagement.v1.LoadBalancerInfo.Builder getLoadBalancerBuilder() { + return getLoadBalancerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder + getLoadBalancerOrBuilder() { + if ((stepInfoCase_ == 16) && (loadBalancerBuilder_ != null)) { + return loadBalancerBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 16) { + return (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.LoadBalancerInfo, + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.Builder, + com.google.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder> + getLoadBalancerFieldBuilder() { + if (loadBalancerBuilder_ == null) { + if (!(stepInfoCase_ == 16)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.LoadBalancerInfo.getDefaultInstance(); + } + loadBalancerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.LoadBalancerInfo, + com.google.cloud.networkmanagement.v1.LoadBalancerInfo.Builder, + com.google.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.LoadBalancerInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 16; + onChanged(); + ; + return loadBalancerBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.NetworkInfo, + com.google.cloud.networkmanagement.v1.NetworkInfo.Builder, + com.google.cloud.networkmanagement.v1.NetworkInfoOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return stepInfoCase_ == 17; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.NetworkInfo getNetwork() { + if (networkBuilder_ == null) { + if (stepInfoCase_ == 17) { + return (com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 17) { + return networkBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public Builder setNetwork(com.google.cloud.networkmanagement.v1.NetworkInfo value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + networkBuilder_.setMessage(value); + } + stepInfoCase_ = 17; + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public Builder setNetwork( + com.google.cloud.networkmanagement.v1.NetworkInfo.Builder builderForValue) { + if (networkBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 17; + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public Builder mergeNetwork(com.google.cloud.networkmanagement.v1.NetworkInfo value) { + if (networkBuilder_ == null) { + if (stepInfoCase_ == 17 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.NetworkInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 17) { + networkBuilder_.mergeFrom(value); + } + networkBuilder_.setMessage(value); + } + stepInfoCase_ = 17; + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public Builder clearNetwork() { + if (networkBuilder_ == null) { + if (stepInfoCase_ == 17) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 17) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + networkBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + public com.google.cloud.networkmanagement.v1.NetworkInfo.Builder getNetworkBuilder() { + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.NetworkInfoOrBuilder getNetworkOrBuilder() { + if ((stepInfoCase_ == 17) && (networkBuilder_ != null)) { + return networkBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 17) { + return (com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.NetworkInfo, + com.google.cloud.networkmanagement.v1.NetworkInfo.Builder, + com.google.cloud.networkmanagement.v1.NetworkInfoOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + if (!(stepInfoCase_ == 17)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.NetworkInfo.getDefaultInstance(); + } + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.NetworkInfo, + com.google.cloud.networkmanagement.v1.NetworkInfo.Builder, + com.google.cloud.networkmanagement.v1.NetworkInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.NetworkInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 17; + onChanged(); + ; + return networkBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.GKEMasterInfo, + com.google.cloud.networkmanagement.v1.GKEMasterInfo.Builder, + com.google.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder> + gkeMasterBuilder_; + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return Whether the gkeMaster field is set. + */ + @java.lang.Override + public boolean hasGkeMaster() { + return stepInfoCase_ == 18; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return The gkeMaster. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GKEMasterInfo getGkeMaster() { + if (gkeMasterBuilder_ == null) { + if (stepInfoCase_ == 18) { + return (com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 18) { + return gkeMasterBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public Builder setGkeMaster(com.google.cloud.networkmanagement.v1.GKEMasterInfo value) { + if (gkeMasterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + gkeMasterBuilder_.setMessage(value); + } + stepInfoCase_ = 18; + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public Builder setGkeMaster( + com.google.cloud.networkmanagement.v1.GKEMasterInfo.Builder builderForValue) { + if (gkeMasterBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + gkeMasterBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 18; + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public Builder mergeGkeMaster(com.google.cloud.networkmanagement.v1.GKEMasterInfo value) { + if (gkeMasterBuilder_ == null) { + if (stepInfoCase_ == 18 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.GKEMasterInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 18) { + gkeMasterBuilder_.mergeFrom(value); + } + gkeMasterBuilder_.setMessage(value); + } + stepInfoCase_ = 18; + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public Builder clearGkeMaster() { + if (gkeMasterBuilder_ == null) { + if (stepInfoCase_ == 18) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 18) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + gkeMasterBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + public com.google.cloud.networkmanagement.v1.GKEMasterInfo.Builder getGkeMasterBuilder() { + return getGkeMasterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder getGkeMasterOrBuilder() { + if ((stepInfoCase_ == 18) && (gkeMasterBuilder_ != null)) { + return gkeMasterBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 18) { + return (com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.GKEMasterInfo, + com.google.cloud.networkmanagement.v1.GKEMasterInfo.Builder, + com.google.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder> + getGkeMasterFieldBuilder() { + if (gkeMasterBuilder_ == null) { + if (!(stepInfoCase_ == 18)) { + stepInfo_ = com.google.cloud.networkmanagement.v1.GKEMasterInfo.getDefaultInstance(); + } + gkeMasterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.GKEMasterInfo, + com.google.cloud.networkmanagement.v1.GKEMasterInfo.Builder, + com.google.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.GKEMasterInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 18; + onChanged(); + ; + return gkeMasterBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo, + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder, + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder> + cloudSqlInstanceBuilder_; + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * @return Whether the cloudSqlInstance field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstance() { + return stepInfoCase_ == 19; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * @return The cloudSqlInstance. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo getCloudSqlInstance() { + if (cloudSqlInstanceBuilder_ == null) { + if (stepInfoCase_ == 19) { + return (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 19) { + return cloudSqlInstanceBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + */ + public Builder setCloudSqlInstance( + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo value) { + if (cloudSqlInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + cloudSqlInstanceBuilder_.setMessage(value); + } + stepInfoCase_ = 19; + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + */ + public Builder setCloudSqlInstance( + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder builderForValue) { + if (cloudSqlInstanceBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + cloudSqlInstanceBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 19; + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + */ + public Builder mergeCloudSqlInstance( + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo value) { + if (cloudSqlInstanceBuilder_ == null) { + if (stepInfoCase_ == 19 + && stepInfo_ + != com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.newBuilder( + (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 19) { + cloudSqlInstanceBuilder_.mergeFrom(value); + } + cloudSqlInstanceBuilder_.setMessage(value); + } + stepInfoCase_ = 19; + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + */ + public Builder clearCloudSqlInstance() { + if (cloudSqlInstanceBuilder_ == null) { + if (stepInfoCase_ == 19) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 19) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + cloudSqlInstanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + */ + public com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder + getCloudSqlInstanceBuilder() { + return getCloudSqlInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder + getCloudSqlInstanceOrBuilder() { + if ((stepInfoCase_ == 19) && (cloudSqlInstanceBuilder_ != null)) { + return cloudSqlInstanceBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 19) { + return (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo, + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder, + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder> + getCloudSqlInstanceFieldBuilder() { + if (cloudSqlInstanceBuilder_ == null) { + if (!(stepInfoCase_ == 19)) { + stepInfo_ = + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.getDefaultInstance(); + } + cloudSqlInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo, + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.Builder, + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 19; + onChanged(); + ; + return cloudSqlInstanceBuilder_; + } + + @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.networkmanagement.v1.Step) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.Step) + private static final com.google.cloud.networkmanagement.v1.Step DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.Step(); + } + + public static com.google.cloud.networkmanagement.v1.Step getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Step parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Step(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.Step getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/StepOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/StepOrBuilder.java new file mode 100644 index 00000000..0ee12d5f --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/StepOrBuilder.java @@ -0,0 +1,650 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface StepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.Step) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.cloud.networkmanagement.v1.Step.State state = 2; + * + * @return The state. + */ + com.google.cloud.networkmanagement.v1.Step.State getState(); + + /** + * + * + *
+   * This is a step that leads to the final state Drop.
+   * 
+ * + * bool causes_drop = 3; + * + * @return The causesDrop. + */ + boolean getCausesDrop(); + + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * + * @return The instance. + */ + com.google.cloud.networkmanagement.v1.InstanceInfo getInstance(); + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + */ + com.google.cloud.networkmanagement.v1.InstanceInfoOrBuilder getInstanceOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return Whether the firewall field is set. + */ + boolean hasFirewall(); + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * + * @return The firewall. + */ + com.google.cloud.networkmanagement.v1.FirewallInfo getFirewall(); + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + */ + com.google.cloud.networkmanagement.v1.FirewallInfoOrBuilder getFirewallOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return Whether the route field is set. + */ + boolean hasRoute(); + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + * + * @return The route. + */ + com.google.cloud.networkmanagement.v1.RouteInfo getRoute(); + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1.RouteInfo route = 7; + */ + com.google.cloud.networkmanagement.v1.RouteInfoOrBuilder getRouteOrBuilder(); + + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return Whether the endpoint field is set. + */ + boolean hasEndpoint(); + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * + * @return The endpoint. + */ + com.google.cloud.networkmanagement.v1.EndpointInfo getEndpoint(); + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + */ + com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder getEndpointOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return Whether the forwardingRule field is set. + */ + boolean hasForwardingRule(); + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return The forwardingRule. + */ + com.google.cloud.networkmanagement.v1.ForwardingRuleInfo getForwardingRule(); + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + */ + com.google.cloud.networkmanagement.v1.ForwardingRuleInfoOrBuilder getForwardingRuleOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return Whether the vpnGateway field is set. + */ + boolean hasVpnGateway(); + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * + * @return The vpnGateway. + */ + com.google.cloud.networkmanagement.v1.VpnGatewayInfo getVpnGateway(); + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + */ + com.google.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder getVpnGatewayOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return Whether the vpnTunnel field is set. + */ + boolean hasVpnTunnel(); + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return The vpnTunnel. + */ + com.google.cloud.networkmanagement.v1.VpnTunnelInfo getVpnTunnel(); + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + */ + com.google.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder getVpnTunnelOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return Whether the deliver field is set. + */ + boolean hasDeliver(); + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * + * @return The deliver. + */ + com.google.cloud.networkmanagement.v1.DeliverInfo getDeliver(); + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + */ + com.google.cloud.networkmanagement.v1.DeliverInfoOrBuilder getDeliverOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return Whether the forward field is set. + */ + boolean hasForward(); + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * + * @return The forward. + */ + com.google.cloud.networkmanagement.v1.ForwardInfo getForward(); + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + */ + com.google.cloud.networkmanagement.v1.ForwardInfoOrBuilder getForwardOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return Whether the abort field is set. + */ + boolean hasAbort(); + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + * + * @return The abort. + */ + com.google.cloud.networkmanagement.v1.AbortInfo getAbort(); + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + */ + com.google.cloud.networkmanagement.v1.AbortInfoOrBuilder getAbortOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return Whether the drop field is set. + */ + boolean hasDrop(); + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + * + * @return The drop. + */ + com.google.cloud.networkmanagement.v1.DropInfo getDrop(); + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1.DropInfo drop = 15; + */ + com.google.cloud.networkmanagement.v1.DropInfoOrBuilder getDropOrBuilder(); + + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return Whether the loadBalancer field is set. + */ + boolean hasLoadBalancer(); + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * + * @return The loadBalancer. + */ + com.google.cloud.networkmanagement.v1.LoadBalancerInfo getLoadBalancer(); + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + */ + com.google.cloud.networkmanagement.v1.LoadBalancerInfoOrBuilder getLoadBalancerOrBuilder(); + + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + * + * @return The network. + */ + com.google.cloud.networkmanagement.v1.NetworkInfo getNetwork(); + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + */ + com.google.cloud.networkmanagement.v1.NetworkInfoOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return Whether the gkeMaster field is set. + */ + boolean hasGkeMaster(); + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * + * @return The gkeMaster. + */ + com.google.cloud.networkmanagement.v1.GKEMasterInfo getGkeMaster(); + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + */ + com.google.cloud.networkmanagement.v1.GKEMasterInfoOrBuilder getGkeMasterOrBuilder(); + + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * @return Whether the cloudSqlInstance field is set. + */ + boolean hasCloudSqlInstance(); + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * @return The cloudSqlInstance. + */ + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo getCloudSqlInstance(); + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + */ + com.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoOrBuilder + getCloudSqlInstanceOrBuilder(); + + public com.google.cloud.networkmanagement.v1.Step.StepInfoCase getStepInfoCase(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TestOuterClass.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TestOuterClass.java new file mode 100644 index 00000000..15ea129c --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TestOuterClass.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1; + +public final class TestOuterClass { + private TestOuterClass() {} + + 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_networkmanagement_v1_ConnectivityTest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_ConnectivityTest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_ConnectivityTest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_ConnectivityTest_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_Endpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_Endpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_ReachabilityDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_ReachabilityDetails_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/networkmanagement/v1/conn" + + "ectivity_test.proto\022!google.cloud.networ" + + "kmanagement.v1\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\032-goog" + + "le/cloud/networkmanagement/v1/trace.prot" + + "o\032\037google/protobuf/timestamp.proto\032\027goog" + + "le/rpc/status.proto\032\034google/api/annotati" + + "ons.proto\"\307\005\n\020ConnectivityTest\022\021\n\004name\030\001" + + " \001(\tB\003\340A\002\022\023\n\013description\030\002 \001(\t\022@\n\006source" + + "\030\003 \001(\0132+.google.cloud.networkmanagement." + + "v1.EndpointB\003\340A\002\022E\n\013destination\030\004 \001(\0132+." + + "google.cloud.networkmanagement.v1.Endpoi" + + "ntB\003\340A\002\022\020\n\010protocol\030\005 \001(\t\022\030\n\020related_pro" + + "jects\030\006 \003(\t\022\031\n\014display_name\030\007 \001(\tB\003\340A\003\022O" + + "\n\006labels\030\010 \003(\0132?.google.cloud.networkman" + + "agement.v1.ConnectivityTest.LabelsEntry\022" + + "4\n\013create_time\030\n \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\0224\n\013update_time\030\013 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\022Y\n\024reachabil" + + "ity_details\030\014 \001(\01326.google.cloud.network" + + "management.v1.ReachabilityDetailsB\003\340A\003\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001:t\352Aq\n1networkmanagement.googleapis" + + ".com/ConnectivityTest\022 + * Trace represents one simulated packet forwarding path. + * * Each trace contains multiple ordered steps. + * * Each step is in a particular state with associated configuration. + * * State is categorized as final or non-final states. + * * Each final state has a reason associated. + * * Each trace must end with a final state (the last step). + * ``` + * |---------------------Trace----------------------| + * Step1(State) Step2(State) --- StepN(State(final)) + * ``` + * + * + * Protobuf type {@code google.cloud.networkmanagement.v1.Trace} + */ +public final class Trace extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.Trace) + TraceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Trace.newBuilder() to construct. + private Trace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Trace() { + steps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Trace(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Trace( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder subBuilder = null; + if (endpointInfo_ != null) { + subBuilder = endpointInfo_.toBuilder(); + } + endpointInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.EndpointInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endpointInfo_); + endpointInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + steps_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + steps_.add( + input.readMessage( + com.google.cloud.networkmanagement.v1.Step.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Trace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Trace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.Trace.class, + com.google.cloud.networkmanagement.v1.Trace.Builder.class); + } + + public static final int ENDPOINT_INFO_FIELD_NUMBER = 1; + private com.google.cloud.networkmanagement.v1.EndpointInfo endpointInfo_; + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return Whether the endpointInfo field is set. + */ + @java.lang.Override + public boolean hasEndpointInfo() { + return endpointInfo_ != null; + } + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return The endpointInfo. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointInfo getEndpointInfo() { + return endpointInfo_ == null + ? com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder getEndpointInfoOrBuilder() { + return getEndpointInfo(); + } + + public static final int STEPS_FIELD_NUMBER = 2; + private java.util.List steps_; + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public java.util.List getStepsList() { + return steps_; + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public java.util.List + getStepsOrBuilderList() { + return steps_; + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Step getSteps(int index) { + return steps_.get(index); + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.StepOrBuilder getStepsOrBuilder(int index) { + return steps_.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 (endpointInfo_ != null) { + output.writeMessage(1, getEndpointInfo()); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(2, steps_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (endpointInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointInfo()); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, steps_.get(i)); + } + size += unknownFields.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.networkmanagement.v1.Trace)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.Trace other = + (com.google.cloud.networkmanagement.v1.Trace) obj; + + if (hasEndpointInfo() != other.hasEndpointInfo()) return false; + if (hasEndpointInfo()) { + if (!getEndpointInfo().equals(other.getEndpointInfo())) return false; + } + if (!getStepsList().equals(other.getStepsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointInfo()) { + hash = (37 * hash) + ENDPOINT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getEndpointInfo().hashCode(); + } + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.Trace parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.Trace 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.networkmanagement.v1.Trace parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.Trace 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.networkmanagement.v1.Trace parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.Trace parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.Trace parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.Trace 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.networkmanagement.v1.Trace parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.Trace 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.networkmanagement.v1.Trace parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.Trace 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.networkmanagement.v1.Trace 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; + } + /** + * + * + *
+   * Trace represents one simulated packet forwarding path.
+   *   * Each trace contains multiple ordered steps.
+   *   * Each step is in a particular state with associated configuration.
+   *   * State is categorized as final or non-final states.
+   *   * Each final state has a reason associated.
+   *   * Each trace must end with a final state (the last step).
+   * ```
+   *   |---------------------Trace----------------------|
+   *   Step1(State) Step2(State) ---  StepN(State(final))
+   * ```
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.Trace} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.Trace) + com.google.cloud.networkmanagement.v1.TraceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Trace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Trace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.Trace.class, + com.google.cloud.networkmanagement.v1.Trace.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.Trace.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStepsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (endpointInfoBuilder_ == null) { + endpointInfo_ = null; + } else { + endpointInfo_ = null; + endpointInfoBuilder_ = null; + } + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + stepsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_Trace_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Trace getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.Trace.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Trace build() { + com.google.cloud.networkmanagement.v1.Trace result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.Trace buildPartial() { + com.google.cloud.networkmanagement.v1.Trace result = + new com.google.cloud.networkmanagement.v1.Trace(this); + int from_bitField0_ = bitField0_; + if (endpointInfoBuilder_ == null) { + result.endpointInfo_ = endpointInfo_; + } else { + result.endpointInfo_ = endpointInfoBuilder_.build(); + } + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + 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.networkmanagement.v1.Trace) { + return mergeFrom((com.google.cloud.networkmanagement.v1.Trace) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.Trace other) { + if (other == com.google.cloud.networkmanagement.v1.Trace.getDefaultInstance()) return this; + if (other.hasEndpointInfo()) { + mergeEndpointInfo(other.getEndpointInfo()); + } + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000001); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.Trace parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.networkmanagement.v1.Trace) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.networkmanagement.v1.EndpointInfo endpointInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.EndpointInfo, + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder> + endpointInfoBuilder_; + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return Whether the endpointInfo field is set. + */ + public boolean hasEndpointInfo() { + return endpointInfoBuilder_ != null || endpointInfo_ != null; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return The endpointInfo. + */ + public com.google.cloud.networkmanagement.v1.EndpointInfo getEndpointInfo() { + if (endpointInfoBuilder_ == null) { + return endpointInfo_ == null + ? com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } else { + return endpointInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public Builder setEndpointInfo(com.google.cloud.networkmanagement.v1.EndpointInfo value) { + if (endpointInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointInfo_ = value; + onChanged(); + } else { + endpointInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public Builder setEndpointInfo( + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder builderForValue) { + if (endpointInfoBuilder_ == null) { + endpointInfo_ = builderForValue.build(); + onChanged(); + } else { + endpointInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public Builder mergeEndpointInfo(com.google.cloud.networkmanagement.v1.EndpointInfo value) { + if (endpointInfoBuilder_ == null) { + if (endpointInfo_ != null) { + endpointInfo_ = + com.google.cloud.networkmanagement.v1.EndpointInfo.newBuilder(endpointInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + endpointInfo_ = value; + } + onChanged(); + } else { + endpointInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public Builder clearEndpointInfo() { + if (endpointInfoBuilder_ == null) { + endpointInfo_ = null; + onChanged(); + } else { + endpointInfo_ = null; + endpointInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public com.google.cloud.networkmanagement.v1.EndpointInfo.Builder getEndpointInfoBuilder() { + + onChanged(); + return getEndpointInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + public com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder getEndpointInfoOrBuilder() { + if (endpointInfoBuilder_ != null) { + return endpointInfoBuilder_.getMessageOrBuilder(); + } else { + return endpointInfo_ == null + ? com.google.cloud.networkmanagement.v1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.EndpointInfo, + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder> + getEndpointInfoFieldBuilder() { + if (endpointInfoBuilder_ == null) { + endpointInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.EndpointInfo, + com.google.cloud.networkmanagement.v1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder>( + getEndpointInfo(), getParentForChildren(), isClean()); + endpointInfo_ = null; + } + return endpointInfoBuilder_; + } + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + steps_ = new java.util.ArrayList(steps_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Step, + com.google.cloud.networkmanagement.v1.Step.Builder, + com.google.cloud.networkmanagement.v1.StepOrBuilder> + stepsBuilder_; + + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public java.util.List getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder setSteps(int index, com.google.cloud.networkmanagement.v1.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.cloud.networkmanagement.v1.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addSteps(com.google.cloud.networkmanagement.v1.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addSteps(int index, com.google.cloud.networkmanagement.v1.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addSteps(com.google.cloud.networkmanagement.v1.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.cloud.networkmanagement.v1.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder addAllSteps( + java.lang.Iterable values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1.Step.Builder getStepsBuilder(int index) { + return getStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1.StepOrBuilder getStepsOrBuilder(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public java.util.List + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1.Step.Builder addStepsBuilder() { + return getStepsFieldBuilder() + .addBuilder(com.google.cloud.networkmanagement.v1.Step.getDefaultInstance()); + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1.Step.Builder addStepsBuilder(int index) { + return getStepsFieldBuilder() + .addBuilder(index, com.google.cloud.networkmanagement.v1.Step.getDefaultInstance()); + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + public java.util.List + getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Step, + com.google.cloud.networkmanagement.v1.Step.Builder, + com.google.cloud.networkmanagement.v1.StepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1.Step, + com.google.cloud.networkmanagement.v1.Step.Builder, + com.google.cloud.networkmanagement.v1.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + @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.networkmanagement.v1.Trace) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.Trace) + private static final com.google.cloud.networkmanagement.v1.Trace DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.Trace(); + } + + public static com.google.cloud.networkmanagement.v1.Trace getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Trace parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Trace(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.Trace getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TraceOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TraceOrBuilder.java new file mode 100644 index 00000000..3b2b65ea --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TraceOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface TraceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.Trace) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return Whether the endpointInfo field is set. + */ + boolean hasEndpointInfo(); + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * + * @return The endpointInfo. + */ + com.google.cloud.networkmanagement.v1.EndpointInfo getEndpointInfo(); + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + com.google.cloud.networkmanagement.v1.EndpointInfoOrBuilder getEndpointInfoOrBuilder(); + + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + java.util.List getStepsList(); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + com.google.cloud.networkmanagement.v1.Step getSteps(int index); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + int getStepsCount(); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + java.util.List + getStepsOrBuilderList(); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + com.google.cloud.networkmanagement.v1.StepOrBuilder getStepsOrBuilder(int index); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TraceProto.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TraceProto.java new file mode 100644 index 00000000..847e9655 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/TraceProto.java @@ -0,0 +1,522 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public final class TraceProto { + private TraceProto() {} + + 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_networkmanagement_v1_Trace_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_Trace_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_Step_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_Step_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_InstanceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_InstanceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_NetworkInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_NetworkInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_FirewallInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_FirewallInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_RouteInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_RouteInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_EndpointInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_EndpointInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_DeliverInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_DeliverInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_ForwardInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_ForwardInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_AbortInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_AbortInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_DropInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_DropInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_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/networkmanagement/v1/trac" + + "e.proto\022!google.cloud.networkmanagement." + + "v1\032\034google/api/annotations.proto\"\207\001\n\005Tra" + + "ce\022F\n\rendpoint_info\030\001 \001(\0132/.google.cloud" + + ".networkmanagement.v1.EndpointInfo\0226\n\005st" + + "eps\030\002 \003(\0132\'.google.cloud.networkmanageme" + + "nt.v1.Step\"\356\r\n\004Step\022\023\n\013description\030\001 \001(\t" + + "\022<\n\005state\030\002 \001(\0162-.google.cloud.networkma" + + "nagement.v1.Step.State\022\023\n\013causes_drop\030\003 " + + "\001(\010\022\022\n\nproject_id\030\004 \001(\t\022C\n\010instance\030\005 \001(" + + "\0132/.google.cloud.networkmanagement.v1.In" + + "stanceInfoH\000\022C\n\010firewall\030\006 \001(\0132/.google." + + "cloud.networkmanagement.v1.FirewallInfoH" + + "\000\022=\n\005route\030\007 \001(\0132,.google.cloud.networkm" + + "anagement.v1.RouteInfoH\000\022C\n\010endpoint\030\010 \001" + + "(\0132/.google.cloud.networkmanagement.v1.E" + + "ndpointInfoH\000\022P\n\017forwarding_rule\030\t \001(\01325" + + ".google.cloud.networkmanagement.v1.Forwa" + + "rdingRuleInfoH\000\022H\n\013vpn_gateway\030\n \001(\01321.g" + + "oogle.cloud.networkmanagement.v1.VpnGate" + + "wayInfoH\000\022F\n\nvpn_tunnel\030\013 \001(\01320.google.c" + + "loud.networkmanagement.v1.VpnTunnelInfoH" + + "\000\022A\n\007deliver\030\014 \001(\0132..google.cloud.networ" + + "kmanagement.v1.DeliverInfoH\000\022A\n\007forward\030" + + "\r \001(\0132..google.cloud.networkmanagement.v" + + "1.ForwardInfoH\000\022=\n\005abort\030\016 \001(\0132,.google." + + "cloud.networkmanagement.v1.AbortInfoH\000\022;" + + "\n\004drop\030\017 \001(\0132+.google.cloud.networkmanag" + + "ement.v1.DropInfoH\000\022L\n\rload_balancer\030\020 \001" + + "(\01323.google.cloud.networkmanagement.v1.L" + + "oadBalancerInfoH\000\022A\n\007network\030\021 \001(\0132..goo" + + "gle.cloud.networkmanagement.v1.NetworkIn" + + "foH\000\022F\n\ngke_master\030\022 \001(\01320.google.cloud." + + "networkmanagement.v1.GKEMasterInfoH\000\022U\n\022" + + "cloud_sql_instance\030\023 \001(\01327.google.cloud." + + "networkmanagement.v1.CloudSQLInstanceInf" + + "oH\000\"\270\004\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\027\n\023" + + "START_FROM_INSTANCE\020\001\022\027\n\023START_FROM_INTE" + + "RNET\020\002\022\036\n\032START_FROM_PRIVATE_NETWORK\020\003\022\031" + + "\n\025START_FROM_GKE_MASTER\020\025\022!\n\035START_FROM_" + + "CLOUD_SQL_INSTANCE\020\026\022\037\n\033APPLY_INGRESS_FI" + + "REWALL_RULE\020\004\022\036\n\032APPLY_EGRESS_FIREWALL_R" + + "ULE\020\005\022\017\n\013APPLY_ROUTE\020\006\022\031\n\025APPLY_FORWARDI" + + "NG_RULE\020\007\022\025\n\021SPOOFING_APPROVED\020\010\022\026\n\022ARRI" + + "VE_AT_INSTANCE\020\t\022$\n ARRIVE_AT_INTERNAL_L" + + "OAD_BALANCER\020\n\022$\n ARRIVE_AT_EXTERNAL_LOA" + + "D_BALANCER\020\013\022\031\n\025ARRIVE_AT_VPN_GATEWAY\020\014\022" + + "\030\n\024ARRIVE_AT_VPN_TUNNEL\020\r\022\007\n\003NAT\020\016\022\024\n\020PR" + + "OXY_CONNECTION\020\017\022\013\n\007DELIVER\020\020\022\010\n\004DROP\020\021\022" + + "\013\n\007FORWARD\020\022\022\t\n\005ABORT\020\023\022\035\n\031VIEWER_PERMIS" + + "SION_MISSING\020\024B\013\n\tstep_info\"\266\001\n\014Instance" + + "Info\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022" + + "\021\n\tinterface\030\003 \001(\t\022\023\n\013network_uri\030\004 \001(\t\022" + + "\023\n\013internal_ip\030\005 \001(\t\022\023\n\013external_ip\030\006 \001(" + + "\t\022\024\n\014network_tags\030\007 \003(\t\022\033\n\017service_accou" + + "nt\030\010 \001(\tB\002\030\001\"J\n\013NetworkInfo\022\024\n\014display_n" + + "ame\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\030\n\020matched_ip_ran" + + "ge\030\004 \001(\t\"\265\003\n\014FirewallInfo\022\024\n\014display_nam" + + "e\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\021\n\tdirection\030\003 \001(\t\022" + + "\016\n\006action\030\004 \001(\t\022\020\n\010priority\030\005 \001(\005\022\023\n\013net" + + "work_uri\030\006 \001(\t\022\023\n\013target_tags\030\007 \003(\t\022\037\n\027t" + + "arget_service_accounts\030\010 \003(\t\022\016\n\006policy\030\t" + + " \001(\t\022\\\n\022firewall_rule_type\030\n \001(\0162@.googl" + + "e.cloud.networkmanagement.v1.FirewallInf" + + "o.FirewallRuleType\"\223\001\n\020FirewallRuleType\022" + + "\"\n\036FIREWALL_RULE_TYPE_UNSPECIFIED\020\000\022%\n!H" + + "IERARCHICAL_FIREWALL_POLICY_RULE\020\001\022\025\n\021VP" + + "C_FIREWALL_RULE\020\002\022\035\n\031IMPLIED_VPC_FIREWAL" + + "L_RULE\020\003\"\330\005\n\tRouteInfo\022J\n\nroute_type\030\010 \001" + + "(\01626.google.cloud.networkmanagement.v1.R" + + "outeInfo.RouteType\022O\n\rnext_hop_type\030\t \001(" + + "\01628.google.cloud.networkmanagement.v1.Ro" + + "uteInfo.NextHopType\022\024\n\014display_name\030\001 \001(" + + "\t\022\013\n\003uri\030\002 \001(\t\022\025\n\rdest_ip_range\030\003 \001(\t\022\020\n" + + "\010next_hop\030\004 \001(\t\022\023\n\013network_uri\030\005 \001(\t\022\020\n\010" + + "priority\030\006 \001(\005\022\025\n\rinstance_tags\030\007 \003(\t\"\211\001" + + "\n\tRouteType\022\032\n\026ROUTE_TYPE_UNSPECIFIED\020\000\022" + + "\n\n\006SUBNET\020\001\022\n\n\006STATIC\020\002\022\013\n\007DYNAMIC\020\003\022\022\n\016" + + "PEERING_SUBNET\020\004\022\022\n\016PEERING_STATIC\020\005\022\023\n\017" + + "PEERING_DYNAMIC\020\006\"\227\002\n\013NextHopType\022\035\n\031NEX" + + "T_HOP_TYPE_UNSPECIFIED\020\000\022\017\n\013NEXT_HOP_IP\020" + + "\001\022\025\n\021NEXT_HOP_INSTANCE\020\002\022\024\n\020NEXT_HOP_NET" + + "WORK\020\003\022\024\n\020NEXT_HOP_PEERING\020\004\022\031\n\025NEXT_HOP" + + "_INTERCONNECT\020\005\022\027\n\023NEXT_HOP_VPN_TUNNEL\020\006" + + "\022\030\n\024NEXT_HOP_VPN_GATEWAY\020\007\022\035\n\031NEXT_HOP_I" + + "NTERNET_GATEWAY\020\010\022\026\n\022NEXT_HOP_BLACKHOLE\020" + + "\t\022\020\n\014NEXT_HOP_ILB\020\n\"\237\001\n\022ForwardingRuleIn" + + "fo\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\030\n" + + "\020matched_protocol\030\003 \001(\t\022\032\n\022matched_port_" + + "range\030\006 \001(\t\022\013\n\003vip\030\004 \001(\t\022\016\n\006target\030\005 \001(\t" + + "\022\023\n\013network_uri\030\007 \001(\t\"\251\004\n\020LoadBalancerIn" + + "fo\022`\n\022load_balancer_type\030\001 \001(\0162D.google." + + "cloud.networkmanagement.v1.LoadBalancerI" + + "nfo.LoadBalancerType\022\030\n\020health_check_uri" + + "\030\002 \001(\t\022H\n\010backends\030\003 \003(\01326.google.cloud." + + "networkmanagement.v1.LoadBalancerBackend" + + "\022U\n\014backend_type\030\004 \001(\0162?.google.cloud.ne" + + "tworkmanagement.v1.LoadBalancerInfo.Back" + + "endType\022\023\n\013backend_uri\030\005 \001(\t\"\217\001\n\020LoadBal" + + "ancerType\022\"\n\036LOAD_BALANCER_TYPE_UNSPECIF" + + "IED\020\000\022\024\n\020INTERNAL_TCP_UDP\020\001\022\023\n\017NETWORK_T" + + "CP_UDP\020\002\022\016\n\nHTTP_PROXY\020\003\022\r\n\tTCP_PROXY\020\004\022" + + "\r\n\tSSL_PROXY\020\005\"Q\n\013BackendType\022\034\n\030BACKEND" + + "_TYPE_UNSPECIFIED\020\000\022\023\n\017BACKEND_SERVICE\020\001" + + "\022\017\n\013TARGET_POOL\020\002\"\366\002\n\023LoadBalancerBacken" + + "d\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022t\n\033" + + "health_check_firewall_state\030\003 \001(\0162O.goog" + + "le.cloud.networkmanagement.v1.LoadBalanc" + + "erBackend.HealthCheckFirewallState\022,\n$he" + + "alth_check_allowing_firewall_rules\030\004 \003(\t" + + "\022,\n$health_check_blocking_firewall_rules" + + "\030\005 \003(\t\"j\n\030HealthCheckFirewallState\022+\n\'HE" + + "ALTH_CHECK_FIREWALL_STATE_UNSPECIFIED\020\000\022" + + "\016\n\nCONFIGURED\020\001\022\021\n\rMISCONFIGURED\020\002\"\204\001\n\016V" + + "pnGatewayInfo\022\024\n\014display_name\030\001 \001(\t\022\013\n\003u" + + "ri\030\002 \001(\t\022\023\n\013network_uri\030\003 \001(\t\022\022\n\nip_addr" + + "ess\030\004 \001(\t\022\026\n\016vpn_tunnel_uri\030\005 \001(\t\022\016\n\006reg" + + "ion\030\006 \001(\t\"\356\002\n\rVpnTunnelInfo\022\024\n\014display_n" + + "ame\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\026\n\016source_gateway" + + "\030\003 \001(\t\022\026\n\016remote_gateway\030\004 \001(\t\022\031\n\021remote" + + "_gateway_ip\030\005 \001(\t\022\031\n\021source_gateway_ip\030\006" + + " \001(\t\022\023\n\013network_uri\030\007 \001(\t\022\016\n\006region\030\010 \001(" + + "\t\022R\n\014routing_type\030\t \001(\0162<.google.cloud.n" + + "etworkmanagement.v1.VpnTunnelInfo.Routin" + + "gType\"[\n\013RoutingType\022\034\n\030ROUTING_TYPE_UNS" + + "PECIFIED\020\000\022\017\n\013ROUTE_BASED\020\001\022\020\n\014POLICY_BA" + + "SED\020\002\022\013\n\007DYNAMIC\020\003\"\267\001\n\014EndpointInfo\022\021\n\ts" + + "ource_ip\030\001 \001(\t\022\026\n\016destination_ip\030\002 \001(\t\022\020" + + "\n\010protocol\030\003 \001(\t\022\023\n\013source_port\030\004 \001(\005\022\030\n" + + "\020destination_port\030\005 \001(\005\022\032\n\022source_networ" + + "k_uri\030\006 \001(\t\022\037\n\027destination_network_uri\030\007" + + " \001(\t\"\340\001\n\013DeliverInfo\022E\n\006target\030\001 \001(\01625.g" + + "oogle.cloud.networkmanagement.v1.Deliver" + + "Info.Target\022\024\n\014resource_uri\030\002 \001(\t\"t\n\006Tar" + + "get\022\026\n\022TARGET_UNSPECIFIED\020\000\022\014\n\010INSTANCE\020" + + "\001\022\014\n\010INTERNET\020\002\022\016\n\nGOOGLE_API\020\003\022\016\n\nGKE_M" + + "ASTER\020\004\022\026\n\022CLOUD_SQL_INSTANCE\020\005\"\215\002\n\013Forw" + + "ardInfo\022E\n\006target\030\001 \001(\01625.google.cloud.n" + + "etworkmanagement.v1.ForwardInfo.Target\022\024" + + "\n\014resource_uri\030\002 \001(\t\"\240\001\n\006Target\022\026\n\022TARGE" + + "T_UNSPECIFIED\020\000\022\017\n\013PEERING_VPC\020\001\022\017\n\013VPN_" + + "GATEWAY\020\002\022\020\n\014INTERCONNECT\020\003\022\016\n\nGKE_MASTE" + + "R\020\004\022\"\n\036IMPORTED_CUSTOM_ROUTE_NEXT_HOP\020\005\022" + + "\026\n\022CLOUD_SQL_INSTANCE\020\006\"\342\003\n\tAbortInfo\022A\n" + + "\005cause\030\001 \001(\01622.google.cloud.networkmanag" + + "ement.v1.AbortInfo.Cause\022\024\n\014resource_uri" + + "\030\002 \001(\t\"\373\002\n\005Cause\022\025\n\021CAUSE_UNSPECIFIED\020\000\022" + + "\023\n\017UNKNOWN_NETWORK\020\001\022\016\n\nUNKNOWN_IP\020\002\022\023\n\017" + + "UNKNOWN_PROJECT\020\003\022\025\n\021PERMISSION_DENIED\020\004" + + "\022\026\n\022NO_SOURCE_LOCATION\020\005\022\024\n\020INVALID_ARGU" + + "MENT\020\006\022\022\n\016NO_EXTERNAL_IP\020\007\022\032\n\026UNINTENDED" + + "_DESTINATION\020\010\022\022\n\016TRACE_TOO_LONG\020\t\022\022\n\016IN" + + "TERNAL_ERROR\020\n\022\035\n\031SOURCE_ENDPOINT_NOT_FO" + + "UND\020\013\022\035\n\031MISMATCHED_SOURCE_NETWORK\020\014\022\"\n\036" + + "DESTINATION_ENDPOINT_NOT_FOUND\020\r\022\"\n\036MISM" + + "ATCHED_DESTINATION_NETWORK\020\016\"\232\006\n\010DropInf" + + "o\022@\n\005cause\030\001 \001(\01621.google.cloud.networkm" + + "anagement.v1.DropInfo.Cause\022\024\n\014resource_" + + "uri\030\002 \001(\t\"\265\005\n\005Cause\022\025\n\021CAUSE_UNSPECIFIED" + + "\020\000\022\034\n\030UNKNOWN_EXTERNAL_ADDRESS\020\001\022\031\n\025FORE" + + "IGN_IP_DISALLOWED\020\002\022\021\n\rFIREWALL_RULE\020\003\022\014" + + "\n\010NO_ROUTE\020\004\022\023\n\017ROUTE_BLACKHOLE\020\005\022\027\n\023ROU" + + "TE_WRONG_NETWORK\020\006\022\037\n\033PRIVATE_TRAFFIC_TO" + + "_INTERNET\020\007\022$\n PRIVATE_GOOGLE_ACCESS_DIS" + + "ALLOWED\020\010\022\027\n\023NO_EXTERNAL_ADDRESS\020\t\022\034\n\030UN" + + "KNOWN_INTERNAL_ADDRESS\020\n\022\034\n\030FORWARDING_R" + + "ULE_MISMATCH\020\013\022 \n\034FORWARDING_RULE_NO_INS" + + "TANCES\020\014\0228\n4FIREWALL_BLOCKING_LOAD_BALAN" + + "CER_BACKEND_HEALTH_CHECK\020\r\022\030\n\024INSTANCE_N" + + "OT_RUNNING\020\016\022\030\n\024TRAFFIC_TYPE_BLOCKED\020\017\022\"" + + "\n\036GKE_MASTER_UNAUTHORIZED_ACCESS\020\020\022*\n&CL" + + "OUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS\020\021\022\036" + + "\n\032DROPPED_INSIDE_GKE_SERVICE\020\022\022$\n DROPPE" + + "D_INSIDE_CLOUD_SQL_SERVICE\020\023\022%\n!GOOGLE_M" + + "ANAGED_SERVICE_NO_PEERING\020\024\022$\n CLOUD_SQL" + + "_INSTANCE_NO_IP_ADDRESS\020\025\"k\n\rGKEMasterIn" + + "fo\022\023\n\013cluster_uri\030\002 \001(\t\022\033\n\023cluster_netwo" + + "rk_uri\030\004 \001(\t\022\023\n\013internal_ip\030\005 \001(\t\022\023\n\013ext" + + "ernal_ip\030\006 \001(\t\"\210\001\n\024CloudSQLInstanceInfo\022" + + "\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\023\n\013ne" + + "twork_uri\030\004 \001(\t\022\023\n\013internal_ip\030\005 \001(\t\022\023\n\013" + + "external_ip\030\006 \001(\t\022\016\n\006region\030\007 \001(\tB\370\001\n%co" + + "m.google.cloud.networkmanagement.v1B\nTra" + + "ceProtoP\001ZRgoogle.golang.org/genproto/go" + + "ogleapis/cloud/networkmanagement/v1;netw" + + "orkmanagement\252\002!Google.Cloud.NetworkMana" + + "gement.V1\312\002!Google\\Cloud\\NetworkManageme" + + "nt\\V1\352\002$Google::Cloud::NetworkManagement" + + "::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_networkmanagement_v1_Trace_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_networkmanagement_v1_Trace_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_Trace_descriptor, + new java.lang.String[] { + "EndpointInfo", "Steps", + }); + internal_static_google_cloud_networkmanagement_v1_Step_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_networkmanagement_v1_Step_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_Step_descriptor, + new java.lang.String[] { + "Description", + "State", + "CausesDrop", + "ProjectId", + "Instance", + "Firewall", + "Route", + "Endpoint", + "ForwardingRule", + "VpnGateway", + "VpnTunnel", + "Deliver", + "Forward", + "Abort", + "Drop", + "LoadBalancer", + "Network", + "GkeMaster", + "CloudSqlInstance", + "StepInfo", + }); + internal_static_google_cloud_networkmanagement_v1_InstanceInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_networkmanagement_v1_InstanceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_InstanceInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "Interface", + "NetworkUri", + "InternalIp", + "ExternalIp", + "NetworkTags", + "ServiceAccount", + }); + internal_static_google_cloud_networkmanagement_v1_NetworkInfo_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_networkmanagement_v1_NetworkInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_NetworkInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "MatchedIpRange", + }); + internal_static_google_cloud_networkmanagement_v1_FirewallInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_networkmanagement_v1_FirewallInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_FirewallInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "Direction", + "Action", + "Priority", + "NetworkUri", + "TargetTags", + "TargetServiceAccounts", + "Policy", + "FirewallRuleType", + }); + internal_static_google_cloud_networkmanagement_v1_RouteInfo_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_networkmanagement_v1_RouteInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_RouteInfo_descriptor, + new java.lang.String[] { + "RouteType", + "NextHopType", + "DisplayName", + "Uri", + "DestIpRange", + "NextHop", + "NetworkUri", + "Priority", + "InstanceTags", + }); + internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_ForwardingRuleInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "MatchedProtocol", + "MatchedPortRange", + "Vip", + "Target", + "NetworkUri", + }); + internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_LoadBalancerInfo_descriptor, + new java.lang.String[] { + "LoadBalancerType", "HealthCheckUri", "Backends", "BackendType", "BackendUri", + }); + internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_LoadBalancerBackend_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "HealthCheckFirewallState", + "HealthCheckAllowingFirewallRules", + "HealthCheckBlockingFirewallRules", + }); + internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "NetworkUri", "IpAddress", "VpnTunnelUri", "Region", + }); + internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "SourceGateway", + "RemoteGateway", + "RemoteGatewayIp", + "SourceGatewayIp", + "NetworkUri", + "Region", + "RoutingType", + }); + internal_static_google_cloud_networkmanagement_v1_EndpointInfo_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_networkmanagement_v1_EndpointInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_EndpointInfo_descriptor, + new java.lang.String[] { + "SourceIp", + "DestinationIp", + "Protocol", + "SourcePort", + "DestinationPort", + "SourceNetworkUri", + "DestinationNetworkUri", + }); + internal_static_google_cloud_networkmanagement_v1_DeliverInfo_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_networkmanagement_v1_DeliverInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_DeliverInfo_descriptor, + new java.lang.String[] { + "Target", "ResourceUri", + }); + internal_static_google_cloud_networkmanagement_v1_ForwardInfo_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_networkmanagement_v1_ForwardInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_ForwardInfo_descriptor, + new java.lang.String[] { + "Target", "ResourceUri", + }); + internal_static_google_cloud_networkmanagement_v1_AbortInfo_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_networkmanagement_v1_AbortInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_AbortInfo_descriptor, + new java.lang.String[] { + "Cause", "ResourceUri", + }); + internal_static_google_cloud_networkmanagement_v1_DropInfo_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_networkmanagement_v1_DropInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_DropInfo_descriptor, + new java.lang.String[] { + "Cause", "ResourceUri", + }); + internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_GKEMasterInfo_descriptor, + new java.lang.String[] { + "ClusterUri", "ClusterNetworkUri", "InternalIp", "ExternalIp", + }); + internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1_CloudSQLInstanceInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "NetworkUri", "InternalIp", "ExternalIp", "Region", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/UpdateConnectivityTestRequest.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/UpdateConnectivityTestRequest.java new file mode 100644 index 00000000..cdc73fcb --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/UpdateConnectivityTestRequest.java @@ -0,0 +1,1067 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * Request for the `UpdateConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} + */ +public final class UpdateConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) + UpdateConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateConnectivityTestRequest.newBuilder() to construct. + private UpdateConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateConnectivityTestRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = + input.readMessage( + com.google.cloud.networkmanagement.v1.ConnectivityTest.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .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. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .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. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + private com.google.cloud.networkmanagement.v1.ConnectivityTest resource_; + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ConnectivityTest getResource() { + return resource_ == null + ? com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : resource_; + } + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getResourceOrBuilder() { + return getResource(); + } + + 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 (resource_ != null) { + output.writeMessage(2, getResource()); + } + unknownFields.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 (resource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResource()); + } + size += unknownFields.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.networkmanagement.v1.UpdateConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource().equals(other.getResource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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 (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest 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.networkmanagement.v1.UpdateConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest 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.networkmanagement.v1.UpdateConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest 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.networkmanagement.v1.UpdateConnectivityTestRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + 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.networkmanagement.v1.UpdateConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest 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.networkmanagement.v1.UpdateConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `UpdateConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + if (resourceBuilder_ == null) { + resource_ = null; + } else { + resource_ = null; + resourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1_UpdateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(this); + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + if (resourceBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = resourceBuilder_.build(); + } + 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.networkmanagement.v1.UpdateConnectivityTestRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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.networkmanagement.v1.ConnectivityTest resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ConnectivityTest, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder> + resourceBuilder_; + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceBuilder_ != null || resource_ != null; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTest getResource() { + if (resourceBuilder_ == null) { + return resource_ == null + ? com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource(com.google.cloud.networkmanagement.v1.ConnectivityTest value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource( + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeResource(com.google.cloud.networkmanagement.v1.ConnectivityTest value) { + if (resourceBuilder_ == null) { + if (resource_ != null) { + resource_ = + com.google.cloud.networkmanagement.v1.ConnectivityTest.newBuilder(resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + resourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + resource_ = null; + onChanged(); + } else { + resource_ = null; + resourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder getResourceBuilder() { + + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null + ? com.google.cloud.networkmanagement.v1.ConnectivityTest.getDefaultInstance() + : resource_; + } + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ConnectivityTest, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1.ConnectivityTest, + com.google.cloud.networkmanagement.v1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder>( + getResource(), getParentForChildren(), isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + @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.networkmanagement.v1.UpdateConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.UpdateConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/UpdateConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/UpdateConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..a4f91895 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/UpdateConnectivityTestRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/reachability.proto + +package com.google.cloud.networkmanagement.v1; + +public interface UpdateConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + com.google.cloud.networkmanagement.v1.ConnectivityTest getResource(); + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkmanagement.v1.ConnectivityTestOrBuilder getResourceOrBuilder(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnGatewayInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnGatewayInfo.java new file mode 100644 index 00000000..f2b6f925 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnGatewayInfo.java @@ -0,0 +1,1545 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine VPN gateway.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.VpnGatewayInfo} + */ +public final class VpnGatewayInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.VpnGatewayInfo) + VpnGatewayInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use VpnGatewayInfo.newBuilder() to construct. + private VpnGatewayInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpnGatewayInfo() { + displayName_ = ""; + uri_ = ""; + networkUri_ = ""; + ipAddress_ = ""; + vpnTunnelUri_ = ""; + region_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpnGatewayInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VpnGatewayInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + ipAddress_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + vpnTunnelUri_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + region_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.class, + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 4; + private volatile java.lang.Object ipAddress_; + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @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 VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @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 VPN_TUNNEL_URI_FIELD_NUMBER = 5; + private volatile java.lang.Object vpnTunnelUri_; + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The vpnTunnelUri. + */ + @java.lang.Override + public java.lang.String getVpnTunnelUri() { + java.lang.Object ref = vpnTunnelUri_; + 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(); + vpnTunnelUri_ = s; + return s; + } + } + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The bytes for vpnTunnelUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpnTunnelUriBytes() { + java.lang.Object ref = vpnTunnelUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpnTunnelUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 6; + private volatile java.lang.Object region_; + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + 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(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, networkUri_); + } + if (!getIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ipAddress_); + } + if (!getVpnTunnelUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, vpnTunnelUri_); + } + if (!getRegionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, region_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, networkUri_); + } + if (!getIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ipAddress_); + } + if (!getVpnTunnelUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, vpnTunnelUri_); + } + if (!getRegionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, region_); + } + size += unknownFields.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.networkmanagement.v1.VpnGatewayInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.VpnGatewayInfo other = + (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getVpnTunnelUri().equals(other.getVpnTunnelUri())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + VPN_TUNNEL_URI_FIELD_NUMBER; + hash = (53 * hash) + getVpnTunnelUri().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.VpnGatewayInfo 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.networkmanagement.v1.VpnGatewayInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.VpnGatewayInfo 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.networkmanagement.v1.VpnGatewayInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.VpnGatewayInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.VpnGatewayInfo 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.networkmanagement.v1.VpnGatewayInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.VpnGatewayInfo 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.networkmanagement.v1.VpnGatewayInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.VpnGatewayInfo 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.networkmanagement.v1.VpnGatewayInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine VPN gateway.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.VpnGatewayInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.VpnGatewayInfo) + com.google.cloud.networkmanagement.v1.VpnGatewayInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.class, + com.google.cloud.networkmanagement.v1.VpnGatewayInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.VpnGatewayInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + networkUri_ = ""; + + ipAddress_ = ""; + + vpnTunnelUri_ = ""; + + region_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnGatewayInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnGatewayInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnGatewayInfo build() { + com.google.cloud.networkmanagement.v1.VpnGatewayInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnGatewayInfo buildPartial() { + com.google.cloud.networkmanagement.v1.VpnGatewayInfo result = + new com.google.cloud.networkmanagement.v1.VpnGatewayInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.networkUri_ = networkUri_; + result.ipAddress_ = ipAddress_; + result.vpnTunnelUri_ = vpnTunnelUri_; + result.region_ = region_; + 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.networkmanagement.v1.VpnGatewayInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.VpnGatewayInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.VpnGatewayInfo other) { + if (other == com.google.cloud.networkmanagement.v1.VpnGatewayInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (!other.getVpnTunnelUri().isEmpty()) { + vpnTunnelUri_ = other.vpnTunnelUri_; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.VpnGatewayInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.VpnGatewayInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @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 VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @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 VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object vpnTunnelUri_ = ""; + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The vpnTunnelUri. + */ + public java.lang.String getVpnTunnelUri() { + java.lang.Object ref = vpnTunnelUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpnTunnelUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The bytes for vpnTunnelUri. + */ + public com.google.protobuf.ByteString getVpnTunnelUriBytes() { + java.lang.Object ref = vpnTunnelUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpnTunnelUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @param value The vpnTunnelUri to set. + * @return This builder for chaining. + */ + public Builder setVpnTunnelUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vpnTunnelUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearVpnTunnelUri() { + + vpnTunnelUri_ = getDefaultInstance().getVpnTunnelUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @param value The bytes for vpnTunnelUri to set. + * @return This builder for chaining. + */ + public Builder setVpnTunnelUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vpnTunnelUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + region_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + + region_ = getDefaultInstance().getRegion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + region_ = value; + 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.networkmanagement.v1.VpnGatewayInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.VpnGatewayInfo) + private static final com.google.cloud.networkmanagement.v1.VpnGatewayInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.VpnGatewayInfo(); + } + + public static com.google.cloud.networkmanagement.v1.VpnGatewayInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpnGatewayInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VpnGatewayInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.VpnGatewayInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnGatewayInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnGatewayInfoOrBuilder.java new file mode 100644 index 00000000..ed4c8279 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnGatewayInfoOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface VpnGatewayInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.VpnGatewayInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The vpnTunnelUri. + */ + java.lang.String getVpnTunnelUri(); + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The bytes for vpnTunnelUri. + */ + com.google.protobuf.ByteString getVpnTunnelUriBytes(); + + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The region. + */ + java.lang.String getRegion(); + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnTunnelInfo.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnTunnelInfo.java new file mode 100644 index 00000000..f5c3ab2c --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnTunnelInfo.java @@ -0,0 +1,2230 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine VPN tunnel.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.VpnTunnelInfo} + */ +public final class VpnTunnelInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1.VpnTunnelInfo) + VpnTunnelInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use VpnTunnelInfo.newBuilder() to construct. + private VpnTunnelInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpnTunnelInfo() { + displayName_ = ""; + uri_ = ""; + sourceGateway_ = ""; + remoteGateway_ = ""; + remoteGatewayIp_ = ""; + sourceGatewayIp_ = ""; + networkUri_ = ""; + region_ = ""; + routingType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpnTunnelInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VpnTunnelInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceGateway_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + remoteGateway_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + remoteGatewayIp_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceGatewayIp_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + region_ = s; + break; + } + case 72: + { + int rawValue = input.readEnum(); + + routingType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.class, + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.Builder.class); + } + + /** + * + * + *
+   * Types of VPN routing policy. For details, refer to [Networks and Tunnel
+   * routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/).
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType} + */ + public enum RoutingType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTING_TYPE_UNSPECIFIED = 0; + */ + ROUTING_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Route based VPN.
+     * 
+ * + * ROUTE_BASED = 1; + */ + ROUTE_BASED(1), + /** + * + * + *
+     * Policy based routing.
+     * 
+ * + * POLICY_BASED = 2; + */ + POLICY_BASED(2), + /** + * + * + *
+     * Dynamic (BGP) routing.
+     * 
+ * + * DYNAMIC = 3; + */ + DYNAMIC(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTING_TYPE_UNSPECIFIED = 0; + */ + public static final int ROUTING_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Route based VPN.
+     * 
+ * + * ROUTE_BASED = 1; + */ + public static final int ROUTE_BASED_VALUE = 1; + /** + * + * + *
+     * Policy based routing.
+     * 
+ * + * POLICY_BASED = 2; + */ + public static final int POLICY_BASED_VALUE = 2; + /** + * + * + *
+     * Dynamic (BGP) routing.
+     * 
+ * + * DYNAMIC = 3; + */ + public static final int DYNAMIC_VALUE = 3; + + 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 RoutingType 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 RoutingType forNumber(int value) { + switch (value) { + case 0: + return ROUTING_TYPE_UNSPECIFIED; + case 1: + return ROUTE_BASED; + case 2: + return POLICY_BASED; + case 3: + return DYNAMIC; + 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 RoutingType findValueByNumber(int number) { + return RoutingType.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.networkmanagement.v1.VpnTunnelInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RoutingType[] VALUES = values(); + + public static RoutingType 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 RoutingType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType) + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_GATEWAY_FIELD_NUMBER = 3; + private volatile java.lang.Object sourceGateway_; + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The sourceGateway. + */ + @java.lang.Override + public java.lang.String getSourceGateway() { + java.lang.Object ref = sourceGateway_; + 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(); + sourceGateway_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The bytes for sourceGateway. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceGatewayBytes() { + java.lang.Object ref = sourceGateway_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_GATEWAY_FIELD_NUMBER = 4; + private volatile java.lang.Object remoteGateway_; + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The remoteGateway. + */ + @java.lang.Override + public java.lang.String getRemoteGateway() { + java.lang.Object ref = remoteGateway_; + 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(); + remoteGateway_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The bytes for remoteGateway. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemoteGatewayBytes() { + java.lang.Object ref = remoteGateway_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_GATEWAY_IP_FIELD_NUMBER = 5; + private volatile java.lang.Object remoteGatewayIp_; + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The remoteGatewayIp. + */ + @java.lang.Override + public java.lang.String getRemoteGatewayIp() { + java.lang.Object ref = remoteGatewayIp_; + 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(); + remoteGatewayIp_ = s; + return s; + } + } + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The bytes for remoteGatewayIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemoteGatewayIpBytes() { + java.lang.Object ref = remoteGatewayIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_GATEWAY_IP_FIELD_NUMBER = 6; + private volatile java.lang.Object sourceGatewayIp_; + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The sourceGatewayIp. + */ + @java.lang.Override + public java.lang.String getSourceGatewayIp() { + java.lang.Object ref = sourceGatewayIp_; + 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(); + sourceGatewayIp_ = s; + return s; + } + } + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The bytes for sourceGatewayIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceGatewayIpBytes() { + java.lang.Object ref = sourceGatewayIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 7; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 8; + private volatile java.lang.Object region_; + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + 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(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROUTING_TYPE_FIELD_NUMBER = 9; + private int routingType_; + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * @return The enum numeric value on the wire for routingType. + */ + @java.lang.Override + public int getRoutingTypeValue() { + return routingType_; + } + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * @return The routingType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType getRoutingType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType result = + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.valueOf(routingType_); + return result == null + ? com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getSourceGatewayBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceGateway_); + } + if (!getRemoteGatewayBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, remoteGateway_); + } + if (!getRemoteGatewayIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remoteGatewayIp_); + } + if (!getSourceGatewayIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourceGatewayIp_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkUri_); + } + if (!getRegionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, region_); + } + if (routingType_ + != com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.ROUTING_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, routingType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getSourceGatewayBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceGateway_); + } + if (!getRemoteGatewayBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, remoteGateway_); + } + if (!getRemoteGatewayIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remoteGatewayIp_); + } + if (!getSourceGatewayIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sourceGatewayIp_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, networkUri_); + } + if (!getRegionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, region_); + } + if (routingType_ + != com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.ROUTING_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, routingType_); + } + size += unknownFields.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.networkmanagement.v1.VpnTunnelInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1.VpnTunnelInfo other = + (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getSourceGateway().equals(other.getSourceGateway())) return false; + if (!getRemoteGateway().equals(other.getRemoteGateway())) return false; + if (!getRemoteGatewayIp().equals(other.getRemoteGatewayIp())) return false; + if (!getSourceGatewayIp().equals(other.getSourceGatewayIp())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (routingType_ != other.routingType_) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + SOURCE_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getSourceGateway().hashCode(); + hash = (37 * hash) + REMOTE_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getRemoteGateway().hashCode(); + hash = (37 * hash) + REMOTE_GATEWAY_IP_FIELD_NUMBER; + hash = (53 * hash) + getRemoteGatewayIp().hashCode(); + hash = (37 * hash) + SOURCE_GATEWAY_IP_FIELD_NUMBER; + hash = (53 * hash) + getSourceGatewayIp().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (37 * hash) + ROUTING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + routingType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.VpnTunnelInfo 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.networkmanagement.v1.VpnTunnelInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.VpnTunnelInfo 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.networkmanagement.v1.VpnTunnelInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1.VpnTunnelInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.VpnTunnelInfo 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.networkmanagement.v1.VpnTunnelInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.VpnTunnelInfo 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.networkmanagement.v1.VpnTunnelInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1.VpnTunnelInfo 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.networkmanagement.v1.VpnTunnelInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine VPN tunnel.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1.VpnTunnelInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1.VpnTunnelInfo) + com.google.cloud.networkmanagement.v1.VpnTunnelInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.class, + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1.VpnTunnelInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + sourceGateway_ = ""; + + remoteGateway_ = ""; + + remoteGatewayIp_ = ""; + + sourceGatewayIp_ = ""; + + networkUri_ = ""; + + region_ = ""; + + routingType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1.TraceProto + .internal_static_google_cloud_networkmanagement_v1_VpnTunnelInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnTunnelInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnTunnelInfo build() { + com.google.cloud.networkmanagement.v1.VpnTunnelInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnTunnelInfo buildPartial() { + com.google.cloud.networkmanagement.v1.VpnTunnelInfo result = + new com.google.cloud.networkmanagement.v1.VpnTunnelInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.sourceGateway_ = sourceGateway_; + result.remoteGateway_ = remoteGateway_; + result.remoteGatewayIp_ = remoteGatewayIp_; + result.sourceGatewayIp_ = sourceGatewayIp_; + result.networkUri_ = networkUri_; + result.region_ = region_; + result.routingType_ = routingType_; + 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.networkmanagement.v1.VpnTunnelInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1.VpnTunnelInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1.VpnTunnelInfo other) { + if (other == com.google.cloud.networkmanagement.v1.VpnTunnelInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getSourceGateway().isEmpty()) { + sourceGateway_ = other.sourceGateway_; + onChanged(); + } + if (!other.getRemoteGateway().isEmpty()) { + remoteGateway_ = other.remoteGateway_; + onChanged(); + } + if (!other.getRemoteGatewayIp().isEmpty()) { + remoteGatewayIp_ = other.remoteGatewayIp_; + onChanged(); + } + if (!other.getSourceGatewayIp().isEmpty()) { + sourceGatewayIp_ = other.sourceGatewayIp_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + onChanged(); + } + if (other.routingType_ != 0) { + setRoutingTypeValue(other.getRoutingTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1.VpnTunnelInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1.VpnTunnelInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceGateway_ = ""; + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @return The sourceGateway. + */ + public java.lang.String getSourceGateway() { + java.lang.Object ref = sourceGateway_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGateway_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @return The bytes for sourceGateway. + */ + public com.google.protobuf.ByteString getSourceGatewayBytes() { + java.lang.Object ref = sourceGateway_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @param value The sourceGateway to set. + * @return This builder for chaining. + */ + public Builder setSourceGateway(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceGateway_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @return This builder for chaining. + */ + public Builder clearSourceGateway() { + + sourceGateway_ = getDefaultInstance().getSourceGateway(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @param value The bytes for sourceGateway to set. + * @return This builder for chaining. + */ + public Builder setSourceGatewayBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceGateway_ = value; + onChanged(); + return this; + } + + private java.lang.Object remoteGateway_ = ""; + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @return The remoteGateway. + */ + public java.lang.String getRemoteGateway() { + java.lang.Object ref = remoteGateway_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteGateway_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @return The bytes for remoteGateway. + */ + public com.google.protobuf.ByteString getRemoteGatewayBytes() { + java.lang.Object ref = remoteGateway_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @param value The remoteGateway to set. + * @return This builder for chaining. + */ + public Builder setRemoteGateway(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + remoteGateway_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @return This builder for chaining. + */ + public Builder clearRemoteGateway() { + + remoteGateway_ = getDefaultInstance().getRemoteGateway(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @param value The bytes for remoteGateway to set. + * @return This builder for chaining. + */ + public Builder setRemoteGatewayBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + remoteGateway_ = value; + onChanged(); + return this; + } + + private java.lang.Object remoteGatewayIp_ = ""; + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @return The remoteGatewayIp. + */ + public java.lang.String getRemoteGatewayIp() { + java.lang.Object ref = remoteGatewayIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteGatewayIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @return The bytes for remoteGatewayIp. + */ + public com.google.protobuf.ByteString getRemoteGatewayIpBytes() { + java.lang.Object ref = remoteGatewayIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @param value The remoteGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setRemoteGatewayIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + remoteGatewayIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearRemoteGatewayIp() { + + remoteGatewayIp_ = getDefaultInstance().getRemoteGatewayIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @param value The bytes for remoteGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setRemoteGatewayIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + remoteGatewayIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceGatewayIp_ = ""; + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @return The sourceGatewayIp. + */ + public java.lang.String getSourceGatewayIp() { + java.lang.Object ref = sourceGatewayIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGatewayIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @return The bytes for sourceGatewayIp. + */ + public com.google.protobuf.ByteString getSourceGatewayIpBytes() { + java.lang.Object ref = sourceGatewayIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @param value The sourceGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setSourceGatewayIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceGatewayIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearSourceGatewayIp() { + + sourceGatewayIp_ = getDefaultInstance().getSourceGatewayIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @param value The bytes for sourceGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setSourceGatewayIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceGatewayIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + region_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + + region_ = getDefaultInstance().getRegion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + region_ = value; + onChanged(); + return this; + } + + private int routingType_ = 0; + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * @return The enum numeric value on the wire for routingType. + */ + @java.lang.Override + public int getRoutingTypeValue() { + return routingType_; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * @param value The enum numeric value on the wire for routingType to set. + * @return This builder for chaining. + */ + public Builder setRoutingTypeValue(int value) { + + routingType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * @return The routingType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType getRoutingType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType result = + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.valueOf(routingType_); + return result == null + ? com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * @param value The routingType to set. + * @return This builder for chaining. + */ + public Builder setRoutingType( + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType value) { + if (value == null) { + throw new NullPointerException(); + } + + routingType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * @return This builder for chaining. + */ + public Builder clearRoutingType() { + + routingType_ = 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.networkmanagement.v1.VpnTunnelInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1.VpnTunnelInfo) + private static final com.google.cloud.networkmanagement.v1.VpnTunnelInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1.VpnTunnelInfo(); + } + + public static com.google.cloud.networkmanagement.v1.VpnTunnelInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpnTunnelInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VpnTunnelInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1.VpnTunnelInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnTunnelInfoOrBuilder.java b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnTunnelInfoOrBuilder.java new file mode 100644 index 00000000..5f7f379e --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/VpnTunnelInfoOrBuilder.java @@ -0,0 +1,250 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1/trace.proto + +package com.google.cloud.networkmanagement.v1; + +public interface VpnTunnelInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1.VpnTunnelInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The sourceGateway. + */ + java.lang.String getSourceGateway(); + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The bytes for sourceGateway. + */ + com.google.protobuf.ByteString getSourceGatewayBytes(); + + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The remoteGateway. + */ + java.lang.String getRemoteGateway(); + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The bytes for remoteGateway. + */ + com.google.protobuf.ByteString getRemoteGatewayBytes(); + + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The remoteGatewayIp. + */ + java.lang.String getRemoteGatewayIp(); + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The bytes for remoteGatewayIp. + */ + com.google.protobuf.ByteString getRemoteGatewayIpBytes(); + + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The sourceGatewayIp. + */ + java.lang.String getSourceGatewayIp(); + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The bytes for sourceGatewayIp. + */ + com.google.protobuf.ByteString getSourceGatewayIpBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The region. + */ + java.lang.String getRegion(); + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); + + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * @return The enum numeric value on the wire for routingType. + */ + int getRoutingTypeValue(); + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * @return The routingType. + */ + com.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType getRoutingType(); +} diff --git a/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/connectivity_test.proto b/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/connectivity_test.proto new file mode 100644 index 00000000..fed96ce1 --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/connectivity_test.proto @@ -0,0 +1,225 @@ +// 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 +// +// 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.networkmanagement.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1/trace.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/networkmanagement/v1;networkmanagement"; +option java_multiple_files = true; +option java_outer_classname = "TestOuterClass"; +option java_package = "com.google.cloud.networkmanagement.v1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1"; + +// A Connectivity Test for a network reachability analysis. +message ConnectivityTest { + option (google.api.resource) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + pattern: "projects/{project}/locations/global/connectivityTests/{test}" + }; + + // Required. Unique name of the resource using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The user-supplied description of the Connectivity Test. + // Maximum of 512 characters. + string description = 2; + + // Required. Source specification of the Connectivity Test. + // + // You can use a combination of source IP address, virtual machine + // (VM) instance, or Compute Engine network to uniquely identify + // the source location. + // + // Examples: + // If the source IP address is an internal IP address within a Google Cloud + // Virtual Private Cloud (VPC) network, then you must also specify the VPC + // network. Otherwise, specify the VM instance, which already contains its + // internal IP address and VPC network information. + // + // If the source of the test is within an on-premises network, then you must + // provide the destination VPC network. + // + // If the source endpoint is a Compute Engine VM instance with multiple + // network interfaces, the instance itself is not sufficient to identify the + // endpoint. So, you must also specify the source IP address or VPC network. + // + // A reachability analysis proceeds even if the source location is + // ambiguous. However, the test result may include endpoints that you don't + // intend to test. + Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Destination specification of the Connectivity Test. + // + // You can use a combination of destination IP address, Compute Engine + // VM instance, or VPC network to uniquely identify the destination + // location. + // + // Even if the destination IP address is not unique, the source IP + // location is unique. Usually, the analysis can infer the destination + // endpoint from route information. + // + // If the destination you specify is a VM instance and the instance has + // multiple network interfaces, then you must also specify either + // a destination IP address or VPC network to identify the destination + // interface. + // + // A reachability analysis proceeds even if the destination location is + // ambiguous. However, the result can include endpoints that you don't + // intend to test. + Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; + + // IP Protocol of the test. When not provided, "TCP" is assumed. + string protocol = 5; + + // Other projects that may be relevant for reachability analysis. + // This is applicable to scenarios where a test can cross project boundaries. + repeated string related_projects = 6; + + // Output only. The display name of a Connectivity Test. + string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user-provided metadata. + map labels = 8; + + // Output only. The time the test was created. + google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the test's configuration was updated. + google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reachability details of this test from the latest run. + // The details are updated when creating a new test, updating an + // existing test, or triggering a one-time rerun of an existing test. + ReachabilityDetails reachability_details = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Source or destination of the Connectivity Test. +message Endpoint { + // The type definition of an endpoint's network. Use one of the + // following choices: + enum NetworkType { + // Default type if unspecified. + NETWORK_TYPE_UNSPECIFIED = 0; + + // A network hosted within Google Cloud Platform. + // To receive more detailed output, specify the URI for the source or + // destination network. + GCP_NETWORK = 1; + + // A network hosted outside of Google Cloud Platform. + // This can be an on-premises network, or a network hosted by another cloud + // provider. + NON_GCP_NETWORK = 2; + } + + // The IP address of the endpoint, which can be an external or internal IP. + // An IPv6 address is only allowed when the test's destination is a + // [global load balancer VIP](/load-balancing/docs/load-balancing-overview). + string ip_address = 1; + + // The IP protocol port of the endpoint. + // Only applicable when protocol is TCP or UDP. + int32 port = 2; + + // A Compute Engine instance URI. + string instance = 3; + + // A cluster URI for [Google Kubernetes Engine + // master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + string gke_master_cluster = 7; + + // A [Cloud SQL](https://cloud.google.com/sql) instance URI. + string cloud_sql_instance = 8; + + // A Compute Engine network URI. + string network = 4; + + // Type of the network where the endpoint is located. + // Applicable only to source endpoint, as destination network type can be + // inferred from the source. + NetworkType network_type = 5; + + // Project ID where the endpoint is located. + // The Project ID can be derived from the URI if you provide a VM instance or + // network URI. + // The following are two cases where you must provide the project ID: + // 1. Only the IP address is specified, and the IP address is within a GCP + // project. + // 2. When you are using Shared VPC and the IP address that you provide is + // from the service project. In this case, the network that the IP address + // resides in is defined in the host project. + string project_id = 6; +} + +// Results of the configuration analysis from the last run of the test. +message ReachabilityDetails { + // The overall result of the test's configuration analysis. + enum Result { + // No result was specified. + RESULT_UNSPECIFIED = 0; + + // Possible scenarios are: + // + // * The configuration analysis determined that a packet originating from + // the source is expected to reach the destination. + // * The analysis didn't complete because the user lacks permission for + // some of the resources in the trace. However, at the time the user's + // permission became insufficient, the trace had been successful so far. + REACHABLE = 1; + + // A packet originating from the source is expected to be dropped before + // reaching the destination. + UNREACHABLE = 2; + + // The source and destination endpoints do not uniquely identify + // the test location in the network, and the reachability result contains + // multiple traces. For some traces, a packet could be delivered, and for + // others, it would not be. + AMBIGUOUS = 4; + + // The configuration analysis did not complete. Possible reasons are: + // + // * A permissions error occurred--for example, the user might not have + // read permission for all of the resources named in the test. + // * An internal error occurred. + // * The analyzer received an invalid or unsupported argument or was unable + // to identify a known endpoint. + UNDETERMINED = 5; + } + + // The overall result of the test's configuration analysis. + Result result = 1; + + // The time of the configuration analysis. + google.protobuf.Timestamp verify_time = 2; + + // The details of a failure or a cancellation of reachability analysis. + google.rpc.Status error = 3; + + // Result may contain a list of traces if a test has multiple possible + // paths in the network, such as when destination endpoint is a load balancer + // with multiple backends. + repeated Trace traces = 5; +} diff --git a/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/reachability.proto b/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/reachability.proto new file mode 100644 index 00000000..d7499d3f --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/reachability.proto @@ -0,0 +1,275 @@ +// 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 +// +// 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.networkmanagement.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/networkmanagement/v1/connectivity_test.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/networkmanagement/v1;networkmanagement"; +option java_multiple_files = true; +option java_outer_classname = "ReachabilityServiceProto"; +option java_package = "com.google.cloud.networkmanagement.v1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1"; + +// The Reachability service in Google Cloud Network Management API + +// The Reachability service in the Google Cloud Network Management API provides +// services that analyze the reachability within a single Google Virtual Private +// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises +// networks, or between VPC networks and internet hosts. A reachability analysis +// is based on Google Cloud network configurations. +// +// You can use the analysis results to verify these configurations and +// to troubleshoot connectivity issues. +service ReachabilityService { + option (google.api.default_host) = "networkmanagement.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all Connectivity Tests owned by a project. + rpc ListConnectivityTests(ListConnectivityTestsRequest) returns (ListConnectivityTestsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/global}/connectivityTests" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a specific Connectivity Test. + rpc GetConnectivityTest(GetConnectivityTestRequest) returns (ConnectivityTest) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/global/connectivityTests/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Connectivity Test. + // After you create a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, containing non-existent resources in the network, or you + // don't have read permissions to the network configurations of listed + // projects), then the reachability result returns a value of `UNKNOWN`. + // + // If the endpoint specifications in `ConnectivityTest` are + // incomplete, the reachability result returns a value of + // AMBIGUOUS. For more information, + // see the Connectivity Test documentation. + rpc CreateConnectivityTest(CreateConnectivityTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/global}/connectivityTests" + body: "resource" + }; + option (google.api.method_signature) = "parent,test_id,resource"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Updates the configuration of an existing `ConnectivityTest`. + // After you update a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // The Reachability state in the test resource is updated with the new result. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, they contain non-existent resources in the network, or the + // user does not have read permissions to the network configurations of + // listed projects), then the reachability result returns a value of + // UNKNOWN. + // + // If the endpoint specifications in `ConnectivityTest` are incomplete, the + // reachability result returns a value of `AMBIGUOUS`. See the documentation + // in `ConnectivityTest` for for more details. + rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}" + body: "resource" + }; + option (google.api.method_signature) = "update_mask,resource"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Rerun an existing `ConnectivityTest`. + // After the user triggers the rerun, the reachability analysis is performed + // as part of the long running operation, which completes when the analysis + // completes. + // + // Even though the test configuration remains the same, the reachability + // result may change due to underlying network configuration changes. + // + // If the endpoint specifications in `ConnectivityTest` become invalid (for + // example, specified resources are deleted in the network, or you lost + // read permissions to the network configurations of listed projects), then + // the reachability result returns a value of `UNKNOWN`. + rpc RerunConnectivityTest(RerunConnectivityTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a specific `ConnectivityTest`. + rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/global/connectivityTests/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Request for the `ListConnectivityTests` method. +message ListConnectivityTestsRequest { + // Required. The parent resource of the Connectivity Tests: + // `projects/{project_id}/locations/global` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Number of `ConnectivityTests` to return. + int32 page_size = 2; + + // Page token from an earlier query, as returned in `next_page_token`. + string page_token = 3; + + // Lists the `ConnectivityTests` that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form ` ` where operators: `<`, `>`, + // `<=`, + // `>=`, + // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + // roughly synonymous with equality). can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/proj-1/locations/global/connectivityTests/test-1 + // + // - Filter by labels: + // - Resources that have a key called `foo` + // labels.foo:* + // - Resources that have a key called `foo` whose value is `bar` + // labels.foo = bar + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// Response for the `ListConnectivityTests` method. +message ListConnectivityTestsResponse { + // List of Connectivity Tests. + repeated ConnectivityTest resources = 1; + + // Page token to fetch the next set of Connectivity Tests. + string next_page_token = 2; + + // Locations that could not be reached (when querying all locations with `-`). + repeated string unreachable = 3; +} + +// Request for the `GetConnectivityTest` method. +message GetConnectivityTestRequest { + // Required. `ConnectivityTest` resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `CreateConnectivityTest` method. +message CreateConnectivityTestRequest { + // Required. The parent resource of the Connectivity Test to create: + // `projects/{project_id}/locations/global` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The logical name of the Connectivity Test in your project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-40 characters. + // * Must end with a number or a letter. + // * Must be unique within the customer project + string test_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A `ConnectivityTest` resource + ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateConnectivityTest` method. +message UpdateConnectivityTestRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in update_mask are updated. + ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteConnectivityTest` method. +message DeleteConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `RerunConnectivityTest` method. +message RerunConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata describing an [Operation][google.longrunning.Operation] +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Target of the operation - for example + // projects/project-1/locations/global/connectivityTests/test-1 + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_detail = 5; + + // Specifies if cancellation was requested for the operation. + bool cancel_requested = 6; + + // API version. + string api_version = 7; +} diff --git a/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/trace.proto b/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/trace.proto new file mode 100644 index 00000000..fdc2c93c --- /dev/null +++ b/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/trace.proto @@ -0,0 +1,891 @@ +// 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 +// +// 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.networkmanagement.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/networkmanagement/v1;networkmanagement"; +option java_multiple_files = true; +option java_outer_classname = "TraceProto"; +option java_package = "com.google.cloud.networkmanagement.v1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1"; + +// Trace represents one simulated packet forwarding path. +// +// * Each trace contains multiple ordered steps. +// * Each step is in a particular state with associated configuration. +// * State is categorized as final or non-final states. +// * Each final state has a reason associated. +// * Each trace must end with a final state (the last step). +// ``` +// |---------------------Trace----------------------| +// Step1(State) Step2(State) --- StepN(State(final)) +// ``` +message Trace { + // Derived from the source and destination endpoints definition specified by + // user request, and validated by the data plane model. + // If there are multiple traces starting from different source locations, then + // the endpoint_info may be different between traces. + EndpointInfo endpoint_info = 1; + + // A trace of a test contains multiple steps from the initial state to the + // final state (delivered, dropped, forwarded, or aborted). + // + // The steps are ordered by the processing sequence within the simulated + // network state machine. It is critical to preserve the order of the steps + // and avoid reordering or sorting them. + repeated Step steps = 2; +} + +// A simulated forwarding path is composed of multiple steps. +// Each step has a well-defined state and an associated configuration. +message Step { + // Type of states that are defined in the network state machine. + // Each step in the packet trace is in a specific state. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Initial state: packet originating from a Compute Engine instance. + // An InstanceInfo is populated with starting instance information. + START_FROM_INSTANCE = 1; + + // Initial state: packet originating from the internet. + // The endpoint information is populated. + START_FROM_INTERNET = 2; + + // Initial state: packet originating from a VPC or on-premises network + // with internal source IP. + // If the source is a VPC network visible to the user, a NetworkInfo + // is populated with details of the network. + START_FROM_PRIVATE_NETWORK = 3; + + // Initial state: packet originating from a Google Kubernetes Engine cluster + // master. A GKEMasterInfo is populated with starting instance information. + START_FROM_GKE_MASTER = 21; + + // Initial state: packet originating from a Cloud SQL instance. + // A CloudSQLInstanceInfo is populated with starting instance information. + START_FROM_CLOUD_SQL_INSTANCE = 22; + + // Config checking state: verify ingress firewall rule. + APPLY_INGRESS_FIREWALL_RULE = 4; + + // Config checking state: verify egress firewall rule. + APPLY_EGRESS_FIREWALL_RULE = 5; + + // Config checking state: verify route. + APPLY_ROUTE = 6; + + // Config checking state: match forwarding rule. + APPLY_FORWARDING_RULE = 7; + + // Config checking state: packet sent or received under foreign IP + // address and allowed. + SPOOFING_APPROVED = 8; + + // Forwarding state: arriving at a Compute Engine instance. + ARRIVE_AT_INSTANCE = 9; + + // Forwarding state: arriving at a Compute Engine internal load balancer. + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + + // Forwarding state: arriving at a Compute Engine external load balancer. + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + + // Forwarding state: arriving at a Cloud VPN gateway. + ARRIVE_AT_VPN_GATEWAY = 12; + + // Forwarding state: arriving at a Cloud VPN tunnel. + ARRIVE_AT_VPN_TUNNEL = 13; + + // Transition state: packet header translated. + NAT = 14; + + // Transition state: original connection is terminated and a new proxied + // connection is initiated. + PROXY_CONNECTION = 15; + + // Final state: packet could be delivered. + DELIVER = 16; + + // Final state: packet could be dropped. + DROP = 17; + + // Final state: packet could be forwarded to a network with an unknown + // configuration. + FORWARD = 18; + + // Final state: analysis is aborted. + ABORT = 19; + + // Special state: viewer of the test result does not have permission to + // see the configuration in this step. + VIEWER_PERMISSION_MISSING = 20; + } + + // A description of the step. Usually this is a summary of the state. + string description = 1; + + // Each step is in one of the pre-defined states. + State state = 2; + + // This is a step that leads to the final state Drop. + bool causes_drop = 3; + + // Project ID that contains the configuration this step is validating. + string project_id = 4; + + // Configuration or metadata associated with each step. + // The configuration is filtered based on viewer's permission. If a viewer + // has no permission to view the configuration in this step, for non-final + // states a special state is populated (VIEWER_PERMISSION_MISSING), and for + // final state the configuration is cleared. + oneof step_info { + // Display information of a Compute Engine instance. + InstanceInfo instance = 5; + + // Display information of a Compute Engine firewall rule. + FirewallInfo firewall = 6; + + // Display information of a Compute Engine route. + RouteInfo route = 7; + + // Display information of the source and destination under analysis. + // The endpoint information in an intermediate state may differ with the + // initial input, as it might be modified by state like NAT, + // or Connection Proxy. + EndpointInfo endpoint = 8; + + // Display information of a Compute Engine forwarding rule. + ForwardingRuleInfo forwarding_rule = 9; + + // Display information of a Compute Engine VPN gateway. + VpnGatewayInfo vpn_gateway = 10; + + // Display information of a Compute Engine VPN tunnel. + VpnTunnelInfo vpn_tunnel = 11; + + // Display information of the final state "deliver" and reason. + DeliverInfo deliver = 12; + + // Display information of the final state "forward" and reason. + ForwardInfo forward = 13; + + // Display information of the final state "abort" and reason. + AbortInfo abort = 14; + + // Display information of the final state "drop" and reason. + DropInfo drop = 15; + + // Display information of the load balancers. + LoadBalancerInfo load_balancer = 16; + + // Display information of a Google Cloud network. + NetworkInfo network = 17; + + // Display information of a Google Kubernetes Engine cluster master. + GKEMasterInfo gke_master = 18; + + // Display information of a Cloud SQL instance. + CloudSQLInstanceInfo cloud_sql_instance = 19; + } +} + +// For display only. Metadata associated with a Compute Engine instance. +message InstanceInfo { + // Name of a Compute Engine instance. + string display_name = 1; + + // URI of a Compute Engine instance. + string uri = 2; + + // Name of the network interface of a Compute Engine instance. + string interface = 3; + + // URI of a Compute Engine network. + string network_uri = 4; + + // Internal IP address of the network interface. + string internal_ip = 5; + + // External IP address of the network interface. + string external_ip = 6; + + // Network tags configured on the instance. + repeated string network_tags = 7; + + // Service account authorized for the instance. + string service_account = 8 [deprecated = true]; +} + +// For display only. Metadata associated with a Compute Engine network. +message NetworkInfo { + // Name of a Compute Engine network. + string display_name = 1; + + // URI of a Compute Engine network. + string uri = 2; + + // The IP range that matches the test. + string matched_ip_range = 4; +} + +// For display only. Metadata associated with a VPC firewall rule, an implied +// VPC firewall rule, or a hierarchical firewall policy rule. +message FirewallInfo { + // The firewall rule's type. + enum FirewallRuleType { + // Unspecified type. + FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + + // Hierarchical firewall policy rule. For details, see + // [Hierarchical firewall policies + // overview](https://cloud.google.com/vpc/docs/firewall-policies). + HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + + // VPC firewall rule. For details, see + // [VPC firewall rules + // overview](https://cloud.google.com/vpc/docs/firewalls). + VPC_FIREWALL_RULE = 2; + + // Implied VPC firewall rule. For details, see + // [Implied + // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). + IMPLIED_VPC_FIREWALL_RULE = 3; + } + + // The display name of the VPC firewall rule. This field is not applicable + // to hierarchical firewall policy rules. + string display_name = 1; + + // The URI of the VPC firewall rule. This field is not applicable to + // implied firewall rules or hierarchical firewall policy rules. + string uri = 2; + + // Possible values: INGRESS, EGRESS + string direction = 3; + + // Possible values: ALLOW, DENY + string action = 4; + + // The priority of the firewall rule. + int32 priority = 5; + + // The URI of the VPC network that the firewall rule is associated with. + // This field is not applicable to hierarchical firewall policy rules. + string network_uri = 6; + + // The target tags defined by the VPC firewall rule. This field is not + // applicable to hierarchical firewall policy rules. + repeated string target_tags = 7; + + // The target service accounts specified by the firewall rule. + repeated string target_service_accounts = 8; + + // The hierarchical firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules. + string policy = 9; + + // The firewall rule's type. + FirewallRuleType firewall_rule_type = 10; +} + +// For display only. Metadata associated with a Compute Engine route. +message RouteInfo { + // Type of route: + enum RouteType { + // Unspecified type. Default value. + ROUTE_TYPE_UNSPECIFIED = 0; + + // Route is a subnet route automatically created by the system. + SUBNET = 1; + + // Static route created by the user, including the default route to the + // internet. + STATIC = 2; + + // Dynamic route exchanged between BGP peers. + DYNAMIC = 3; + + // A subnet route received from peering network. + PEERING_SUBNET = 4; + + // A static route received from peering network. + PEERING_STATIC = 5; + + // A dynamic route received from peering network. + PEERING_DYNAMIC = 6; + } + + // Type of next hop: + enum NextHopType { + // Unspecified type. Default value. + NEXT_HOP_TYPE_UNSPECIFIED = 0; + + // Next hop is an IP address. + NEXT_HOP_IP = 1; + + // Next hop is a Compute Engine instance. + NEXT_HOP_INSTANCE = 2; + + // Next hop is a VPC network gateway. + NEXT_HOP_NETWORK = 3; + + // Next hop is a peering VPC. + NEXT_HOP_PEERING = 4; + + // Next hop is an interconnect. + NEXT_HOP_INTERCONNECT = 5; + + // Next hop is a VPN tunnel. + NEXT_HOP_VPN_TUNNEL = 6; + + // Next hop is a VPN gateway. This scenario only happens when tracing + // connectivity from an on-premises network to Google Cloud through a VPN. + // The analysis simulates a packet departing from the on-premises network + // through a VPN tunnel and arriving at a Cloud VPN gateway. + NEXT_HOP_VPN_GATEWAY = 7; + + // Next hop is an internet gateway. + NEXT_HOP_INTERNET_GATEWAY = 8; + + // Next hop is blackhole; that is, the next hop either does not exist or is + // not running. + NEXT_HOP_BLACKHOLE = 9; + + // Next hop is the forwarding rule of an Internal Load Balancer. + NEXT_HOP_ILB = 10; + } + + // Type of route. + RouteType route_type = 8; + + // Type of next hop. + NextHopType next_hop_type = 9; + + // Name of a Compute Engine route. + string display_name = 1; + + // URI of a Compute Engine route. + // Dynamic route from cloud router does not have a URI. + // Advertised route from Google Cloud VPC to on-premises network also does + // not have a URI. + string uri = 2; + + // Destination IP range of the route. + string dest_ip_range = 3; + + // Next hop of the route. + string next_hop = 4; + + // URI of a Compute Engine network. + string network_uri = 5; + + // Priority of the route. + int32 priority = 6; + + // Instance tags of the route. + repeated string instance_tags = 7; +} + +// For display only. Metadata associated with a Compute Engine forwarding rule. +message ForwardingRuleInfo { + // Name of a Compute Engine forwarding rule. + string display_name = 1; + + // URI of a Compute Engine forwarding rule. + string uri = 2; + + // Protocol defined in the forwarding rule that matches the test. + string matched_protocol = 3; + + // Port range defined in the forwarding rule that matches the test. + string matched_port_range = 6; + + // VIP of the forwarding rule. + string vip = 4; + + // Target type of the forwarding rule. + string target = 5; + + // Network URI. Only valid for Internal Load Balancer. + string network_uri = 7; +} + +// For display only. Metadata associated with a load balancer. +message LoadBalancerInfo { + // The type definition for a load balancer: + enum LoadBalancerType { + // Type is unspecified. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Internal TCP/UDP load balancer. + INTERNAL_TCP_UDP = 1; + + // Network TCP/UDP load balancer. + NETWORK_TCP_UDP = 2; + + // HTTP(S) proxy load balancer. + HTTP_PROXY = 3; + + // TCP proxy load balancer. + TCP_PROXY = 4; + + // SSL proxy load balancer. + SSL_PROXY = 5; + } + + // The type definition for a load balancer backend configuration: + enum BackendType { + // Type is unspecified. + BACKEND_TYPE_UNSPECIFIED = 0; + + // Backend Service as the load balancer's backend. + BACKEND_SERVICE = 1; + + // Target Pool as the load balancer's backend. + TARGET_POOL = 2; + } + + // Type of the load balancer. + LoadBalancerType load_balancer_type = 1; + + // URI of the health check for the load balancer. + string health_check_uri = 2; + + // Information for the loadbalancer backends. + repeated LoadBalancerBackend backends = 3; + + // Type of load balancer's backend configuration. + BackendType backend_type = 4; + + // Backend configuration URI. + string backend_uri = 5; +} + +// For display only. Metadata associated with a specific load balancer backend. +message LoadBalancerBackend { + // State of a health check firewall configuration: + enum HealthCheckFirewallState { + // State is unspecified. Default state if not populated. + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + + // There are configured firewall rules to allow health check probes to the + // backend. + CONFIGURED = 1; + + // There are firewall rules configured to allow partial health check ranges + // or block all health check ranges. + // If a health check probe is sent from denied IP ranges, + // the health check to the backend will fail. Then, the backend will be + // marked unhealthy and will not receive traffic sent to the load balancer. + MISCONFIGURED = 2; + } + + // Name of a Compute Engine instance or network endpoint. + string display_name = 1; + + // URI of a Compute Engine instance or network endpoint. + string uri = 2; + + // State of the health check firewall configuration. + HealthCheckFirewallState health_check_firewall_state = 3; + + // A list of firewall rule URIs allowing probes from health check IP ranges. + repeated string health_check_allowing_firewall_rules = 4; + + // A list of firewall rule URIs blocking probes from health check IP ranges. + repeated string health_check_blocking_firewall_rules = 5; +} + +// For display only. Metadata associated with a Compute Engine VPN gateway. +message VpnGatewayInfo { + // Name of a VPN gateway. + string display_name = 1; + + // URI of a VPN gateway. + string uri = 2; + + // URI of a Compute Engine network where the VPN gateway is configured. + string network_uri = 3; + + // IP address of the VPN gateway. + string ip_address = 4; + + // A VPN tunnel that is associated with this VPN gateway. + // There may be multiple VPN tunnels configured on a VPN gateway, and only + // the one relevant to the test is displayed. + string vpn_tunnel_uri = 5; + + // Name of a Google Cloud region where this VPN gateway is configured. + string region = 6; +} + +// For display only. Metadata associated with a Compute Engine VPN tunnel. +message VpnTunnelInfo { + // Types of VPN routing policy. For details, refer to [Networks and Tunnel + // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). + enum RoutingType { + // Unspecified type. Default value. + ROUTING_TYPE_UNSPECIFIED = 0; + + // Route based VPN. + ROUTE_BASED = 1; + + // Policy based routing. + POLICY_BASED = 2; + + // Dynamic (BGP) routing. + DYNAMIC = 3; + } + + // Name of a VPN tunnel. + string display_name = 1; + + // URI of a VPN tunnel. + string uri = 2; + + // URI of the VPN gateway at local end of the tunnel. + string source_gateway = 3; + + // URI of a VPN gateway at remote end of the tunnel. + string remote_gateway = 4; + + // Remote VPN gateway's IP address. + string remote_gateway_ip = 5; + + // Local VPN gateway's IP address. + string source_gateway_ip = 6; + + // URI of a Compute Engine network where the VPN tunnel is configured. + string network_uri = 7; + + // Name of a Google Cloud region where this VPN tunnel is configured. + string region = 8; + + // Type of the routing policy. + RoutingType routing_type = 9; +} + +// For display only. The specification of the endpoints for the test. +// EndpointInfo is derived from source and destination Endpoint and validated +// by the backend data plane model. +message EndpointInfo { + // Source IP address. + string source_ip = 1; + + // Destination IP address. + string destination_ip = 2; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 3; + + // Source port. Only valid when protocol is TCP or UDP. + int32 source_port = 4; + + // Destination port. Only valid when protocol is TCP or UDP. + int32 destination_port = 5; + + // URI of the network where this packet originates from. + string source_network_uri = 6; + + // URI of the network where this packet is sent to. + string destination_network_uri = 7; +} + +// Details of the final state "deliver" and associated resource. +message DeliverInfo { + // Deliver target types: + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Target is a Compute Engine instance. + INSTANCE = 1; + + // Target is the internet. + INTERNET = 2; + + // Target is a Google API. + GOOGLE_API = 3; + + // Target is a Google Kubernetes Engine cluster master. + GKE_MASTER = 4; + + // Target is a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 5; + } + + // Target type where the packet is delivered to. + Target target = 1; + + // URI of the resource that the packet is delivered to. + string resource_uri = 2; +} + +// Details of the final state "forward" and associated resource. +message ForwardInfo { + // Forward target types. + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Forwarded to a VPC peering network. + PEERING_VPC = 1; + + // Forwarded to a Cloud VPN gateway. + VPN_GATEWAY = 2; + + // Forwarded to a Cloud Interconnect connection. + INTERCONNECT = 3; + + // Forwarded to a Google Kubernetes Engine Container cluster master. + GKE_MASTER = 4; + + // Forwarded to the next hop of a custom route imported from a peering VPC. + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + + // Forwarded to a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 6; + } + + // Target type where this packet is forwarded to. + Target target = 1; + + // URI of the resource that the packet is forwarded to. + string resource_uri = 2; +} + +// Details of the final state "abort" and associated resource. +message AbortInfo { + // Abort cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Aborted due to unknown network. + // The reachability analysis cannot proceed because the user does not have + // access to the host project's network configurations, including firewall + // rules and routes. This happens when the project is a service project and + // the endpoints being traced are in the host project's network. + UNKNOWN_NETWORK = 1; + + // Aborted because the IP address(es) are unknown. + UNKNOWN_IP = 2; + + // Aborted because no project information can be derived from the test + // input. + UNKNOWN_PROJECT = 3; + + // Aborted because the user lacks the permission to access all or part of + // the network configurations required to run the test. + PERMISSION_DENIED = 4; + + // Aborted because no valid source endpoint is derived from the input test + // request. + NO_SOURCE_LOCATION = 5; + + // Aborted because the source and/or destination endpoint specified in + // the test are invalid. The possible reasons that an endpoint is + // invalid include: malformed IP address; nonexistent instance or + // network URI; IP address not in the range of specified network URI; and + // instance not owning the network interface in the specified network. + INVALID_ARGUMENT = 6; + + // Aborted because traffic is sent from a public IP to an instance without + // an external IP. + NO_EXTERNAL_IP = 7; + + // Aborted because none of the traces matches destination information + // specified in the input test request. + UNINTENDED_DESTINATION = 8; + + // Aborted because the number of steps in the trace exceeding a certain + // limit which may be caused by routing loop. + TRACE_TOO_LONG = 9; + + // Aborted due to internal server error. + INTERNAL_ERROR = 10; + + // Aborted because the source endpoint could not be found. + SOURCE_ENDPOINT_NOT_FOUND = 11; + + // Aborted because the source network does not match the source endpoint. + MISMATCHED_SOURCE_NETWORK = 12; + + // Aborted because the destination endpoint could not be found. + DESTINATION_ENDPOINT_NOT_FOUND = 13; + + // Aborted because the destination network does not match the destination + // endpoint. + MISMATCHED_DESTINATION_NETWORK = 14; + } + + // Causes that the analysis is aborted. + Cause cause = 1; + + // URI of the resource that caused the abort. + string resource_uri = 2; +} + +// Details of the final state "drop" and associated resource. +message DropInfo { + // Drop cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Destination external address cannot be resolved to a known target. If + // the address is used in a Google Cloud project, provide the project ID + // as test input. + UNKNOWN_EXTERNAL_ADDRESS = 1; + + // A Compute Engine instance can only send or receive a packet with a + // foreign IP address if ip_forward is enabled. + FOREIGN_IP_DISALLOWED = 2; + + // Dropped due to a firewall rule, unless allowed due to connection + // tracking. + FIREWALL_RULE = 3; + + // Dropped due to no routes. + NO_ROUTE = 4; + + // Dropped due to invalid route. Route's next hop is a blackhole. + ROUTE_BLACKHOLE = 5; + + // Packet is sent to a wrong (unintended) network. Example: you trace a + // packet from VM1:Network1 to VM2:Network2, however, the route configured + // in Network1 sends the packet destined for VM2's IP addresss to Network3. + ROUTE_WRONG_NETWORK = 6; + + // Packet with internal destination address sent to the internet gateway. + PRIVATE_TRAFFIC_TO_INTERNET = 7; + + // Instance with only an internal IP address tries to access Google API and + // services, but private Google access is not enabled. + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + + // Instance with only an internal IP address tries to access external hosts, + // but Cloud NAT is not enabled in the subnet, unless special configurations + // on a VM allow this connection. For more details, see [Special + // configurations for VM + // instances](https://cloud.google.com/vpc/docs/special-configurations). + NO_EXTERNAL_ADDRESS = 9; + + // Destination internal address cannot be resolved to a known target. If + // this is a shared VPC scenario, verify if the service project ID is + // provided as test input. Otherwise, verify if the IP address is being + // used in the project. + UNKNOWN_INTERNAL_ADDRESS = 10; + + // Forwarding rule's protocol and ports do not match the packet header. + FORWARDING_RULE_MISMATCH = 11; + + // Forwarding rule does not have backends configured. + FORWARDING_RULE_NO_INSTANCES = 12; + + // Firewalls block the health check probes to the backends and cause + // the backends to be unavailable for traffic from the load balancer. + // For more details, see [Health check firewall + // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + + // Packet is sent from or to a Compute Engine instance that is not in a + // running state. + INSTANCE_NOT_RUNNING = 14; + + // The type of traffic is blocked and the user cannot configure a firewall + // rule to enable it. See [Always blocked + // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for + // more details. + TRAFFIC_TYPE_BLOCKED = 15; + + // Access to Google Kubernetes Engine cluster master's endpoint is not + // authorized. See [Access to the cluster + // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) + // for more details. + GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + + // Access to the Cloud SQL instance endpoint is not authorized. + // See [Authorizing with authorized + // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for + // more details. + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + + // Packet was dropped inside Google Kubernetes Engine Service. + DROPPED_INSIDE_GKE_SERVICE = 18; + + // Packet was dropped inside Cloud SQL Service. + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + + // Packet was dropped because there is no peering between the originating + // network and the Google Managed Services Network. + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + + // Packet was dropped because the Cloud SQL instance has neither a private + // nor a public IP address. + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + } + + // Cause that the packet is dropped. + Cause cause = 1; + + // URI of the resource that caused the drop. + string resource_uri = 2; +} + +// For display only. Metadata associated with a Google Kubernetes Engine (GKE) +// cluster master. +message GKEMasterInfo { + // URI of a GKE cluster. + string cluster_uri = 2; + + // URI of a GKE cluster network. + string cluster_network_uri = 4; + + // Internal IP address of a GKE cluster master. + string internal_ip = 5; + + // External IP address of a GKE cluster master. + string external_ip = 6; +} + +// For display only. Metadata associated with a Cloud SQL instance. +message CloudSQLInstanceInfo { + // Name of a Cloud SQL instance. + string display_name = 1; + + // URI of a Cloud SQL instance. + string uri = 2; + + // URI of a Cloud SQL instance network or empty string if the instance does + // not have one. + string network_uri = 4; + + // Internal IP address of a Cloud SQL instance. + string internal_ip = 5; + + // External IP address of a Cloud SQL instance. + string external_ip = 6; + + // Region in which the Cloud SQL instance is running. + string region = 7; +} diff --git a/proto-google-cloud-network-management-v1beta1/clirr-ignored-differences.xml b/proto-google-cloud-network-management-v1beta1/clirr-ignored-differences.xml new file mode 100644 index 00000000..b38e8a09 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/networkmanagement/v1beta1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/networkmanagement/v1beta1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/networkmanagement/v1beta1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-network-management-v1beta1/pom.xml b/proto-google-cloud-network-management-v1beta1/pom.xml new file mode 100644 index 00000000..93b49c10 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-network-management-v1beta1 + 0.0.1-SNAPSHOT + proto-google-cloud-network-management-v1beta1 + Proto library for google-cloud-network-management + + com.google.cloud + google-cloud-network-management-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 + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/AbortInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/AbortInfo.java new file mode 100644 index 00000000..616f30b5 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/AbortInfo.java @@ -0,0 +1,1247 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Details of the final state "abort" and associated resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.AbortInfo} + */ +public final class AbortInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.AbortInfo) + AbortInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AbortInfo.newBuilder() to construct. + private AbortInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AbortInfo() { + cause_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AbortInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AbortInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + cause_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.AbortInfo.class, + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Builder.class); + } + + /** + * + * + *
+   * Abort cause types:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.AbortInfo.Cause} + */ + public enum Cause implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + CAUSE_UNSPECIFIED(0), + /** + * + * + *
+     * Aborted due to unknown network.
+     * The reachability analysis cannot proceed because the user does not have
+     * access to the host project's network configurations, including firewall
+     * rules and routes. This happens when the project is a service project and
+     * the endpoints being traced are in the host project's network.
+     * 
+ * + * UNKNOWN_NETWORK = 1; + */ + UNKNOWN_NETWORK(1), + /** + * + * + *
+     * Aborted because the IP address(es) are unknown.
+     * 
+ * + * UNKNOWN_IP = 2; + */ + UNKNOWN_IP(2), + /** + * + * + *
+     * Aborted because no project information can be derived from the test
+     * input.
+     * 
+ * + * UNKNOWN_PROJECT = 3; + */ + UNKNOWN_PROJECT(3), + /** + * + * + *
+     * Aborted because the user lacks the permission to access all or part of
+     * the network configurations required to run the test.
+     * 
+ * + * PERMISSION_DENIED = 4; + */ + PERMISSION_DENIED(4), + /** + * + * + *
+     * Aborted because no valid source endpoint is derived from the input test
+     * request.
+     * 
+ * + * NO_SOURCE_LOCATION = 5; + */ + NO_SOURCE_LOCATION(5), + /** + * + * + *
+     * Aborted because the source and/or destination endpoint specified in
+     * the test are invalid. The possible reasons that an endpoint is
+     * invalid include: malformed IP address; nonexistent instance or
+     * network URI; IP address not in the range of specified network URI; and
+     * instance not owning the network interface in the specified network.
+     * 
+ * + * INVALID_ARGUMENT = 6; + */ + INVALID_ARGUMENT(6), + /** + * + * + *
+     * Aborted because traffic is sent from a public IP to an instance without
+     * an external IP.
+     * 
+ * + * NO_EXTERNAL_IP = 7; + */ + NO_EXTERNAL_IP(7), + /** + * + * + *
+     * Aborted because none of the traces matches destination information
+     * specified in the input test request.
+     * 
+ * + * UNINTENDED_DESTINATION = 8; + */ + UNINTENDED_DESTINATION(8), + /** + * + * + *
+     * Aborted because the number of steps in the trace exceeding a certain
+     * limit which may be caused by routing loop.
+     * 
+ * + * TRACE_TOO_LONG = 9; + */ + TRACE_TOO_LONG(9), + /** + * + * + *
+     * Aborted due to internal server error.
+     * 
+ * + * INTERNAL_ERROR = 10; + */ + INTERNAL_ERROR(10), + /** + * + * + *
+     * Aborted because the source endpoint could not be found.
+     * 
+ * + * SOURCE_ENDPOINT_NOT_FOUND = 11; + */ + SOURCE_ENDPOINT_NOT_FOUND(11), + /** + * + * + *
+     * Aborted because the source network does not match the source endpoint.
+     * 
+ * + * MISMATCHED_SOURCE_NETWORK = 12; + */ + MISMATCHED_SOURCE_NETWORK(12), + /** + * + * + *
+     * Aborted because the destination endpoint could not be found.
+     * 
+ * + * DESTINATION_ENDPOINT_NOT_FOUND = 13; + */ + DESTINATION_ENDPOINT_NOT_FOUND(13), + /** + * + * + *
+     * Aborted because the destination network does not match the destination
+     * endpoint.
+     * 
+ * + * MISMATCHED_DESTINATION_NETWORK = 14; + */ + MISMATCHED_DESTINATION_NETWORK(14), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + public static final int CAUSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Aborted due to unknown network.
+     * The reachability analysis cannot proceed because the user does not have
+     * access to the host project's network configurations, including firewall
+     * rules and routes. This happens when the project is a service project and
+     * the endpoints being traced are in the host project's network.
+     * 
+ * + * UNKNOWN_NETWORK = 1; + */ + public static final int UNKNOWN_NETWORK_VALUE = 1; + /** + * + * + *
+     * Aborted because the IP address(es) are unknown.
+     * 
+ * + * UNKNOWN_IP = 2; + */ + public static final int UNKNOWN_IP_VALUE = 2; + /** + * + * + *
+     * Aborted because no project information can be derived from the test
+     * input.
+     * 
+ * + * UNKNOWN_PROJECT = 3; + */ + public static final int UNKNOWN_PROJECT_VALUE = 3; + /** + * + * + *
+     * Aborted because the user lacks the permission to access all or part of
+     * the network configurations required to run the test.
+     * 
+ * + * PERMISSION_DENIED = 4; + */ + public static final int PERMISSION_DENIED_VALUE = 4; + /** + * + * + *
+     * Aborted because no valid source endpoint is derived from the input test
+     * request.
+     * 
+ * + * NO_SOURCE_LOCATION = 5; + */ + public static final int NO_SOURCE_LOCATION_VALUE = 5; + /** + * + * + *
+     * Aborted because the source and/or destination endpoint specified in
+     * the test are invalid. The possible reasons that an endpoint is
+     * invalid include: malformed IP address; nonexistent instance or
+     * network URI; IP address not in the range of specified network URI; and
+     * instance not owning the network interface in the specified network.
+     * 
+ * + * INVALID_ARGUMENT = 6; + */ + public static final int INVALID_ARGUMENT_VALUE = 6; + /** + * + * + *
+     * Aborted because traffic is sent from a public IP to an instance without
+     * an external IP.
+     * 
+ * + * NO_EXTERNAL_IP = 7; + */ + public static final int NO_EXTERNAL_IP_VALUE = 7; + /** + * + * + *
+     * Aborted because none of the traces matches destination information
+     * specified in the input test request.
+     * 
+ * + * UNINTENDED_DESTINATION = 8; + */ + public static final int UNINTENDED_DESTINATION_VALUE = 8; + /** + * + * + *
+     * Aborted because the number of steps in the trace exceeding a certain
+     * limit which may be caused by routing loop.
+     * 
+ * + * TRACE_TOO_LONG = 9; + */ + public static final int TRACE_TOO_LONG_VALUE = 9; + /** + * + * + *
+     * Aborted due to internal server error.
+     * 
+ * + * INTERNAL_ERROR = 10; + */ + public static final int INTERNAL_ERROR_VALUE = 10; + /** + * + * + *
+     * Aborted because the source endpoint could not be found.
+     * 
+ * + * SOURCE_ENDPOINT_NOT_FOUND = 11; + */ + public static final int SOURCE_ENDPOINT_NOT_FOUND_VALUE = 11; + /** + * + * + *
+     * Aborted because the source network does not match the source endpoint.
+     * 
+ * + * MISMATCHED_SOURCE_NETWORK = 12; + */ + public static final int MISMATCHED_SOURCE_NETWORK_VALUE = 12; + /** + * + * + *
+     * Aborted because the destination endpoint could not be found.
+     * 
+ * + * DESTINATION_ENDPOINT_NOT_FOUND = 13; + */ + public static final int DESTINATION_ENDPOINT_NOT_FOUND_VALUE = 13; + /** + * + * + *
+     * Aborted because the destination network does not match the destination
+     * endpoint.
+     * 
+ * + * MISMATCHED_DESTINATION_NETWORK = 14; + */ + public static final int MISMATCHED_DESTINATION_NETWORK_VALUE = 14; + + 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 Cause 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 Cause forNumber(int value) { + switch (value) { + case 0: + return CAUSE_UNSPECIFIED; + case 1: + return UNKNOWN_NETWORK; + case 2: + return UNKNOWN_IP; + case 3: + return UNKNOWN_PROJECT; + case 4: + return PERMISSION_DENIED; + case 5: + return NO_SOURCE_LOCATION; + case 6: + return INVALID_ARGUMENT; + case 7: + return NO_EXTERNAL_IP; + case 8: + return UNINTENDED_DESTINATION; + case 9: + return TRACE_TOO_LONG; + case 10: + return INTERNAL_ERROR; + case 11: + return SOURCE_ENDPOINT_NOT_FOUND; + case 12: + return MISMATCHED_SOURCE_NETWORK; + case 13: + return DESTINATION_ENDPOINT_NOT_FOUND; + case 14: + return MISMATCHED_DESTINATION_NETWORK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Cause findValueByNumber(int number) { + return Cause.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.networkmanagement.v1beta1.AbortInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Cause[] VALUES = values(); + + public static Cause 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 Cause(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.AbortInfo.Cause) + } + + public static final int CAUSE_FIELD_NUMBER = 1; + private int cause_; + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause getCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause result = + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause.valueOf(cause_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object resourceUri_; + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = 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 (cause_ + != com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause.CAUSE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, cause_); + } + if (!getResourceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cause_ + != com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause.CAUSE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, cause_); + } + if (!getResourceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += unknownFields.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.networkmanagement.v1beta1.AbortInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.AbortInfo other = + (com.google.cloud.networkmanagement.v1beta1.AbortInfo) obj; + + if (cause_ != other.cause_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + cause_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.AbortInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.AbortInfo 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.networkmanagement.v1beta1.AbortInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.AbortInfo 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.networkmanagement.v1beta1.AbortInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.AbortInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.AbortInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.AbortInfo 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.networkmanagement.v1beta1.AbortInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.AbortInfo 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.networkmanagement.v1beta1.AbortInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.AbortInfo 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.networkmanagement.v1beta1.AbortInfo 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; + } + /** + * + * + *
+   * Details of the final state "abort" and associated resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.AbortInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.AbortInfo) + com.google.cloud.networkmanagement.v1beta1.AbortInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.AbortInfo.class, + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.AbortInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cause_ = 0; + + resourceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.AbortInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.AbortInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.AbortInfo build() { + com.google.cloud.networkmanagement.v1beta1.AbortInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.AbortInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.AbortInfo result = + new com.google.cloud.networkmanagement.v1beta1.AbortInfo(this); + result.cause_ = cause_; + result.resourceUri_ = resourceUri_; + 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.networkmanagement.v1beta1.AbortInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.AbortInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.AbortInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.AbortInfo.getDefaultInstance()) + return this; + if (other.cause_ != 0) { + setCauseValue(other.getCauseValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.AbortInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.AbortInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int cause_ = 0; + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo.Cause cause = 1; + * + * @param value The enum numeric value on the wire for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseValue(int value) { + + cause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause getCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause result = + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause.valueOf(cause_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo.Cause cause = 1; + * + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause(com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause value) { + if (value == null) { + throw new NullPointerException(); + } + + cause_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Causes that the analysis is aborted.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo.Cause cause = 1; + * + * @return This builder for chaining. + */ + public Builder clearCause() { + + cause_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + + resourceUri_ = getDefaultInstance().getResourceUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the abort.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUri_ = value; + 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.networkmanagement.v1beta1.AbortInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.AbortInfo) + private static final com.google.cloud.networkmanagement.v1beta1.AbortInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.AbortInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.AbortInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AbortInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbortInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.AbortInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/AbortInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/AbortInfoOrBuilder.java new file mode 100644 index 00000000..bd3a4190 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/AbortInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface AbortInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.AbortInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + int getCauseValue(); + /** + * + * + *
+   * Causes that the analysis is aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo.Cause cause = 1; + * + * @return The cause. + */ + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause getCause(); + + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that caused the abort.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CloudSQLInstanceInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CloudSQLInstanceInfo.java new file mode 100644 index 00000000..a2540fda --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CloudSQLInstanceInfo.java @@ -0,0 +1,1546 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a Cloud SQL instance.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} + */ +public final class CloudSQLInstanceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) + CloudSQLInstanceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudSQLInstanceInfo.newBuilder() to construct. + private CloudSQLInstanceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudSQLInstanceInfo() { + displayName_ = ""; + uri_ = ""; + networkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + region_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudSQLInstanceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CloudSQLInstanceInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + internalIp_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalIp_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + region_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.class, + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_FIELD_NUMBER = 5; + private volatile java.lang.Object internalIp_; + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + @java.lang.Override + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + 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(); + internalIp_ = s; + return s; + } + } + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 6; + private volatile java.lang.Object externalIp_; + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + 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(); + externalIp_ = s; + return s; + } + } + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 7; + private volatile java.lang.Object region_; + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + 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(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, networkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalIp_); + } + if (!getRegionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, region_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, networkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalIp_); + } + if (!getRegionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, region_); + } + size += unknownFields.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.networkmanagement.v1beta1.CloudSQLInstanceInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo other = + (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getInternalIp().equals(other.getInternalIp())) return false; + if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getInternalIp().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo 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.networkmanagement.v1beta1.CloudSQLInstanceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo 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.networkmanagement.v1beta1.CloudSQLInstanceInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo 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.networkmanagement.v1beta1.CloudSQLInstanceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo 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.networkmanagement.v1beta1.CloudSQLInstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo 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.networkmanagement.v1beta1.CloudSQLInstanceInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Cloud SQL instance.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.class, + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + networkUri_ = ""; + + internalIp_ = ""; + + externalIp_ = ""; + + region_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo build() { + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo result = + new com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.networkUri_ = networkUri_; + result.internalIp_ = internalIp_; + result.externalIp_ = externalIp_; + result.region_ = region_; + 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.networkmanagement.v1beta1.CloudSQLInstanceInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.getInternalIp().isEmpty()) { + internalIp_ = other.internalIp_; + onChanged(); + } + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Cloud SQL instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Cloud SQL instance network or empty string if the instance does
+     * not have one.
+     * 
+ * + * string network_uri = 4; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object internalIp_ = ""; + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + internalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearInternalIp() { + + internalIp_ = getDefaultInstance().getInternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a Cloud SQL instance.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The bytes for internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + internalIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + + externalIp_ = getDefaultInstance().getExternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a Cloud SQL instance.
+     * 
+ * + * string external_ip = 6; + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + region_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + + region_ = getDefaultInstance().getRegion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Region in which the Cloud SQL instance is running.
+     * 
+ * + * string region = 7; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + region_ = value; + 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.networkmanagement.v1beta1.CloudSQLInstanceInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) + private static final com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSQLInstanceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudSQLInstanceInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.CloudSQLInstanceInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CloudSQLInstanceInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CloudSQLInstanceInfoOrBuilder.java new file mode 100644 index 00000000..44b12975 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CloudSQLInstanceInfoOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface CloudSQLInstanceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Cloud SQL instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Cloud SQL instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Cloud SQL instance network or empty string if the instance does
+   * not have one.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + java.lang.String getInternalIp(); + /** + * + * + *
+   * Internal IP address of a Cloud SQL instance.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + com.google.protobuf.ByteString getInternalIpBytes(); + + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + * + * + *
+   * External IP address of a Cloud SQL instance.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); + + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The region. + */ + java.lang.String getRegion(); + /** + * + * + *
+   * Region in which the Cloud SQL instance is running.
+   * 
+ * + * string region = 7; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTest.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTest.java new file mode 100644 index 00000000..ade90965 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTest.java @@ -0,0 +1,4020 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * A Connectivity Test for a network reachability analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ConnectivityTest} + */ +public final class ConnectivityTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.ConnectivityTest) + ConnectivityTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConnectivityTest.newBuilder() to construct. + private ConnectivityTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectivityTest() { + name_ = ""; + description_ = ""; + protocol_ = ""; + relatedProjects_ = com.google.protobuf.LazyStringArrayList.EMPTY; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConnectivityTest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConnectivityTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.Endpoint.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder subBuilder = null; + if (destination_ != null) { + subBuilder = destination_.toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.Endpoint.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(destination_); + destination_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + protocol_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + relatedProjects_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + relatedProjects_.add(s); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Builder subBuilder = + null; + if (reachabilityDetails_ != null) { + subBuilder = reachabilityDetails_.toBuilder(); + } + reachabilityDetails_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reachabilityDetails_); + reachabilityDetails_ = subBuilder.buildPartial(); + } + + break; + } + case 114: + { + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.Builder subBuilder = null; + if (probingDetails_ != null) { + subBuilder = probingDetails_.toBuilder(); + } + probingDetails_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(probingDetails_); + probingDetails_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + relatedProjects_ = relatedProjects_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ConnectivityTest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + 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.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ConnectivityTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.class, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test}`
+   * 
+ * + * 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. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test}`
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @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 SOURCE_FIELD_NUMBER = 3; + private com.google.cloud.networkmanagement.v1beta1.Endpoint source_; + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Endpoint getSource() { + return source_ == null + ? com.google.cloud.networkmanagement.v1beta1.Endpoint.getDefaultInstance() + : source_; + } + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder getSourceOrBuilder() { + return getSource(); + } + + public static final int DESTINATION_FIELD_NUMBER = 4; + private com.google.cloud.networkmanagement.v1beta1.Endpoint destination_; + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + @java.lang.Override + public boolean hasDestination() { + return destination_ != null; + } + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Endpoint getDestination() { + return destination_ == null + ? com.google.cloud.networkmanagement.v1beta1.Endpoint.getDefaultInstance() + : destination_; + } + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder getDestinationOrBuilder() { + return getDestination(); + } + + public static final int PROTOCOL_FIELD_NUMBER = 5; + private volatile java.lang.Object protocol_; + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + 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(); + protocol_ = s; + return s; + } + } + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_PROJECTS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList relatedProjects_; + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return A list containing the relatedProjects. + */ + public com.google.protobuf.ProtocolStringList getRelatedProjectsList() { + return relatedProjects_; + } + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return The count of relatedProjects. + */ + public int getRelatedProjectsCount() { + return relatedProjects_.size(); + } + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the element to return. + * @return The relatedProjects at the given index. + */ + public java.lang.String getRelatedProjects(int index) { + return relatedProjects_.get(index); + } + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedProjects at the given index. + */ + public com.google.protobuf.ByteString getRelatedProjectsBytes(int index) { + return relatedProjects_.getByteString(index); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 7; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 8; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ConnectivityTest_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + 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(); + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.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 test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.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 test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int REACHABILITY_DETAILS_FIELD_NUMBER = 12; + private com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachabilityDetails_; + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the reachabilityDetails field is set. + */ + @java.lang.Override + public boolean hasReachabilityDetails() { + return reachabilityDetails_ != null; + } + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reachabilityDetails. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails getReachabilityDetails() { + return reachabilityDetails_ == null + ? com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetailsOrBuilder + getReachabilityDetailsOrBuilder() { + return getReachabilityDetails(); + } + + public static final int PROBING_DETAILS_FIELD_NUMBER = 14; + private com.google.cloud.networkmanagement.v1beta1.ProbingDetails probingDetails_; + /** + * + * + *
+   * Output only. The probing details of this test from the latest run, present for
+   * applicable tests only. The details are updated when creating a new test,
+   * updating an existing test, or triggering a one-time rerun of an existing
+   * test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the probingDetails field is set. + */ + @java.lang.Override + public boolean hasProbingDetails() { + return probingDetails_ != null; + } + /** + * + * + *
+   * Output only. The probing details of this test from the latest run, present for
+   * applicable tests only. The details are updated when creating a new test,
+   * updating an existing test, or triggering a one-time rerun of an existing
+   * test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The probingDetails. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails getProbingDetails() { + return probingDetails_ == null + ? com.google.cloud.networkmanagement.v1beta1.ProbingDetails.getDefaultInstance() + : probingDetails_; + } + /** + * + * + *
+   * Output only. The probing details of this test from the latest run, present for
+   * applicable tests only. The details are updated when creating a new test,
+   * updating an existing test, or triggering a one-time rerun of an existing
+   * test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ProbingDetailsOrBuilder + getProbingDetailsOrBuilder() { + return getProbingDetails(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (source_ != null) { + output.writeMessage(3, getSource()); + } + if (destination_ != null) { + output.writeMessage(4, getDestination()); + } + if (!getProtocolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, protocol_); + } + for (int i = 0; i < relatedProjects_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relatedProjects_.getRaw(i)); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); + if (createTime_ != null) { + output.writeMessage(10, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(11, getUpdateTime()); + } + if (reachabilityDetails_ != null) { + output.writeMessage(12, getReachabilityDetails()); + } + if (probingDetails_ != null) { + output.writeMessage(14, getProbingDetails()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSource()); + } + if (destination_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDestination()); + } + if (!getProtocolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, protocol_); + } + { + int dataSize = 0; + for (int i = 0; i < relatedProjects_.size(); i++) { + dataSize += computeStringSizeNoTag(relatedProjects_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelatedProjectsList().size(); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, displayName_); + } + 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(8, labels__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (reachabilityDetails_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(12, getReachabilityDetails()); + } + if (probingDetails_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getProbingDetails()); + } + size += unknownFields.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.networkmanagement.v1beta1.ConnectivityTest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest other = + (com.google.cloud.networkmanagement.v1beta1.ConnectivityTest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (hasDestination() != other.hasDestination()) return false; + if (hasDestination()) { + if (!getDestination().equals(other.getDestination())) return false; + } + if (!getProtocol().equals(other.getProtocol())) return false; + if (!getRelatedProjectsList().equals(other.getRelatedProjectsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) 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 (hasReachabilityDetails() != other.hasReachabilityDetails()) return false; + if (hasReachabilityDetails()) { + if (!getReachabilityDetails().equals(other.getReachabilityDetails())) return false; + } + if (hasProbingDetails() != other.hasProbingDetails()) return false; + if (hasProbingDetails()) { + if (!getProbingDetails().equals(other.getProbingDetails())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + if (hasDestination()) { + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().hashCode(); + } + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + if (getRelatedProjectsCount() > 0) { + hash = (37 * hash) + RELATED_PROJECTS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedProjectsList().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().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 (hasReachabilityDetails()) { + hash = (37 * hash) + REACHABILITY_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getReachabilityDetails().hashCode(); + } + if (hasProbingDetails()) { + hash = (37 * hash) + PROBING_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getProbingDetails().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.ConnectivityTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ConnectivityTest 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.networkmanagement.v1beta1.ConnectivityTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ConnectivityTest 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.networkmanagement.v1beta1.ConnectivityTest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ConnectivityTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.ConnectivityTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ConnectivityTest 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.networkmanagement.v1beta1.ConnectivityTest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ConnectivityTest 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.networkmanagement.v1beta1.ConnectivityTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ConnectivityTest 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.networkmanagement.v1beta1.ConnectivityTest 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 Connectivity Test for a network reachability analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ConnectivityTest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.ConnectivityTest) + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ConnectivityTest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 8: + 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.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ConnectivityTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.class, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + if (destinationBuilder_ == null) { + destination_ = null; + } else { + destination_ = null; + destinationBuilder_ = null; + } + protocol_ = ""; + + relatedProjects_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + displayName_ = ""; + + internalGetMutableLabels().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetails_ = null; + } else { + reachabilityDetails_ = null; + reachabilityDetailsBuilder_ = null; + } + if (probingDetailsBuilder_ == null) { + probingDetails_ = null; + } else { + probingDetails_ = null; + probingDetailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ConnectivityTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest build() { + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest buildPartial() { + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest result = + new com.google.cloud.networkmanagement.v1beta1.ConnectivityTest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + if (destinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = destinationBuilder_.build(); + } + result.protocol_ = protocol_; + if (((bitField0_ & 0x00000001) != 0)) { + relatedProjects_ = relatedProjects_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.relatedProjects_ = relatedProjects_; + result.displayName_ = displayName_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (reachabilityDetailsBuilder_ == null) { + result.reachabilityDetails_ = reachabilityDetails_; + } else { + result.reachabilityDetails_ = reachabilityDetailsBuilder_.build(); + } + if (probingDetailsBuilder_ == null) { + result.probingDetails_ = probingDetails_; + } else { + result.probingDetails_ = probingDetailsBuilder_.build(); + } + 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.networkmanagement.v1beta1.ConnectivityTest) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.ConnectivityTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.ConnectivityTest other) { + if (other == com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.hasDestination()) { + mergeDestination(other.getDestination()); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + onChanged(); + } + if (!other.relatedProjects_.isEmpty()) { + if (relatedProjects_.isEmpty()) { + relatedProjects_ = other.relatedProjects_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRelatedProjectsIsMutable(); + relatedProjects_.addAll(other.relatedProjects_); + } + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasReachabilityDetails()) { + mergeReachabilityDetails(other.getReachabilityDetails()); + } + if (other.hasProbingDetails()) { + mergeProbingDetails(other.getProbingDetails()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.ConnectivityTest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test}`
+     * 
+ * + * 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. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test}`
+     * 
+ * + * 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. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * The user-supplied description of the Connectivity Test.
+     * Maximum of 512 characters.
+     * 
+ * + * string description = 2; + * + * @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; + onChanged(); + return this; + } + + private com.google.cloud.networkmanagement.v1beta1.Endpoint source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Endpoint, + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder> + sourceBuilder_; + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.networkmanagement.v1beta1.Endpoint getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.networkmanagement.v1beta1.Endpoint.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.networkmanagement.v1beta1.Endpoint value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource( + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource(com.google.cloud.networkmanagement.v1beta1.Endpoint value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.networkmanagement.v1beta1.Endpoint.newBuilder(source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.networkmanagement.v1beta1.Endpoint.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+     * Required. Source specification of the Connectivity Test.
+     * You can use a combination of source IP address, virtual machine
+     * (VM) instance, or Compute Engine network to uniquely identify
+     * the source location.
+     * Examples:
+     * If the source IP address is an internal IP address within a Google Cloud
+     * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+     * network. Otherwise, specify the VM instance, which already contains its
+     * internal IP address and VPC network information.
+     * If the source of the test is within an on-premises network, then you must
+     * provide the destination VPC network.
+     * If the source endpoint is a Compute Engine VM instance with multiple
+     * network interfaces, the instance itself is not sufficient to identify the
+     * endpoint. So, you must also specify the source IP address or VPC network.
+     * A reachability analysis proceeds even if the source location is
+     * ambiguous. However, the test result may include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Endpoint, + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Endpoint, + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private com.google.cloud.networkmanagement.v1beta1.Endpoint destination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Endpoint, + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder> + destinationBuilder_; + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + public boolean hasDestination() { + return destinationBuilder_ != null || destination_ != null; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + public com.google.cloud.networkmanagement.v1beta1.Endpoint getDestination() { + if (destinationBuilder_ == null) { + return destination_ == null + ? com.google.cloud.networkmanagement.v1beta1.Endpoint.getDefaultInstance() + : destination_; + } else { + return destinationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestination(com.google.cloud.networkmanagement.v1beta1.Endpoint value) { + if (destinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + destinationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestination( + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder builderForValue) { + if (destinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + destinationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDestination(com.google.cloud.networkmanagement.v1beta1.Endpoint value) { + if (destinationBuilder_ == null) { + if (destination_ != null) { + destination_ = + com.google.cloud.networkmanagement.v1beta1.Endpoint.newBuilder(destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + destinationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDestination() { + if (destinationBuilder_ == null) { + destination_ = null; + onChanged(); + } else { + destination_ = null; + destinationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder getDestinationBuilder() { + + onChanged(); + return getDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder getDestinationOrBuilder() { + if (destinationBuilder_ != null) { + return destinationBuilder_.getMessageOrBuilder(); + } else { + return destination_ == null + ? com.google.cloud.networkmanagement.v1beta1.Endpoint.getDefaultInstance() + : destination_; + } + } + /** + * + * + *
+     * Required. Destination specification of the Connectivity Test.
+     * You can use a combination of destination IP address, Compute Engine
+     * VM instance, or VPC network to uniquely identify the destination
+     * location.
+     * Even if the destination IP address is not unique, the source IP
+     * location is unique. Usually, the analysis can infer the destination
+     * endpoint from route information.
+     * If the destination you specify is a VM instance and the instance has
+     * multiple network interfaces, then you must also specify either
+     * a destination IP address  or VPC network to identify the destination
+     * interface.
+     * A reachability analysis proceeds even if the destination location is
+     * ambiguous. However, the result can include endpoints that you don't
+     * intend to test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Endpoint, + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder> + getDestinationFieldBuilder() { + if (destinationBuilder_ == null) { + destinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Endpoint, + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder>( + getDestination(), getParentForChildren(), isClean()); + destination_ = null; + } + return destinationBuilder_; + } + + private java.lang.Object protocol_ = ""; + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + protocol_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + + protocol_ = getDefaultInstance().getProtocol(); + onChanged(); + return this; + } + /** + * + * + *
+     * IP Protocol of the test. When not provided, "TCP" is assumed.
+     * 
+ * + * string protocol = 5; + * + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + protocol_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList relatedProjects_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRelatedProjectsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + relatedProjects_ = new com.google.protobuf.LazyStringArrayList(relatedProjects_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @return A list containing the relatedProjects. + */ + public com.google.protobuf.ProtocolStringList getRelatedProjectsList() { + return relatedProjects_.getUnmodifiableView(); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @return The count of relatedProjects. + */ + public int getRelatedProjectsCount() { + return relatedProjects_.size(); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the element to return. + * @return The relatedProjects at the given index. + */ + public java.lang.String getRelatedProjects(int index) { + return relatedProjects_.get(index); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedProjects at the given index. + */ + public com.google.protobuf.ByteString getRelatedProjectsBytes(int index) { + return relatedProjects_.getByteString(index); + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param index The index to set the value at. + * @param value The relatedProjects to set. + * @return This builder for chaining. + */ + public Builder setRelatedProjects(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedProjectsIsMutable(); + relatedProjects_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param value The relatedProjects to add. + * @return This builder for chaining. + */ + public Builder addRelatedProjects(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedProjectsIsMutable(); + relatedProjects_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param values The relatedProjects to add. + * @return This builder for chaining. + */ + public Builder addAllRelatedProjects(java.lang.Iterable values) { + ensureRelatedProjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedProjects_); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @return This builder for chaining. + */ + public Builder clearRelatedProjects() { + relatedProjects_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Other projects that may be relevant for reachability analysis.
+     * This is applicable to scenarios where a test can cross project boundaries.
+     * 
+ * + * repeated string related_projects = 6; + * + * @param value The bytes of the relatedProjects to add. + * @return This builder for chaining. + */ + public Builder addRelatedProjectsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelatedProjectsIsMutable(); + relatedProjects_.add(value); + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of a Connectivity Test.
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + 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() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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 test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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 test was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.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; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time the test's configuration was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.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.cloud.networkmanagement.v1beta1.ReachabilityDetails reachabilityDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails, + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Builder, + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetailsOrBuilder> + reachabilityDetailsBuilder_; + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the reachabilityDetails field is set. + */ + public boolean hasReachabilityDetails() { + return reachabilityDetailsBuilder_ != null || reachabilityDetails_ != null; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reachabilityDetails. + */ + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails getReachabilityDetails() { + if (reachabilityDetailsBuilder_ == null) { + return reachabilityDetails_ == null + ? com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } else { + return reachabilityDetailsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setReachabilityDetails( + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails value) { + if (reachabilityDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reachabilityDetails_ = value; + onChanged(); + } else { + reachabilityDetailsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setReachabilityDetails( + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Builder builderForValue) { + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetails_ = builderForValue.build(); + onChanged(); + } else { + reachabilityDetailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeReachabilityDetails( + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails value) { + if (reachabilityDetailsBuilder_ == null) { + if (reachabilityDetails_ != null) { + reachabilityDetails_ = + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.newBuilder( + reachabilityDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + reachabilityDetails_ = value; + } + onChanged(); + } else { + reachabilityDetailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearReachabilityDetails() { + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetails_ = null; + onChanged(); + } else { + reachabilityDetails_ = null; + reachabilityDetailsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Builder + getReachabilityDetailsBuilder() { + + onChanged(); + return getReachabilityDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetailsOrBuilder + getReachabilityDetailsOrBuilder() { + if (reachabilityDetailsBuilder_ != null) { + return reachabilityDetailsBuilder_.getMessageOrBuilder(); + } else { + return reachabilityDetails_ == null + ? com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.getDefaultInstance() + : reachabilityDetails_; + } + } + /** + * + * + *
+     * Output only. The reachability details of this test from the latest run.
+     * The details are updated when creating a new test, updating an
+     * existing test, or triggering a one-time rerun of an existing test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails, + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Builder, + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetailsOrBuilder> + getReachabilityDetailsFieldBuilder() { + if (reachabilityDetailsBuilder_ == null) { + reachabilityDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails, + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Builder, + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetailsOrBuilder>( + getReachabilityDetails(), getParentForChildren(), isClean()); + reachabilityDetails_ = null; + } + return reachabilityDetailsBuilder_; + } + + private com.google.cloud.networkmanagement.v1beta1.ProbingDetails probingDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ProbingDetails, + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.Builder, + com.google.cloud.networkmanagement.v1beta1.ProbingDetailsOrBuilder> + probingDetailsBuilder_; + /** + * + * + *
+     * Output only. The probing details of this test from the latest run, present for
+     * applicable tests only. The details are updated when creating a new test,
+     * updating an existing test, or triggering a one-time rerun of an existing
+     * test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the probingDetails field is set. + */ + public boolean hasProbingDetails() { + return probingDetailsBuilder_ != null || probingDetails_ != null; + } + /** + * + * + *
+     * Output only. The probing details of this test from the latest run, present for
+     * applicable tests only. The details are updated when creating a new test,
+     * updating an existing test, or triggering a one-time rerun of an existing
+     * test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The probingDetails. + */ + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails getProbingDetails() { + if (probingDetailsBuilder_ == null) { + return probingDetails_ == null + ? com.google.cloud.networkmanagement.v1beta1.ProbingDetails.getDefaultInstance() + : probingDetails_; + } else { + return probingDetailsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The probing details of this test from the latest run, present for
+     * applicable tests only. The details are updated when creating a new test,
+     * updating an existing test, or triggering a one-time rerun of an existing
+     * test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProbingDetails( + com.google.cloud.networkmanagement.v1beta1.ProbingDetails value) { + if (probingDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + probingDetails_ = value; + onChanged(); + } else { + probingDetailsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The probing details of this test from the latest run, present for
+     * applicable tests only. The details are updated when creating a new test,
+     * updating an existing test, or triggering a one-time rerun of an existing
+     * test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProbingDetails( + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.Builder builderForValue) { + if (probingDetailsBuilder_ == null) { + probingDetails_ = builderForValue.build(); + onChanged(); + } else { + probingDetailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The probing details of this test from the latest run, present for
+     * applicable tests only. The details are updated when creating a new test,
+     * updating an existing test, or triggering a one-time rerun of an existing
+     * test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeProbingDetails( + com.google.cloud.networkmanagement.v1beta1.ProbingDetails value) { + if (probingDetailsBuilder_ == null) { + if (probingDetails_ != null) { + probingDetails_ = + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.newBuilder(probingDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + probingDetails_ = value; + } + onChanged(); + } else { + probingDetailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The probing details of this test from the latest run, present for
+     * applicable tests only. The details are updated when creating a new test,
+     * updating an existing test, or triggering a one-time rerun of an existing
+     * test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearProbingDetails() { + if (probingDetailsBuilder_ == null) { + probingDetails_ = null; + onChanged(); + } else { + probingDetails_ = null; + probingDetailsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The probing details of this test from the latest run, present for
+     * applicable tests only. The details are updated when creating a new test,
+     * updating an existing test, or triggering a one-time rerun of an existing
+     * test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails.Builder + getProbingDetailsBuilder() { + + onChanged(); + return getProbingDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The probing details of this test from the latest run, present for
+     * applicable tests only. The details are updated when creating a new test,
+     * updating an existing test, or triggering a one-time rerun of an existing
+     * test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.ProbingDetailsOrBuilder + getProbingDetailsOrBuilder() { + if (probingDetailsBuilder_ != null) { + return probingDetailsBuilder_.getMessageOrBuilder(); + } else { + return probingDetails_ == null + ? com.google.cloud.networkmanagement.v1beta1.ProbingDetails.getDefaultInstance() + : probingDetails_; + } + } + /** + * + * + *
+     * Output only. The probing details of this test from the latest run, present for
+     * applicable tests only. The details are updated when creating a new test,
+     * updating an existing test, or triggering a one-time rerun of an existing
+     * test.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ProbingDetails, + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.Builder, + com.google.cloud.networkmanagement.v1beta1.ProbingDetailsOrBuilder> + getProbingDetailsFieldBuilder() { + if (probingDetailsBuilder_ == null) { + probingDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ProbingDetails, + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.Builder, + com.google.cloud.networkmanagement.v1beta1.ProbingDetailsOrBuilder>( + getProbingDetails(), getParentForChildren(), isClean()); + probingDetails_ = null; + } + return probingDetailsBuilder_; + } + + @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.networkmanagement.v1beta1.ConnectivityTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.ConnectivityTest) + private static final com.google.cloud.networkmanagement.v1beta1.ConnectivityTest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.ConnectivityTest(); + } + + public static com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConnectivityTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConnectivityTest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.ConnectivityTest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTestName.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTestName.java new file mode 100644 index 00000000..56b81992 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTestName.java @@ -0,0 +1,192 @@ +/* + * 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. + */ + +package com.google.cloud.networkmanagement.v1beta1; + +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 ConnectivityTestName implements ResourceName { + private static final PathTemplate PROJECT_TEST = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/global/connectivityTests/{test}"); + private volatile Map fieldValuesMap; + private final String project; + private final String test; + + @Deprecated + protected ConnectivityTestName() { + project = null; + test = null; + } + + private ConnectivityTestName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + test = Preconditions.checkNotNull(builder.getTest()); + } + + public String getProject() { + return project; + } + + public String getTest() { + return test; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ConnectivityTestName of(String project, String test) { + return newBuilder().setProject(project).setTest(test).build(); + } + + public static String format(String project, String test) { + return newBuilder().setProject(project).setTest(test).build().toString(); + } + + public static ConnectivityTestName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_TEST.validatedMatch( + formattedString, "ConnectivityTestName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("test")); + } + + 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 (ConnectivityTestName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_TEST.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 (test != null) { + fieldMapBuilder.put("test", test); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_TEST.instantiate("project", project, "test", test); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ConnectivityTestName that = ((ConnectivityTestName) o); + return Objects.equals(this.project, that.project) && Objects.equals(this.test, that.test); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(test); + return h; + } + + /** Builder for projects/{project}/locations/global/connectivityTests/{test}. */ + public static class Builder { + private String project; + private String test; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getTest() { + return test; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setTest(String test) { + this.test = test; + return this; + } + + private Builder(ConnectivityTestName connectivityTestName) { + this.project = connectivityTestName.project; + this.test = connectivityTestName.test; + } + + public ConnectivityTestName build() { + return new ConnectivityTestName(this); + } + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTestOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTestOrBuilder.java new file mode 100644 index 00000000..ccfffd69 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ConnectivityTestOrBuilder.java @@ -0,0 +1,581 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface ConnectivityTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.ConnectivityTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Unique name of the resource using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The user-supplied description of the Connectivity Test.
+   * Maximum of 512 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.networkmanagement.v1beta1.Endpoint getSource(); + /** + * + * + *
+   * Required. Source specification of the Connectivity Test.
+   * You can use a combination of source IP address, virtual machine
+   * (VM) instance, or Compute Engine network to uniquely identify
+   * the source location.
+   * Examples:
+   * If the source IP address is an internal IP address within a Google Cloud
+   * Virtual Private Cloud (VPC) network, then you must also specify the VPC
+   * network. Otherwise, specify the VM instance, which already contains its
+   * internal IP address and VPC network information.
+   * If the source of the test is within an on-premises network, then you must
+   * provide the destination VPC network.
+   * If the source endpoint is a Compute Engine VM instance with multiple
+   * network interfaces, the instance itself is not sufficient to identify the
+   * endpoint. So, you must also specify the source IP address or VPC network.
+   * A reachability analysis proceeds even if the source location is
+   * ambiguous. However, the test result may include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + boolean hasDestination(); + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + com.google.cloud.networkmanagement.v1beta1.Endpoint getDestination(); + /** + * + * + *
+   * Required. Destination specification of the Connectivity Test.
+   * You can use a combination of destination IP address, Compute Engine
+   * VM instance, or VPC network to uniquely identify the destination
+   * location.
+   * Even if the destination IP address is not unique, the source IP
+   * location is unique. Usually, the analysis can infer the destination
+   * endpoint from route information.
+   * If the destination you specify is a VM instance and the instance has
+   * multiple network interfaces, then you must also specify either
+   * a destination IP address  or VPC network to identify the destination
+   * interface.
+   * A reachability analysis proceeds even if the destination location is
+   * ambiguous. However, the result can include endpoints that you don't
+   * intend to test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder getDestinationOrBuilder(); + + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * + * + *
+   * IP Protocol of the test. When not provided, "TCP" is assumed.
+   * 
+ * + * string protocol = 5; + * + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString getProtocolBytes(); + + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return A list containing the relatedProjects. + */ + java.util.List getRelatedProjectsList(); + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @return The count of relatedProjects. + */ + int getRelatedProjectsCount(); + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the element to return. + * @return The relatedProjects at the given index. + */ + java.lang.String getRelatedProjects(int index); + /** + * + * + *
+   * Other projects that may be relevant for reachability analysis.
+   * This is applicable to scenarios where a test can cross project boundaries.
+   * 
+ * + * repeated string related_projects = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedProjects at the given index. + */ + com.google.protobuf.ByteString getRelatedProjectsBytes(int index); + + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. The display name of a Connectivity Test.
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + int getLabelsCount(); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the test was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time the test's configuration was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the reachabilityDetails field is set. + */ + boolean hasReachabilityDetails(); + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reachabilityDetails. + */ + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails getReachabilityDetails(); + /** + * + * + *
+   * Output only. The reachability details of this test from the latest run.
+   * The details are updated when creating a new test, updating an
+   * existing test, or triggering a one-time rerun of an existing test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetailsOrBuilder + getReachabilityDetailsOrBuilder(); + + /** + * + * + *
+   * Output only. The probing details of this test from the latest run, present for
+   * applicable tests only. The details are updated when creating a new test,
+   * updating an existing test, or triggering a one-time rerun of an existing
+   * test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the probingDetails field is set. + */ + boolean hasProbingDetails(); + /** + * + * + *
+   * Output only. The probing details of this test from the latest run, present for
+   * applicable tests only. The details are updated when creating a new test,
+   * updating an existing test, or triggering a one-time rerun of an existing
+   * test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The probingDetails. + */ + com.google.cloud.networkmanagement.v1beta1.ProbingDetails getProbingDetails(); + /** + * + * + *
+   * Output only. The probing details of this test from the latest run, present for
+   * applicable tests only. The details are updated when creating a new test,
+   * updating an existing test, or triggering a one-time rerun of an existing
+   * test.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkmanagement.v1beta1.ProbingDetailsOrBuilder getProbingDetailsOrBuilder(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CreateConnectivityTestRequest.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CreateConnectivityTestRequest.java new file mode 100644 index 00000000..916bf5c9 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CreateConnectivityTestRequest.java @@ -0,0 +1,1188 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Request for the `CreateConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} + */ +public final class CreateConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) + CreateConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateConnectivityTestRequest.newBuilder() to construct. + private CreateConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateConnectivityTestRequest() { + parent_ = ""; + testId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + testId_ = s; + break; + } + case 26: + { + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource of the Connectivity Test to create:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource of the Connectivity Test to create:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 TEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object testId_; + /** + * + * + *
+   * Required. The logical name of the Connectivity Test in your project
+   * with the following restrictions:
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-40 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project
+   * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The testId. + */ + @java.lang.Override + public java.lang.String getTestId() { + java.lang.Object ref = testId_; + 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(); + testId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The logical name of the Connectivity Test in your project
+   * with the following restrictions:
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-40 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project
+   * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for testId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTestIdBytes() { + java.lang.Object ref = testId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private com.google.cloud.networkmanagement.v1beta1.ConnectivityTest resource_; + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getResource() { + return resource_ == null + ? com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance() + : resource_; + } + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder + getResourceOrBuilder() { + return getResource(); + } + + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getTestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, testId_); + } + if (resource_ != null) { + output.writeMessage(3, getResource()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getTestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, testId_); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getResource()); + } + size += unknownFields.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.networkmanagement.v1beta1.CreateConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getTestId().equals(other.getTestId())) return false; + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource().equals(other.getResource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + TEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getTestId().hashCode(); + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest 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.networkmanagement.v1beta1.CreateConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest 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.networkmanagement.v1beta1.CreateConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest 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.networkmanagement.v1beta1.CreateConnectivityTestRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + 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.networkmanagement.v1beta1.CreateConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest 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.networkmanagement.v1beta1.CreateConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `CreateConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + testId_ = ""; + + if (resourceBuilder_ == null) { + resource_ = null; + } else { + resource_ = null; + resourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(this); + result.parent_ = parent_; + result.testId_ = testId_; + if (resourceBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = resourceBuilder_.build(); + } + 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.networkmanagement.v1beta1.CreateConnectivityTestRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getTestId().isEmpty()) { + testId_ = other.testId_; + onChanged(); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Test to create:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object testId_ = ""; + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The testId. + */ + public java.lang.String getTestId() { + java.lang.Object ref = testId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + testId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for testId. + */ + public com.google.protobuf.ByteString getTestIdBytes() { + java.lang.Object ref = testId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The testId to set. + * @return This builder for chaining. + */ + public Builder setTestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + testId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTestId() { + + testId_ = getDefaultInstance().getTestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the Connectivity Test in your project
+     * with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-40 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project
+     * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for testId to set. + * @return This builder for chaining. + */ + public Builder setTestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + testId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.networkmanagement.v1beta1.ConnectivityTest resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder> + resourceBuilder_; + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceBuilder_ != null || resource_ != null; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getResource() { + if (resourceBuilder_ == null) { + return resource_ == null + ? com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance() + : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource(com.google.cloud.networkmanagement.v1beta1.ConnectivityTest value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeResource( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest value) { + if (resourceBuilder_ == null) { + if (resource_ != null) { + resource_ = + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.newBuilder(resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + resourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + resource_ = null; + onChanged(); + } else { + resource_ = null; + resourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder + getResourceBuilder() { + + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder + getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null + ? com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance() + : resource_; + } + } + /** + * + * + *
+     * Required. A `ConnectivityTest` resource
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder>( + getResource(), getParentForChildren(), isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + @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.networkmanagement.v1beta1.CreateConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.CreateConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CreateConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CreateConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..11200c32 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/CreateConnectivityTestRequestOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface CreateConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the Connectivity Test to create:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource of the Connectivity Test to create:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The logical name of the Connectivity Test in your project
+   * with the following restrictions:
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-40 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project
+   * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The testId. + */ + java.lang.String getTestId(); + /** + * + * + *
+   * Required. The logical name of the Connectivity Test in your project
+   * with the following restrictions:
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-40 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project
+   * 
+ * + * string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for testId. + */ + com.google.protobuf.ByteString getTestIdBytes(); + + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getResource(); + /** + * + * + *
+   * Required. A `ConnectivityTest` resource
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder getResourceOrBuilder(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeleteConnectivityTestRequest.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeleteConnectivityTestRequest.java new file mode 100644 index 00000000..d48f32ac --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeleteConnectivityTestRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Request for the `DeleteConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} + */ +public final class DeleteConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) + DeleteConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteConnectivityTestRequest.newBuilder() to construct. + private DeleteConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteConnectivityTestRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.networkmanagement.v1beta1.DeleteConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest 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.networkmanagement.v1beta1.DeleteConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest 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.networkmanagement.v1beta1.DeleteConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest 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.networkmanagement.v1beta1.DeleteConnectivityTestRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + 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.networkmanagement.v1beta1.DeleteConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest 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.networkmanagement.v1beta1.DeleteConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `DeleteConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(this); + result.name_ = name_; + 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.networkmanagement.v1beta1.DeleteConnectivityTestRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + 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.networkmanagement.v1beta1.DeleteConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.DeleteConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeleteConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeleteConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..a14c38f7 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeleteConnectivityTestRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface DeleteConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfo.java new file mode 100644 index 00000000..80fe9a04 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfo.java @@ -0,0 +1,1020 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Details of the final state "deliver" and associated resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.DeliverInfo} + */ +public final class DeliverInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.DeliverInfo) + DeliverInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeliverInfo.newBuilder() to construct. + private DeliverInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeliverInfo() { + target_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeliverInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeliverInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + target_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.class, + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Builder.class); + } + + /** + * + * + *
+   * Deliver target types:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.DeliverInfo.Target} + */ + public enum Target implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + TARGET_UNSPECIFIED(0), + /** + * + * + *
+     * Target is a Compute Engine instance.
+     * 
+ * + * INSTANCE = 1; + */ + INSTANCE(1), + /** + * + * + *
+     * Target is the internet.
+     * 
+ * + * INTERNET = 2; + */ + INTERNET(2), + /** + * + * + *
+     * Target is a Google API.
+     * 
+ * + * GOOGLE_API = 3; + */ + GOOGLE_API(3), + /** + * + * + *
+     * Target is a Google Kubernetes Engine cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + GKE_MASTER(4), + /** + * + * + *
+     * Target is a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 5; + */ + CLOUD_SQL_INSTANCE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + public static final int TARGET_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Target is a Compute Engine instance.
+     * 
+ * + * INSTANCE = 1; + */ + public static final int INSTANCE_VALUE = 1; + /** + * + * + *
+     * Target is the internet.
+     * 
+ * + * INTERNET = 2; + */ + public static final int INTERNET_VALUE = 2; + /** + * + * + *
+     * Target is a Google API.
+     * 
+ * + * GOOGLE_API = 3; + */ + public static final int GOOGLE_API_VALUE = 3; + /** + * + * + *
+     * Target is a Google Kubernetes Engine cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + public static final int GKE_MASTER_VALUE = 4; + /** + * + * + *
+     * Target is a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 5; + */ + public static final int CLOUD_SQL_INSTANCE_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 Target 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 Target forNumber(int value) { + switch (value) { + case 0: + return TARGET_UNSPECIFIED; + case 1: + return INSTANCE; + case 2: + return INTERNET; + case 3: + return GOOGLE_API; + case 4: + return GKE_MASTER; + case 5: + return CLOUD_SQL_INSTANCE; + 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 Target findValueByNumber(int number) { + return Target.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.networkmanagement.v1beta1.DeliverInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Target[] VALUES = values(); + + public static Target 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 Target(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.DeliverInfo.Target) + } + + public static final int TARGET_FIELD_NUMBER = 1; + private int target_; + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target getTarget() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target result = + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target.valueOf(target_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object resourceUri_; + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = 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 (target_ + != com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, target_); + } + if (!getResourceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (target_ + != com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, target_); + } + if (!getResourceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += unknownFields.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.networkmanagement.v1beta1.DeliverInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.DeliverInfo other = + (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) obj; + + if (target_ != other.target_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + target_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.DeliverInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeliverInfo 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.networkmanagement.v1beta1.DeliverInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeliverInfo 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.networkmanagement.v1beta1.DeliverInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeliverInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeliverInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeliverInfo 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.networkmanagement.v1beta1.DeliverInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeliverInfo 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.networkmanagement.v1beta1.DeliverInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeliverInfo 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.networkmanagement.v1beta1.DeliverInfo 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; + } + /** + * + * + *
+   * Details of the final state "deliver" and associated resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.DeliverInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.DeliverInfo) + com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.class, + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.DeliverInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + target_ = 0; + + resourceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeliverInfo build() { + com.google.cloud.networkmanagement.v1beta1.DeliverInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeliverInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.DeliverInfo result = + new com.google.cloud.networkmanagement.v1beta1.DeliverInfo(this); + result.target_ = target_; + result.resourceUri_ = resourceUri_; + 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.networkmanagement.v1beta1.DeliverInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.DeliverInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.DeliverInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance()) + return this; + if (other.target_ != 0) { + setTargetValue(other.getTargetValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.DeliverInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int target_ = 0; + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo.Target target = 1; + * + * @param value The enum numeric value on the wire for target to set. + * @return This builder for chaining. + */ + public Builder setTargetValue(int value) { + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target getTarget() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target result = + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target.valueOf(target_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo.Target target = 1; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where the packet is delivered to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo.Target target = 1; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + + resourceUri_ = getDefaultInstance().getResourceUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is delivered to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUri_ = value; + 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.networkmanagement.v1beta1.DeliverInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.DeliverInfo) + private static final com.google.cloud.networkmanagement.v1beta1.DeliverInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.DeliverInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeliverInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeliverInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.DeliverInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfoOrBuilder.java new file mode 100644 index 00000000..adc642a7 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface DeliverInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.DeliverInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + int getTargetValue(); + /** + * + * + *
+   * Target type where the packet is delivered to.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo.Target target = 1; + * + * @return The target. + */ + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target getTarget(); + + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that the packet is delivered to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfo.java new file mode 100644 index 00000000..d3750f80 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfo.java @@ -0,0 +1,1429 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Details of the final state "drop" and associated resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.DropInfo} + */ +public final class DropInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.DropInfo) + DropInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DropInfo.newBuilder() to construct. + private DropInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DropInfo() { + cause_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DropInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DropInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + cause_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.DropInfo.class, + com.google.cloud.networkmanagement.v1beta1.DropInfo.Builder.class); + } + + /** + * + * + *
+   * Drop cause types:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.DropInfo.Cause} + */ + public enum Cause implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + CAUSE_UNSPECIFIED(0), + /** + * + * + *
+     * Destination external address cannot be resolved to a known target. If
+     * the address is used in a Google Cloud project, provide the project ID
+     * as test input.
+     * 
+ * + * UNKNOWN_EXTERNAL_ADDRESS = 1; + */ + UNKNOWN_EXTERNAL_ADDRESS(1), + /** + * + * + *
+     * a Compute Engine instance can only send or receive a packet with a
+     * foreign IP address if ip_forward is enabled.
+     * 
+ * + * FOREIGN_IP_DISALLOWED = 2; + */ + FOREIGN_IP_DISALLOWED(2), + /** + * + * + *
+     * Dropped due to a firewall rule, unless allowed due to connection
+     * tracking.
+     * 
+ * + * FIREWALL_RULE = 3; + */ + FIREWALL_RULE(3), + /** + * + * + *
+     * Dropped due to no routes.
+     * 
+ * + * NO_ROUTE = 4; + */ + NO_ROUTE(4), + /** + * + * + *
+     * Dropped due to invalid route. Route's next hop is a blackhole.
+     * 
+ * + * ROUTE_BLACKHOLE = 5; + */ + ROUTE_BLACKHOLE(5), + /** + * + * + *
+     * Packet is sent to a wrong (unintended) network. Example: you trace a
+     * packet from VM1:Network1 to VM2:Network2, however, the route configured
+     * in Network1 sends the packet destined for VM2's IP addresss to Network3.
+     * 
+ * + * ROUTE_WRONG_NETWORK = 6; + */ + ROUTE_WRONG_NETWORK(6), + /** + * + * + *
+     * Packet with internal destination address sent to the internet gateway.
+     * 
+ * + * PRIVATE_TRAFFIC_TO_INTERNET = 7; + */ + PRIVATE_TRAFFIC_TO_INTERNET(7), + /** + * + * + *
+     * Instance with only an internal IP address tries to access Google API and
+     * services, but private Google access is not enabled.
+     * 
+ * + * PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + */ + PRIVATE_GOOGLE_ACCESS_DISALLOWED(8), + /** + * + * + *
+     * Instance with only an internal IP address tries to access external hosts,
+     * but Cloud NAT is not enabled in the subnet, unless special configurations
+     * on a VM allow this connection. For more details, see [Special
+     * configurations for VM
+     * instances](https://cloud.google.com/vpc/docs/special-configurations).
+     * 
+ * + * NO_EXTERNAL_ADDRESS = 9; + */ + NO_EXTERNAL_ADDRESS(9), + /** + * + * + *
+     * Destination internal address cannot be resolved to a known target. If
+     * this is a shared VPC scenario, verify if the service project ID is
+     * provided as test input. Otherwise, verify if the IP address is being
+     * used in the project.
+     * 
+ * + * UNKNOWN_INTERNAL_ADDRESS = 10; + */ + UNKNOWN_INTERNAL_ADDRESS(10), + /** + * + * + *
+     * Forwarding rule's protocol and ports do not match the packet header.
+     * 
+ * + * FORWARDING_RULE_MISMATCH = 11; + */ + FORWARDING_RULE_MISMATCH(11), + /** + * + * + *
+     * Forwarding rule does not have backends configured.
+     * 
+ * + * FORWARDING_RULE_NO_INSTANCES = 12; + */ + FORWARDING_RULE_NO_INSTANCES(12), + /** + * + * + *
+     * Firewalls block the health check probes to the backends and cause
+     * the backends to be unavailable for traffic from the load balancer.
+     * For more details, see [Health check firewall
+     * rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules).
+     * 
+ * + * FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + */ + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK(13), + /** + * + * + *
+     * Packet is sent from or to a Compute Engine instance that is not in a
+     * running state.
+     * 
+ * + * INSTANCE_NOT_RUNNING = 14; + */ + INSTANCE_NOT_RUNNING(14), + /** + * + * + *
+     * The type of traffic is blocked and the user cannot configure a firewall
+     * rule to enable it. See [Always blocked
+     * traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for
+     * more details.
+     * 
+ * + * TRAFFIC_TYPE_BLOCKED = 15; + */ + TRAFFIC_TYPE_BLOCKED(15), + /** + * + * + *
+     * Access to Google Kubernetes Engine cluster master's endpoint is not
+     * authorized. See [Access to the cluster
+     * endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints)
+     * for more details.
+     * 
+ * + * GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + */ + GKE_MASTER_UNAUTHORIZED_ACCESS(16), + /** + * + * + *
+     * Access to the Cloud SQL instance endpoint is not authorized.
+     * See [Authorizing with authorized
+     * networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for
+     * more details.
+     * 
+ * + * CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + */ + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS(17), + /** + * + * + *
+     * Packet was dropped inside Google Kubernetes Engine Service.
+     * 
+ * + * DROPPED_INSIDE_GKE_SERVICE = 18; + */ + DROPPED_INSIDE_GKE_SERVICE(18), + /** + * + * + *
+     * Packet was dropped inside Cloud SQL Service.
+     * 
+ * + * DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + */ + DROPPED_INSIDE_CLOUD_SQL_SERVICE(19), + /** + * + * + *
+     * Packet was dropped because there is no peering between the originating
+     * network and the Google Managed Services Network.
+     * 
+ * + * GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + */ + GOOGLE_MANAGED_SERVICE_NO_PEERING(20), + /** + * + * + *
+     * Packet was dropped because the Cloud SQL instance has neither a private
+     * nor a public IP address.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + */ + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS(21), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Cause is unspecified.
+     * 
+ * + * CAUSE_UNSPECIFIED = 0; + */ + public static final int CAUSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Destination external address cannot be resolved to a known target. If
+     * the address is used in a Google Cloud project, provide the project ID
+     * as test input.
+     * 
+ * + * UNKNOWN_EXTERNAL_ADDRESS = 1; + */ + public static final int UNKNOWN_EXTERNAL_ADDRESS_VALUE = 1; + /** + * + * + *
+     * a Compute Engine instance can only send or receive a packet with a
+     * foreign IP address if ip_forward is enabled.
+     * 
+ * + * FOREIGN_IP_DISALLOWED = 2; + */ + public static final int FOREIGN_IP_DISALLOWED_VALUE = 2; + /** + * + * + *
+     * Dropped due to a firewall rule, unless allowed due to connection
+     * tracking.
+     * 
+ * + * FIREWALL_RULE = 3; + */ + public static final int FIREWALL_RULE_VALUE = 3; + /** + * + * + *
+     * Dropped due to no routes.
+     * 
+ * + * NO_ROUTE = 4; + */ + public static final int NO_ROUTE_VALUE = 4; + /** + * + * + *
+     * Dropped due to invalid route. Route's next hop is a blackhole.
+     * 
+ * + * ROUTE_BLACKHOLE = 5; + */ + public static final int ROUTE_BLACKHOLE_VALUE = 5; + /** + * + * + *
+     * Packet is sent to a wrong (unintended) network. Example: you trace a
+     * packet from VM1:Network1 to VM2:Network2, however, the route configured
+     * in Network1 sends the packet destined for VM2's IP addresss to Network3.
+     * 
+ * + * ROUTE_WRONG_NETWORK = 6; + */ + public static final int ROUTE_WRONG_NETWORK_VALUE = 6; + /** + * + * + *
+     * Packet with internal destination address sent to the internet gateway.
+     * 
+ * + * PRIVATE_TRAFFIC_TO_INTERNET = 7; + */ + public static final int PRIVATE_TRAFFIC_TO_INTERNET_VALUE = 7; + /** + * + * + *
+     * Instance with only an internal IP address tries to access Google API and
+     * services, but private Google access is not enabled.
+     * 
+ * + * PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + */ + public static final int PRIVATE_GOOGLE_ACCESS_DISALLOWED_VALUE = 8; + /** + * + * + *
+     * Instance with only an internal IP address tries to access external hosts,
+     * but Cloud NAT is not enabled in the subnet, unless special configurations
+     * on a VM allow this connection. For more details, see [Special
+     * configurations for VM
+     * instances](https://cloud.google.com/vpc/docs/special-configurations).
+     * 
+ * + * NO_EXTERNAL_ADDRESS = 9; + */ + public static final int NO_EXTERNAL_ADDRESS_VALUE = 9; + /** + * + * + *
+     * Destination internal address cannot be resolved to a known target. If
+     * this is a shared VPC scenario, verify if the service project ID is
+     * provided as test input. Otherwise, verify if the IP address is being
+     * used in the project.
+     * 
+ * + * UNKNOWN_INTERNAL_ADDRESS = 10; + */ + public static final int UNKNOWN_INTERNAL_ADDRESS_VALUE = 10; + /** + * + * + *
+     * Forwarding rule's protocol and ports do not match the packet header.
+     * 
+ * + * FORWARDING_RULE_MISMATCH = 11; + */ + public static final int FORWARDING_RULE_MISMATCH_VALUE = 11; + /** + * + * + *
+     * Forwarding rule does not have backends configured.
+     * 
+ * + * FORWARDING_RULE_NO_INSTANCES = 12; + */ + public static final int FORWARDING_RULE_NO_INSTANCES_VALUE = 12; + /** + * + * + *
+     * Firewalls block the health check probes to the backends and cause
+     * the backends to be unavailable for traffic from the load balancer.
+     * For more details, see [Health check firewall
+     * rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules).
+     * 
+ * + * FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + */ + public static final int FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK_VALUE = 13; + /** + * + * + *
+     * Packet is sent from or to a Compute Engine instance that is not in a
+     * running state.
+     * 
+ * + * INSTANCE_NOT_RUNNING = 14; + */ + public static final int INSTANCE_NOT_RUNNING_VALUE = 14; + /** + * + * + *
+     * The type of traffic is blocked and the user cannot configure a firewall
+     * rule to enable it. See [Always blocked
+     * traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for
+     * more details.
+     * 
+ * + * TRAFFIC_TYPE_BLOCKED = 15; + */ + public static final int TRAFFIC_TYPE_BLOCKED_VALUE = 15; + /** + * + * + *
+     * Access to Google Kubernetes Engine cluster master's endpoint is not
+     * authorized. See [Access to the cluster
+     * endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints)
+     * for more details.
+     * 
+ * + * GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + */ + public static final int GKE_MASTER_UNAUTHORIZED_ACCESS_VALUE = 16; + /** + * + * + *
+     * Access to the Cloud SQL instance endpoint is not authorized.
+     * See [Authorizing with authorized
+     * networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for
+     * more details.
+     * 
+ * + * CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + */ + public static final int CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS_VALUE = 17; + /** + * + * + *
+     * Packet was dropped inside Google Kubernetes Engine Service.
+     * 
+ * + * DROPPED_INSIDE_GKE_SERVICE = 18; + */ + public static final int DROPPED_INSIDE_GKE_SERVICE_VALUE = 18; + /** + * + * + *
+     * Packet was dropped inside Cloud SQL Service.
+     * 
+ * + * DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + */ + public static final int DROPPED_INSIDE_CLOUD_SQL_SERVICE_VALUE = 19; + /** + * + * + *
+     * Packet was dropped because there is no peering between the originating
+     * network and the Google Managed Services Network.
+     * 
+ * + * GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + */ + public static final int GOOGLE_MANAGED_SERVICE_NO_PEERING_VALUE = 20; + /** + * + * + *
+     * Packet was dropped because the Cloud SQL instance has neither a private
+     * nor a public IP address.
+     * 
+ * + * CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + */ + public static final int CLOUD_SQL_INSTANCE_NO_IP_ADDRESS_VALUE = 21; + + 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 Cause 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 Cause forNumber(int value) { + switch (value) { + case 0: + return CAUSE_UNSPECIFIED; + case 1: + return UNKNOWN_EXTERNAL_ADDRESS; + case 2: + return FOREIGN_IP_DISALLOWED; + case 3: + return FIREWALL_RULE; + case 4: + return NO_ROUTE; + case 5: + return ROUTE_BLACKHOLE; + case 6: + return ROUTE_WRONG_NETWORK; + case 7: + return PRIVATE_TRAFFIC_TO_INTERNET; + case 8: + return PRIVATE_GOOGLE_ACCESS_DISALLOWED; + case 9: + return NO_EXTERNAL_ADDRESS; + case 10: + return UNKNOWN_INTERNAL_ADDRESS; + case 11: + return FORWARDING_RULE_MISMATCH; + case 12: + return FORWARDING_RULE_NO_INSTANCES; + case 13: + return FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK; + case 14: + return INSTANCE_NOT_RUNNING; + case 15: + return TRAFFIC_TYPE_BLOCKED; + case 16: + return GKE_MASTER_UNAUTHORIZED_ACCESS; + case 17: + return CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS; + case 18: + return DROPPED_INSIDE_GKE_SERVICE; + case 19: + return DROPPED_INSIDE_CLOUD_SQL_SERVICE; + case 20: + return GOOGLE_MANAGED_SERVICE_NO_PEERING; + case 21: + return CLOUD_SQL_INSTANCE_NO_IP_ADDRESS; + 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 Cause findValueByNumber(int number) { + return Cause.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.networkmanagement.v1beta1.DropInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Cause[] VALUES = values(); + + public static Cause 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 Cause(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.DropInfo.Cause) + } + + public static final int CAUSE_FIELD_NUMBER = 1; + private int cause_; + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause getCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause result = + com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause.valueOf(cause_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object resourceUri_; + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = 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 (cause_ + != com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause.CAUSE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, cause_); + } + if (!getResourceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cause_ + != com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause.CAUSE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, cause_); + } + if (!getResourceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += unknownFields.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.networkmanagement.v1beta1.DropInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.DropInfo other = + (com.google.cloud.networkmanagement.v1beta1.DropInfo) obj; + + if (cause_ != other.cause_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + cause_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.DropInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.DropInfo 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.networkmanagement.v1beta1.DropInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.DropInfo 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.networkmanagement.v1beta1.DropInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.DropInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.DropInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.DropInfo 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.networkmanagement.v1beta1.DropInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.DropInfo 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.networkmanagement.v1beta1.DropInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.DropInfo 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.networkmanagement.v1beta1.DropInfo 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; + } + /** + * + * + *
+   * Details of the final state "drop" and associated resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.DropInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.DropInfo) + com.google.cloud.networkmanagement.v1beta1.DropInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.DropInfo.class, + com.google.cloud.networkmanagement.v1beta1.DropInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.DropInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cause_ = 0; + + resourceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DropInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.DropInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DropInfo build() { + com.google.cloud.networkmanagement.v1beta1.DropInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DropInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.DropInfo result = + new com.google.cloud.networkmanagement.v1beta1.DropInfo(this); + result.cause_ = cause_; + result.resourceUri_ = resourceUri_; + 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.networkmanagement.v1beta1.DropInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.DropInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.DropInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.DropInfo.getDefaultInstance()) + return this; + if (other.cause_ != 0) { + setCauseValue(other.getCauseValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.DropInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.DropInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int cause_ = 0; + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + @java.lang.Override + public int getCauseValue() { + return cause_; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo.Cause cause = 1; + * + * @param value The enum numeric value on the wire for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseValue(int value) { + + cause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo.Cause cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause getCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause result = + com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause.valueOf(cause_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo.Cause cause = 1; + * + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause(com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause value) { + if (value == null) { + throw new NullPointerException(); + } + + cause_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Cause that the packet is dropped.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo.Cause cause = 1; + * + * @return This builder for chaining. + */ + public Builder clearCause() { + + cause_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + + resourceUri_ = getDefaultInstance().getResourceUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that caused the drop.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUri_ = value; + 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.networkmanagement.v1beta1.DropInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.DropInfo) + private static final com.google.cloud.networkmanagement.v1beta1.DropInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.DropInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.DropInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DropInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DropInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.DropInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfoOrBuilder.java new file mode 100644 index 00000000..8cf72c76 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface DropInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.DropInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo.Cause cause = 1; + * + * @return The enum numeric value on the wire for cause. + */ + int getCauseValue(); + /** + * + * + *
+   * Cause that the packet is dropped.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo.Cause cause = 1; + * + * @return The cause. + */ + com.google.cloud.networkmanagement.v1beta1.DropInfo.Cause getCause(); + + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that caused the drop.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Endpoint.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Endpoint.java new file mode 100644 index 00000000..956938e6 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Endpoint.java @@ -0,0 +1,2050 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Source or destination of the Connectivity Test.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.Endpoint} + */ +public final class Endpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.Endpoint) + EndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use Endpoint.newBuilder() to construct. + private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Endpoint() { + ipAddress_ = ""; + instance_ = ""; + gkeMasterCluster_ = ""; + cloudSqlInstance_ = ""; + network_ = ""; + networkType_ = 0; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Endpoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Endpoint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + ipAddress_ = s; + break; + } + case 16: + { + port_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + instance_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 40: + { + int rawValue = input.readEnum(); + + networkType_ = rawValue; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + gkeMasterCluster_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + cloudSqlInstance_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.Endpoint.class, + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder.class); + } + + /** + * + * + *
+   * The type definition of an endpoint's network. Use one of the
+   * following choices:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType} + */ + public enum NetworkType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default type if unspecified.
+     * 
+ * + * NETWORK_TYPE_UNSPECIFIED = 0; + */ + NETWORK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A network hosted within Google Cloud Platform.
+     * To receive more detailed output, specify the URI for the source or
+     * destination network.
+     * 
+ * + * GCP_NETWORK = 1; + */ + GCP_NETWORK(1), + /** + * + * + *
+     * A network hosted outside of Google Cloud Platform.
+     * This can be an on-premises network, or a network hosted by another cloud
+     * provider.
+     * 
+ * + * NON_GCP_NETWORK = 2; + */ + NON_GCP_NETWORK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default type if unspecified.
+     * 
+ * + * NETWORK_TYPE_UNSPECIFIED = 0; + */ + public static final int NETWORK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A network hosted within Google Cloud Platform.
+     * To receive more detailed output, specify the URI for the source or
+     * destination network.
+     * 
+ * + * GCP_NETWORK = 1; + */ + public static final int GCP_NETWORK_VALUE = 1; + /** + * + * + *
+     * A network hosted outside of Google Cloud Platform.
+     * This can be an on-premises network, or a network hosted by another cloud
+     * provider.
+     * 
+ * + * NON_GCP_NETWORK = 2; + */ + public static final int NON_GCP_NETWORK_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 NetworkType 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 NetworkType forNumber(int value) { + switch (value) { + case 0: + return NETWORK_TYPE_UNSPECIFIED; + case 1: + return GCP_NETWORK; + case 2: + return NON_GCP_NETWORK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NetworkType findValueByNumber(int number) { + return NetworkType.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.networkmanagement.v1beta1.Endpoint.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final NetworkType[] VALUES = values(); + + public static NetworkType 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 NetworkType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType) + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object ipAddress_; + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer
+   * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @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 the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer
+   * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @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 PORT_FIELD_NUMBER = 2; + private int port_; + /** + * + * + *
+   * The IP protocol port of the endpoint.
+   * Only applicable when protocol is TCP or UDP.
+   * 
+ * + * int32 port = 2; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int INSTANCE_FIELD_NUMBER = 3; + private volatile java.lang.Object instance_; + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + 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(); + instance_ = s; + return s; + } + } + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GKE_MASTER_CLUSTER_FIELD_NUMBER = 7; + private volatile java.lang.Object gkeMasterCluster_; + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The gkeMasterCluster. + */ + @java.lang.Override + public java.lang.String getGkeMasterCluster() { + java.lang.Object ref = gkeMasterCluster_; + 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(); + gkeMasterCluster_ = s; + return s; + } + } + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The bytes for gkeMasterCluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGkeMasterClusterBytes() { + java.lang.Object ref = gkeMasterCluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeMasterCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_SQL_INSTANCE_FIELD_NUMBER = 8; + private volatile java.lang.Object cloudSqlInstance_; + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The cloudSqlInstance. + */ + @java.lang.Override + public java.lang.String getCloudSqlInstance() { + java.lang.Object ref = cloudSqlInstance_; + 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(); + cloudSqlInstance_ = s; + return s; + } + } + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The bytes for cloudSqlInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudSqlInstanceBytes() { + java.lang.Object ref = cloudSqlInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 4; + private volatile java.lang.Object network_; + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @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; + } + } + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @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 NETWORK_TYPE_FIELD_NUMBER = 5; + private int networkType_; + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType network_type = 5; + * + * @return The enum numeric value on the wire for networkType. + */ + @java.lang.Override + public int getNetworkTypeValue() { + return networkType_; + } + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType network_type = 5; + * + * @return The networkType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType getNetworkType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType result = + com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType.valueOf(networkType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType.UNRECOGNIZED + : result; + } + + public static final int PROJECT_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object projectId_; + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a GCP
+   * project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a GCP
+   * project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = 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 (!getIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + if (!getInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instance_); + } + if (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, network_); + } + if (networkType_ + != com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType.NETWORK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, networkType_); + } + if (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, projectId_); + } + if (!getGkeMasterClusterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, gkeMasterCluster_); + } + if (!getCloudSqlInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, cloudSqlInstance_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, port_); + } + if (!getInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instance_); + } + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, network_); + } + if (networkType_ + != com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType.NETWORK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, networkType_); + } + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, projectId_); + } + if (!getGkeMasterClusterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, gkeMasterCluster_); + } + if (!getCloudSqlInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, cloudSqlInstance_); + } + size += unknownFields.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.networkmanagement.v1beta1.Endpoint)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.Endpoint other = + (com.google.cloud.networkmanagement.v1beta1.Endpoint) obj; + + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (getPort() != other.getPort()) return false; + if (!getInstance().equals(other.getInstance())) return false; + if (!getGkeMasterCluster().equals(other.getGkeMasterCluster())) return false; + if (!getCloudSqlInstance().equals(other.getCloudSqlInstance())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (networkType_ != other.networkType_) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + GKE_MASTER_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getGkeMasterCluster().hashCode(); + hash = (37 * hash) + CLOUD_SQL_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstance().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + NETWORK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + networkType_; + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.Endpoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.Endpoint 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.networkmanagement.v1beta1.Endpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.Endpoint 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.networkmanagement.v1beta1.Endpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.Endpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.Endpoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.Endpoint 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.networkmanagement.v1beta1.Endpoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.Endpoint 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.networkmanagement.v1beta1.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.Endpoint 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.networkmanagement.v1beta1.Endpoint 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; + } + /** + * + * + *
+   * Source or destination of the Connectivity Test.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.Endpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.Endpoint) + com.google.cloud.networkmanagement.v1beta1.EndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.Endpoint.class, + com.google.cloud.networkmanagement.v1beta1.Endpoint.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.Endpoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + ipAddress_ = ""; + + port_ = 0; + + instance_ = ""; + + gkeMasterCluster_ = ""; + + cloudSqlInstance_ = ""; + + network_ = ""; + + networkType_ = 0; + + projectId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_Endpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Endpoint getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.Endpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Endpoint build() { + com.google.cloud.networkmanagement.v1beta1.Endpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Endpoint buildPartial() { + com.google.cloud.networkmanagement.v1beta1.Endpoint result = + new com.google.cloud.networkmanagement.v1beta1.Endpoint(this); + result.ipAddress_ = ipAddress_; + result.port_ = port_; + result.instance_ = instance_; + result.gkeMasterCluster_ = gkeMasterCluster_; + result.cloudSqlInstance_ = cloudSqlInstance_; + result.network_ = network_; + result.networkType_ = networkType_; + result.projectId_ = projectId_; + 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.networkmanagement.v1beta1.Endpoint) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.Endpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.Endpoint other) { + if (other == com.google.cloud.networkmanagement.v1beta1.Endpoint.getDefaultInstance()) + return this; + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + onChanged(); + } + if (!other.getGkeMasterCluster().isEmpty()) { + gkeMasterCluster_ = other.gkeMasterCluster_; + onChanged(); + } + if (!other.getCloudSqlInstance().isEmpty()) { + cloudSqlInstance_ = other.cloudSqlInstance_; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (other.networkType_ != 0) { + setNetworkTypeValue(other.getNetworkTypeValue()); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.Endpoint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.Endpoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer
+     * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @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 the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer
+     * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @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 the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer
+     * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer
+     * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * The IP address of the endpoint, which can be an external or internal IP.
+     * An IPv6 address is only allowed when the test's destination is a
+     * [global load balancer
+     * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
+     * 
+ * + * string ip_address = 1; + * + * @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; + onChanged(); + return this; + } + + private int port_; + /** + * + * + *
+     * The IP protocol port of the endpoint.
+     * Only applicable when protocol is TCP or UDP.
+     * 
+ * + * int32 port = 2; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * + * + *
+     * The IP protocol port of the endpoint.
+     * Only applicable when protocol is TCP or UDP.
+     * 
+ * + * int32 port = 2; + * + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP protocol port of the endpoint.
+     * Only applicable when protocol is TCP or UDP.
+     * 
+ * + * int32 port = 2; + * + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = 0; + onChanged(); + return this; + } + + private java.lang.Object instance_ = ""; + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = getDefaultInstance().getInstance(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine instance URI.
+     * 
+ * + * string instance = 3; + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instance_ = value; + onChanged(); + return this; + } + + private java.lang.Object gkeMasterCluster_ = ""; + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @return The gkeMasterCluster. + */ + public java.lang.String getGkeMasterCluster() { + java.lang.Object ref = gkeMasterCluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gkeMasterCluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @return The bytes for gkeMasterCluster. + */ + public com.google.protobuf.ByteString getGkeMasterClusterBytes() { + java.lang.Object ref = gkeMasterCluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeMasterCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @param value The gkeMasterCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeMasterCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gkeMasterCluster_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @return This builder for chaining. + */ + public Builder clearGkeMasterCluster() { + + gkeMasterCluster_ = getDefaultInstance().getGkeMasterCluster(); + onChanged(); + return this; + } + /** + * + * + *
+     * A cluster URI for [Google Kubernetes Engine
+     * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+     * 
+ * + * string gke_master_cluster = 7; + * + * @param value The bytes for gkeMasterCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeMasterClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gkeMasterCluster_ = value; + onChanged(); + return this; + } + + private java.lang.Object cloudSqlInstance_ = ""; + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @return The cloudSqlInstance. + */ + public java.lang.String getCloudSqlInstance() { + java.lang.Object ref = cloudSqlInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @return The bytes for cloudSqlInstance. + */ + public com.google.protobuf.ByteString getCloudSqlInstanceBytes() { + java.lang.Object ref = cloudSqlInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @param value The cloudSqlInstance to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudSqlInstance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @return This builder for chaining. + */ + public Builder clearCloudSqlInstance() { + + cloudSqlInstance_ = getDefaultInstance().getCloudSqlInstance(); + onChanged(); + return this; + } + /** + * + * + *
+     * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+     * 
+ * + * string cloud_sql_instance = 8; + * + * @param value The bytes for cloudSqlInstance to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudSqlInstance_ = value; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @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; + } + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @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; + } + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Compute Engine network URI.
+     * 
+ * + * string network = 4; + * + * @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; + onChanged(); + return this; + } + + private int networkType_ = 0; + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType network_type = 5; + * + * @return The enum numeric value on the wire for networkType. + */ + @java.lang.Override + public int getNetworkTypeValue() { + return networkType_; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType network_type = 5; + * + * @param value The enum numeric value on the wire for networkType to set. + * @return This builder for chaining. + */ + public Builder setNetworkTypeValue(int value) { + + networkType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType network_type = 5; + * + * @return The networkType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType getNetworkType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType result = + com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType.valueOf(networkType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType network_type = 5; + * + * @param value The networkType to set. + * @return This builder for chaining. + */ + public Builder setNetworkType( + com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType value) { + if (value == null) { + throw new NullPointerException(); + } + + networkType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the network where the endpoint is located.
+     * Applicable only to source endpoint, as destination network type can be
+     * inferred from the source.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType network_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearNetworkType() { + + networkType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID where the endpoint is located.
+     * The Project ID can be derived from the URI if you provide a VM instance or
+     * network URI.
+     * The following are two cases where you must provide the project ID:
+     * 1. Only the IP address is specified, and the IP address is within a GCP
+     * project.
+     * 2. When you are using Shared VPC and the IP address that you provide is
+     * from the service project. In this case, the network that the IP address
+     * resides in is defined in the host project.
+     * 
+ * + * string project_id = 6; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + 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.networkmanagement.v1beta1.Endpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.Endpoint) + private static final com.google.cloud.networkmanagement.v1beta1.Endpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.Endpoint(); + } + + public static com.google.cloud.networkmanagement.v1beta1.Endpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Endpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Endpoint(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.Endpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointInfo.java new file mode 100644 index 00000000..a89a4f82 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointInfo.java @@ -0,0 +1,1537 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. The specification of the endpoints for the test.
+ * EndpointInfo is derived from source and destination Endpoint and validated
+ * by the backend data plane model.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.EndpointInfo} + */ +public final class EndpointInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.EndpointInfo) + EndpointInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use EndpointInfo.newBuilder() to construct. + private EndpointInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndpointInfo() { + sourceIp_ = ""; + destinationIp_ = ""; + protocol_ = ""; + sourceNetworkUri_ = ""; + destinationNetworkUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EndpointInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EndpointInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceIp_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + destinationIp_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + protocol_ = s; + break; + } + case 32: + { + sourcePort_ = input.readInt32(); + break; + } + case 40: + { + destinationPort_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceNetworkUri_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + destinationNetworkUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.class, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder.class); + } + + public static final int SOURCE_IP_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceIp_; + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + @java.lang.Override + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + 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(); + sourceIp_ = s; + return s; + } + } + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_IP_FIELD_NUMBER = 2; + private volatile java.lang.Object destinationIp_; + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The destinationIp. + */ + @java.lang.Override + public java.lang.String getDestinationIp() { + java.lang.Object ref = destinationIp_; + 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(); + destinationIp_ = s; + return s; + } + } + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The bytes for destinationIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationIpBytes() { + java.lang.Object ref = destinationIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOL_FIELD_NUMBER = 3; + private volatile java.lang.Object protocol_; + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + 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(); + protocol_ = s; + return s; + } + } + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PORT_FIELD_NUMBER = 4; + private int sourcePort_; + /** + * + * + *
+   * Source port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + @java.lang.Override + public int getSourcePort() { + return sourcePort_; + } + + public static final int DESTINATION_PORT_FIELD_NUMBER = 5; + private int destinationPort_; + /** + * + * + *
+   * Destination port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 destination_port = 5; + * + * @return The destinationPort. + */ + @java.lang.Override + public int getDestinationPort() { + return destinationPort_; + } + + public static final int SOURCE_NETWORK_URI_FIELD_NUMBER = 6; + private volatile java.lang.Object sourceNetworkUri_; + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The sourceNetworkUri. + */ + @java.lang.Override + public java.lang.String getSourceNetworkUri() { + java.lang.Object ref = sourceNetworkUri_; + 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(); + sourceNetworkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The bytes for sourceNetworkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceNetworkUriBytes() { + java.lang.Object ref = sourceNetworkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_NETWORK_URI_FIELD_NUMBER = 7; + private volatile java.lang.Object destinationNetworkUri_; + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The destinationNetworkUri. + */ + @java.lang.Override + public java.lang.String getDestinationNetworkUri() { + java.lang.Object ref = destinationNetworkUri_; + 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(); + destinationNetworkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The bytes for destinationNetworkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationNetworkUriBytes() { + java.lang.Object ref = destinationNetworkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationNetworkUri_ = 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 (!getSourceIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceIp_); + } + if (!getDestinationIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destinationIp_); + } + if (!getProtocolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, protocol_); + } + if (sourcePort_ != 0) { + output.writeInt32(4, sourcePort_); + } + if (destinationPort_ != 0) { + output.writeInt32(5, destinationPort_); + } + if (!getSourceNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourceNetworkUri_); + } + if (!getDestinationNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, destinationNetworkUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceIp_); + } + if (!getDestinationIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destinationIp_); + } + if (!getProtocolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, protocol_); + } + if (sourcePort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, sourcePort_); + } + if (destinationPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, destinationPort_); + } + if (!getSourceNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sourceNetworkUri_); + } + if (!getDestinationNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, destinationNetworkUri_); + } + size += unknownFields.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.networkmanagement.v1beta1.EndpointInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.EndpointInfo other = + (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) obj; + + if (!getSourceIp().equals(other.getSourceIp())) return false; + if (!getDestinationIp().equals(other.getDestinationIp())) return false; + if (!getProtocol().equals(other.getProtocol())) return false; + if (getSourcePort() != other.getSourcePort()) return false; + if (getDestinationPort() != other.getDestinationPort()) return false; + if (!getSourceNetworkUri().equals(other.getSourceNetworkUri())) return false; + if (!getDestinationNetworkUri().equals(other.getDestinationNetworkUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + SOURCE_IP_FIELD_NUMBER; + hash = (53 * hash) + getSourceIp().hashCode(); + hash = (37 * hash) + DESTINATION_IP_FIELD_NUMBER; + hash = (53 * hash) + getDestinationIp().hashCode(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + hash = (37 * hash) + SOURCE_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSourcePort(); + hash = (37 * hash) + DESTINATION_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDestinationPort(); + hash = (37 * hash) + SOURCE_NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getSourceNetworkUri().hashCode(); + hash = (37 * hash) + DESTINATION_NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getDestinationNetworkUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.EndpointInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.EndpointInfo 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.networkmanagement.v1beta1.EndpointInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.EndpointInfo 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.networkmanagement.v1beta1.EndpointInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.EndpointInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.EndpointInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.EndpointInfo 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.networkmanagement.v1beta1.EndpointInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.EndpointInfo 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.networkmanagement.v1beta1.EndpointInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.EndpointInfo 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.networkmanagement.v1beta1.EndpointInfo 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; + } + /** + * + * + *
+   * For display only. The specification of the endpoints for the test.
+   * EndpointInfo is derived from source and destination Endpoint and validated
+   * by the backend data plane model.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.EndpointInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.EndpointInfo) + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.class, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.EndpointInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + sourceIp_ = ""; + + destinationIp_ = ""; + + protocol_ = ""; + + sourcePort_ = 0; + + destinationPort_ = 0; + + sourceNetworkUri_ = ""; + + destinationNetworkUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo build() { + com.google.cloud.networkmanagement.v1beta1.EndpointInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.EndpointInfo result = + new com.google.cloud.networkmanagement.v1beta1.EndpointInfo(this); + result.sourceIp_ = sourceIp_; + result.destinationIp_ = destinationIp_; + result.protocol_ = protocol_; + result.sourcePort_ = sourcePort_; + result.destinationPort_ = destinationPort_; + result.sourceNetworkUri_ = sourceNetworkUri_; + result.destinationNetworkUri_ = destinationNetworkUri_; + 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.networkmanagement.v1beta1.EndpointInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.EndpointInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.EndpointInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance()) + return this; + if (!other.getSourceIp().isEmpty()) { + sourceIp_ = other.sourceIp_; + onChanged(); + } + if (!other.getDestinationIp().isEmpty()) { + destinationIp_ = other.destinationIp_; + onChanged(); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + onChanged(); + } + if (other.getSourcePort() != 0) { + setSourcePort(other.getSourcePort()); + } + if (other.getDestinationPort() != 0) { + setDestinationPort(other.getDestinationPort()); + } + if (!other.getSourceNetworkUri().isEmpty()) { + sourceNetworkUri_ = other.sourceNetworkUri_; + onChanged(); + } + if (!other.getDestinationNetworkUri().isEmpty()) { + destinationNetworkUri_ = other.destinationNetworkUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.EndpointInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sourceIp_ = ""; + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + public java.lang.String getSourceIp() { + java.lang.Object ref = sourceIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + public com.google.protobuf.ByteString getSourceIpBytes() { + java.lang.Object ref = sourceIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @param value The sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceIp() { + + sourceIp_ = getDefaultInstance().getSourceIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Source IP address.
+     * 
+ * + * string source_ip = 1; + * + * @param value The bytes for sourceIp to set. + * @return This builder for chaining. + */ + public Builder setSourceIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object destinationIp_ = ""; + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @return The destinationIp. + */ + public java.lang.String getDestinationIp() { + java.lang.Object ref = destinationIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @return The bytes for destinationIp. + */ + public com.google.protobuf.ByteString getDestinationIpBytes() { + java.lang.Object ref = destinationIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @param value The destinationIp to set. + * @return This builder for chaining. + */ + public Builder setDestinationIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destinationIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @return This builder for chaining. + */ + public Builder clearDestinationIp() { + + destinationIp_ = getDefaultInstance().getDestinationIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP address.
+     * 
+ * + * string destination_ip = 2; + * + * @param value The bytes for destinationIp to set. + * @return This builder for chaining. + */ + public Builder setDestinationIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destinationIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object protocol_ = ""; + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + protocol_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + + protocol_ = getDefaultInstance().getProtocol(); + onChanged(); + return this; + } + /** + * + * + *
+     * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+     * 
+ * + * string protocol = 3; + * + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + protocol_ = value; + onChanged(); + return this; + } + + private int sourcePort_; + /** + * + * + *
+     * Source port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + @java.lang.Override + public int getSourcePort() { + return sourcePort_; + } + /** + * + * + *
+     * Source port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 source_port = 4; + * + * @param value The sourcePort to set. + * @return This builder for chaining. + */ + public Builder setSourcePort(int value) { + + sourcePort_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Source port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 source_port = 4; + * + * @return This builder for chaining. + */ + public Builder clearSourcePort() { + + sourcePort_ = 0; + onChanged(); + return this; + } + + private int destinationPort_; + /** + * + * + *
+     * Destination port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 destination_port = 5; + * + * @return The destinationPort. + */ + @java.lang.Override + public int getDestinationPort() { + return destinationPort_; + } + /** + * + * + *
+     * Destination port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 destination_port = 5; + * + * @param value The destinationPort to set. + * @return This builder for chaining. + */ + public Builder setDestinationPort(int value) { + + destinationPort_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination port. Only valid when protocol is TCP or UDP.
+     * 
+ * + * int32 destination_port = 5; + * + * @return This builder for chaining. + */ + public Builder clearDestinationPort() { + + destinationPort_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sourceNetworkUri_ = ""; + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @return The sourceNetworkUri. + */ + public java.lang.String getSourceNetworkUri() { + java.lang.Object ref = sourceNetworkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceNetworkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @return The bytes for sourceNetworkUri. + */ + public com.google.protobuf.ByteString getSourceNetworkUriBytes() { + java.lang.Object ref = sourceNetworkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @param value The sourceNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setSourceNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceNetworkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearSourceNetworkUri() { + + sourceNetworkUri_ = getDefaultInstance().getSourceNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet originates from.
+     * 
+ * + * string source_network_uri = 6; + * + * @param value The bytes for sourceNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setSourceNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceNetworkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object destinationNetworkUri_ = ""; + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @return The destinationNetworkUri. + */ + public java.lang.String getDestinationNetworkUri() { + java.lang.Object ref = destinationNetworkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationNetworkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @return The bytes for destinationNetworkUri. + */ + public com.google.protobuf.ByteString getDestinationNetworkUriBytes() { + java.lang.Object ref = destinationNetworkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @param value The destinationNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destinationNetworkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearDestinationNetworkUri() { + + destinationNetworkUri_ = getDefaultInstance().getDestinationNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the network where this packet is sent to.
+     * 
+ * + * string destination_network_uri = 7; + * + * @param value The bytes for destinationNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destinationNetworkUri_ = value; + 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.networkmanagement.v1beta1.EndpointInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.EndpointInfo) + private static final com.google.cloud.networkmanagement.v1beta1.EndpointInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.EndpointInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.EndpointInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndpointInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EndpointInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.EndpointInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointInfoOrBuilder.java new file mode 100644 index 00000000..eb20288e --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointInfoOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface EndpointInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.EndpointInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The sourceIp. + */ + java.lang.String getSourceIp(); + /** + * + * + *
+   * Source IP address.
+   * 
+ * + * string source_ip = 1; + * + * @return The bytes for sourceIp. + */ + com.google.protobuf.ByteString getSourceIpBytes(); + + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The destinationIp. + */ + java.lang.String getDestinationIp(); + /** + * + * + *
+   * Destination IP address.
+   * 
+ * + * string destination_ip = 2; + * + * @return The bytes for destinationIp. + */ + com.google.protobuf.ByteString getDestinationIpBytes(); + + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * + * + *
+   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
+   * 
+ * + * string protocol = 3; + * + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString getProtocolBytes(); + + /** + * + * + *
+   * Source port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 source_port = 4; + * + * @return The sourcePort. + */ + int getSourcePort(); + + /** + * + * + *
+   * Destination port. Only valid when protocol is TCP or UDP.
+   * 
+ * + * int32 destination_port = 5; + * + * @return The destinationPort. + */ + int getDestinationPort(); + + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The sourceNetworkUri. + */ + java.lang.String getSourceNetworkUri(); + /** + * + * + *
+   * URI of the network where this packet originates from.
+   * 
+ * + * string source_network_uri = 6; + * + * @return The bytes for sourceNetworkUri. + */ + com.google.protobuf.ByteString getSourceNetworkUriBytes(); + + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The destinationNetworkUri. + */ + java.lang.String getDestinationNetworkUri(); + /** + * + * + *
+   * URI of the network where this packet is sent to.
+   * 
+ * + * string destination_network_uri = 7; + * + * @return The bytes for destinationNetworkUri. + */ + com.google.protobuf.ByteString getDestinationNetworkUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointOrBuilder.java new file mode 100644 index 00000000..f52e9e40 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointOrBuilder.java @@ -0,0 +1,242 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface EndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.Endpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer
+   * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+   * The IP address of the endpoint, which can be an external or internal IP.
+   * An IPv6 address is only allowed when the test's destination is a
+   * [global load balancer
+   * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
+   * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+   * The IP protocol port of the endpoint.
+   * Only applicable when protocol is TCP or UDP.
+   * 
+ * + * int32 port = 2; + * + * @return The port. + */ + int getPort(); + + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The instance. + */ + java.lang.String getInstance(); + /** + * + * + *
+   * A Compute Engine instance URI.
+   * 
+ * + * string instance = 3; + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The gkeMasterCluster. + */ + java.lang.String getGkeMasterCluster(); + /** + * + * + *
+   * A cluster URI for [Google Kubernetes Engine
+   * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
+   * 
+ * + * string gke_master_cluster = 7; + * + * @return The bytes for gkeMasterCluster. + */ + com.google.protobuf.ByteString getGkeMasterClusterBytes(); + + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The cloudSqlInstance. + */ + java.lang.String getCloudSqlInstance(); + /** + * + * + *
+   * A [Cloud SQL](https://cloud.google.com/sql) instance URI.
+   * 
+ * + * string cloud_sql_instance = 8; + * + * @return The bytes for cloudSqlInstance. + */ + com.google.protobuf.ByteString getCloudSqlInstanceBytes(); + + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * A Compute Engine network URI.
+   * 
+ * + * string network = 4; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType network_type = 5; + * + * @return The enum numeric value on the wire for networkType. + */ + int getNetworkTypeValue(); + /** + * + * + *
+   * Type of the network where the endpoint is located.
+   * Applicable only to source endpoint, as destination network type can be
+   * inferred from the source.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType network_type = 5; + * + * @return The networkType. + */ + com.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType getNetworkType(); + + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a GCP
+   * project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Project ID where the endpoint is located.
+   * The Project ID can be derived from the URI if you provide a VM instance or
+   * network URI.
+   * The following are two cases where you must provide the project ID:
+   * 1. Only the IP address is specified, and the IP address is within a GCP
+   * project.
+   * 2. When you are using Shared VPC and the IP address that you provide is
+   * from the service project. In this case, the network that the IP address
+   * resides in is defined in the host project.
+   * 
+ * + * string project_id = 6; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfo.java new file mode 100644 index 00000000..ea14aad5 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfo.java @@ -0,0 +1,2597 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a VPC firewall rule, an implied
+ * VPC firewall rule, or a hierarchical firewall policy rule.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.FirewallInfo} + */ +public final class FirewallInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.FirewallInfo) + FirewallInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirewallInfo.newBuilder() to construct. + private FirewallInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FirewallInfo() { + displayName_ = ""; + uri_ = ""; + direction_ = ""; + action_ = ""; + networkUri_ = ""; + targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + policy_ = ""; + firewallRuleType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FirewallInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FirewallInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + direction_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + action_ = s; + break; + } + case 40: + { + priority_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + targetTags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + targetTags_.add(s); + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + targetServiceAccounts_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + targetServiceAccounts_.add(s); + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + policy_ = s; + break; + } + case 80: + { + int rawValue = input.readEnum(); + + firewallRuleType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + targetTags_ = targetTags_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + targetServiceAccounts_ = targetServiceAccounts_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.class, + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.Builder.class); + } + + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType} + */ + public enum FirewallRuleType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type.
+     * 
+ * + * FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + */ + FIREWALL_RULE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Hierarchical firewall policy rule. For details, see
+     * [Hierarchical firewall policies
+     * overview](https://cloud.google.com/vpc/docs/firewall-policies).
+     * 
+ * + * HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + */ + HIERARCHICAL_FIREWALL_POLICY_RULE(1), + /** + * + * + *
+     * VPC firewall rule. For details, see
+     * [VPC firewall rules
+     * overview](https://cloud.google.com/vpc/docs/firewalls).
+     * 
+ * + * VPC_FIREWALL_RULE = 2; + */ + VPC_FIREWALL_RULE(2), + /** + * + * + *
+     * Implied VPC firewall rule. For details, see
+     * [Implied
+     * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).
+     * 
+ * + * IMPLIED_VPC_FIREWALL_RULE = 3; + */ + IMPLIED_VPC_FIREWALL_RULE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type.
+     * 
+ * + * FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + */ + public static final int FIREWALL_RULE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Hierarchical firewall policy rule. For details, see
+     * [Hierarchical firewall policies
+     * overview](https://cloud.google.com/vpc/docs/firewall-policies).
+     * 
+ * + * HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + */ + public static final int HIERARCHICAL_FIREWALL_POLICY_RULE_VALUE = 1; + /** + * + * + *
+     * VPC firewall rule. For details, see
+     * [VPC firewall rules
+     * overview](https://cloud.google.com/vpc/docs/firewalls).
+     * 
+ * + * VPC_FIREWALL_RULE = 2; + */ + public static final int VPC_FIREWALL_RULE_VALUE = 2; + /** + * + * + *
+     * Implied VPC firewall rule. For details, see
+     * [Implied
+     * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).
+     * 
+ * + * IMPLIED_VPC_FIREWALL_RULE = 3; + */ + public static final int IMPLIED_VPC_FIREWALL_RULE_VALUE = 3; + + 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 FirewallRuleType 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 FirewallRuleType forNumber(int value) { + switch (value) { + case 0: + return FIREWALL_RULE_TYPE_UNSPECIFIED; + case 1: + return HIERARCHICAL_FIREWALL_POLICY_RULE; + case 2: + return VPC_FIREWALL_RULE; + case 3: + return IMPLIED_VPC_FIREWALL_RULE; + 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 FirewallRuleType findValueByNumber(int number) { + return FirewallRuleType.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.networkmanagement.v1beta1.FirewallInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FirewallRuleType[] VALUES = values(); + + public static FirewallRuleType 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 FirewallRuleType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType) + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIRECTION_FIELD_NUMBER = 3; + private volatile java.lang.Object direction_; + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The direction. + */ + @java.lang.Override + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + 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(); + direction_ = s; + return s; + } + } + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The bytes for direction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 4; + private volatile java.lang.Object action_; + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + 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(); + action_ = s; + return s; + } + } + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 5; + private int priority_; + /** + * + * + *
+   * The priority of the firewall rule.
+   * 
+ * + * int32 priority = 5; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int NETWORK_URI_FIELD_NUMBER = 6; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_TAGS_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList targetTags_; + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return A list containing the targetTags. + */ + public com.google.protobuf.ProtocolStringList getTargetTagsList() { + return targetTags_; + } + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return The count of targetTags. + */ + public int getTargetTagsCount() { + return targetTags_.size(); + } + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the element to return. + * @return The targetTags at the given index. + */ + public java.lang.String getTargetTags(int index) { + return targetTags_.get(index); + } + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the targetTags at the given index. + */ + public com.google.protobuf.ByteString getTargetTagsBytes(int index) { + return targetTags_.getByteString(index); + } + + public static final int TARGET_SERVICE_ACCOUNTS_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList targetServiceAccounts_; + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return A list containing the targetServiceAccounts. + */ + public com.google.protobuf.ProtocolStringList getTargetServiceAccountsList() { + return targetServiceAccounts_; + } + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return The count of targetServiceAccounts. + */ + public int getTargetServiceAccountsCount() { + return targetServiceAccounts_.size(); + } + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the element to return. + * @return The targetServiceAccounts at the given index. + */ + public java.lang.String getTargetServiceAccounts(int index) { + return targetServiceAccounts_.get(index); + } + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the value to return. + * @return The bytes of the targetServiceAccounts at the given index. + */ + public com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index) { + return targetServiceAccounts_.getByteString(index); + } + + public static final int POLICY_FIELD_NUMBER = 9; + private volatile java.lang.Object policy_; + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The policy. + */ + @java.lang.Override + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + 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(); + policy_ = s; + return s; + } + } + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The bytes for policy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIREWALL_RULE_TYPE_FIELD_NUMBER = 10; + private int firewallRuleType_; + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The enum numeric value on the wire for firewallRuleType. + */ + @java.lang.Override + public int getFirewallRuleTypeValue() { + return firewallRuleType_; + } + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The firewallRuleType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType + getFirewallRuleType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType result = + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType.valueOf( + firewallRuleType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType.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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getDirectionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, direction_); + } + if (!getActionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, action_); + } + if (priority_ != 0) { + output.writeInt32(5, priority_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, networkUri_); + } + for (int i = 0; i < targetTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, targetTags_.getRaw(i)); + } + for (int i = 0; i < targetServiceAccounts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 8, targetServiceAccounts_.getRaw(i)); + } + if (!getPolicyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, policy_); + } + if (firewallRuleType_ + != com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType + .FIREWALL_RULE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, firewallRuleType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getDirectionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, direction_); + } + if (!getActionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, action_); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, priority_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, networkUri_); + } + { + int dataSize = 0; + for (int i = 0; i < targetTags_.size(); i++) { + dataSize += computeStringSizeNoTag(targetTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetTagsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < targetServiceAccounts_.size(); i++) { + dataSize += computeStringSizeNoTag(targetServiceAccounts_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetServiceAccountsList().size(); + } + if (!getPolicyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, policy_); + } + if (firewallRuleType_ + != com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType + .FIREWALL_RULE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, firewallRuleType_); + } + size += unknownFields.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.networkmanagement.v1beta1.FirewallInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.FirewallInfo other = + (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getDirection().equals(other.getDirection())) return false; + if (!getAction().equals(other.getAction())) return false; + if (getPriority() != other.getPriority()) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getTargetTagsList().equals(other.getTargetTagsList())) return false; + if (!getTargetServiceAccountsList().equals(other.getTargetServiceAccountsList())) return false; + if (!getPolicy().equals(other.getPolicy())) return false; + if (firewallRuleType_ != other.firewallRuleType_) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + DIRECTION_FIELD_NUMBER; + hash = (53 * hash) + getDirection().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + if (getTargetTagsCount() > 0) { + hash = (37 * hash) + TARGET_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTargetTagsList().hashCode(); + } + if (getTargetServiceAccountsCount() > 0) { + hash = (37 * hash) + TARGET_SERVICE_ACCOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getTargetServiceAccountsList().hashCode(); + } + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + hash = (37 * hash) + FIREWALL_RULE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + firewallRuleType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.FirewallInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.FirewallInfo 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.networkmanagement.v1beta1.FirewallInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.FirewallInfo 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.networkmanagement.v1beta1.FirewallInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.FirewallInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.FirewallInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.FirewallInfo 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.networkmanagement.v1beta1.FirewallInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.FirewallInfo 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.networkmanagement.v1beta1.FirewallInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.FirewallInfo 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.networkmanagement.v1beta1.FirewallInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a VPC firewall rule, an implied
+   * VPC firewall rule, or a hierarchical firewall policy rule.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.FirewallInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.FirewallInfo) + com.google.cloud.networkmanagement.v1beta1.FirewallInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.class, + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.FirewallInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + direction_ = ""; + + action_ = ""; + + priority_ = 0; + + networkUri_ = ""; + + targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + policy_ = ""; + + firewallRuleType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.FirewallInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.FirewallInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.FirewallInfo build() { + com.google.cloud.networkmanagement.v1beta1.FirewallInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.FirewallInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.FirewallInfo result = + new com.google.cloud.networkmanagement.v1beta1.FirewallInfo(this); + int from_bitField0_ = bitField0_; + result.displayName_ = displayName_; + result.uri_ = uri_; + result.direction_ = direction_; + result.action_ = action_; + result.priority_ = priority_; + result.networkUri_ = networkUri_; + if (((bitField0_ & 0x00000001) != 0)) { + targetTags_ = targetTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.targetTags_ = targetTags_; + if (((bitField0_ & 0x00000002) != 0)) { + targetServiceAccounts_ = targetServiceAccounts_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.targetServiceAccounts_ = targetServiceAccounts_; + result.policy_ = policy_; + result.firewallRuleType_ = firewallRuleType_; + 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.networkmanagement.v1beta1.FirewallInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.FirewallInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.FirewallInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.FirewallInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getDirection().isEmpty()) { + direction_ = other.direction_; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + onChanged(); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.targetTags_.isEmpty()) { + if (targetTags_.isEmpty()) { + targetTags_ = other.targetTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTargetTagsIsMutable(); + targetTags_.addAll(other.targetTags_); + } + onChanged(); + } + if (!other.targetServiceAccounts_.isEmpty()) { + if (targetServiceAccounts_.isEmpty()) { + targetServiceAccounts_ = other.targetServiceAccounts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.addAll(other.targetServiceAccounts_); + } + onChanged(); + } + if (!other.getPolicy().isEmpty()) { + policy_ = other.policy_; + onChanged(); + } + if (other.firewallRuleType_ != 0) { + setFirewallRuleTypeValue(other.getFirewallRuleTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.FirewallInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the VPC firewall rule. This field is not applicable
+     * to hierarchical firewall policy rules.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC firewall rule. This field is not applicable to
+     * implied firewall rules or hierarchical firewall policy rules.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object direction_ = ""; + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @return The direction. + */ + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + direction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @return The bytes for direction. + */ + public com.google.protobuf.ByteString getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @param value The direction to set. + * @return This builder for chaining. + */ + public Builder setDirection(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + direction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @return This builder for chaining. + */ + public Builder clearDirection() { + + direction_ = getDefaultInstance().getDirection(); + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: INGRESS, EGRESS
+     * 
+ * + * string direction = 3; + * + * @param value The bytes for direction to set. + * @return This builder for chaining. + */ + public Builder setDirectionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + direction_ = value; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = getDefaultInstance().getAction(); + onChanged(); + return this; + } + /** + * + * + *
+     * Possible values: ALLOW, DENY
+     * 
+ * + * string action = 4; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + action_ = value; + onChanged(); + return this; + } + + private int priority_; + /** + * + * + *
+     * The priority of the firewall rule.
+     * 
+ * + * int32 priority = 5; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + /** + * + * + *
+     * The priority of the firewall rule.
+     * 
+ * + * int32 priority = 5; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The priority of the firewall rule.
+     * 
+ * + * int32 priority = 5; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + + priority_ = 0; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC network that the firewall rule is associated with.
+     * This field is not applicable to hierarchical firewall policy rules.
+     * 
+ * + * string network_uri = 6; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList targetTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTargetTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + targetTags_ = new com.google.protobuf.LazyStringArrayList(targetTags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @return A list containing the targetTags. + */ + public com.google.protobuf.ProtocolStringList getTargetTagsList() { + return targetTags_.getUnmodifiableView(); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @return The count of targetTags. + */ + public int getTargetTagsCount() { + return targetTags_.size(); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the element to return. + * @return The targetTags at the given index. + */ + public java.lang.String getTargetTags(int index) { + return targetTags_.get(index); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the targetTags at the given index. + */ + public com.google.protobuf.ByteString getTargetTagsBytes(int index) { + return targetTags_.getByteString(index); + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param index The index to set the value at. + * @param value The targetTags to set. + * @return This builder for chaining. + */ + public Builder setTargetTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetTagsIsMutable(); + targetTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param value The targetTags to add. + * @return This builder for chaining. + */ + public Builder addTargetTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetTagsIsMutable(); + targetTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param values The targetTags to add. + * @return This builder for chaining. + */ + public Builder addAllTargetTags(java.lang.Iterable values) { + ensureTargetTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetTags_); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @return This builder for chaining. + */ + public Builder clearTargetTags() { + targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The target tags defined by the VPC firewall rule. This field is not
+     * applicable to hierarchical firewall policy rules.
+     * 
+ * + * repeated string target_tags = 7; + * + * @param value The bytes of the targetTags to add. + * @return This builder for chaining. + */ + public Builder addTargetTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetTagsIsMutable(); + targetTags_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList targetServiceAccounts_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTargetServiceAccountsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + targetServiceAccounts_ = + new com.google.protobuf.LazyStringArrayList(targetServiceAccounts_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @return A list containing the targetServiceAccounts. + */ + public com.google.protobuf.ProtocolStringList getTargetServiceAccountsList() { + return targetServiceAccounts_.getUnmodifiableView(); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @return The count of targetServiceAccounts. + */ + public int getTargetServiceAccountsCount() { + return targetServiceAccounts_.size(); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the element to return. + * @return The targetServiceAccounts at the given index. + */ + public java.lang.String getTargetServiceAccounts(int index) { + return targetServiceAccounts_.get(index); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the value to return. + * @return The bytes of the targetServiceAccounts at the given index. + */ + public com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index) { + return targetServiceAccounts_.getByteString(index); + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index to set the value at. + * @param value The targetServiceAccounts to set. + * @return This builder for chaining. + */ + public Builder setTargetServiceAccounts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param value The targetServiceAccounts to add. + * @return This builder for chaining. + */ + public Builder addTargetServiceAccounts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param values The targetServiceAccounts to add. + * @return This builder for chaining. + */ + public Builder addAllTargetServiceAccounts(java.lang.Iterable values) { + ensureTargetServiceAccountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetServiceAccounts_); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @return This builder for chaining. + */ + public Builder clearTargetServiceAccounts() { + targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The target service accounts specified by the firewall rule.
+     * 
+ * + * repeated string target_service_accounts = 8; + * + * @param value The bytes of the targetServiceAccounts to add. + * @return This builder for chaining. + */ + public Builder addTargetServiceAccountsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.add(value); + onChanged(); + return this; + } + + private java.lang.Object policy_ = ""; + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @return The policy. + */ + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @return The bytes for policy. + */ + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @param value The policy to set. + * @return This builder for chaining. + */ + public Builder setPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + policy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @return This builder for chaining. + */ + public Builder clearPolicy() { + + policy_ = getDefaultInstance().getPolicy(); + onChanged(); + return this; + } + /** + * + * + *
+     * The hierarchical firewall policy that this rule is associated with.
+     * This field is not applicable to VPC firewall rules.
+     * 
+ * + * string policy = 9; + * + * @param value The bytes for policy to set. + * @return This builder for chaining. + */ + public Builder setPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + policy_ = value; + onChanged(); + return this; + } + + private int firewallRuleType_ = 0; + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The enum numeric value on the wire for firewallRuleType. + */ + @java.lang.Override + public int getFirewallRuleTypeValue() { + return firewallRuleType_; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @param value The enum numeric value on the wire for firewallRuleType to set. + * @return This builder for chaining. + */ + public Builder setFirewallRuleTypeValue(int value) { + + firewallRuleType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The firewallRuleType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType + getFirewallRuleType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType result = + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType.valueOf( + firewallRuleType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @param value The firewallRuleType to set. + * @return This builder for chaining. + */ + public Builder setFirewallRuleType( + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType value) { + if (value == null) { + throw new NullPointerException(); + } + + firewallRuleType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The firewall rule's type.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return This builder for chaining. + */ + public Builder clearFirewallRuleType() { + + firewallRuleType_ = 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.networkmanagement.v1beta1.FirewallInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.FirewallInfo) + private static final com.google.cloud.networkmanagement.v1beta1.FirewallInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.FirewallInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.FirewallInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FirewallInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FirewallInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.FirewallInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfoOrBuilder.java new file mode 100644 index 00000000..934c5915 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfoOrBuilder.java @@ -0,0 +1,331 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface FirewallInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.FirewallInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name of the VPC firewall rule. This field is not applicable
+   * to hierarchical firewall policy rules.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The URI of the VPC firewall rule. This field is not applicable to
+   * implied firewall rules or hierarchical firewall policy rules.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The direction. + */ + java.lang.String getDirection(); + /** + * + * + *
+   * Possible values: INGRESS, EGRESS
+   * 
+ * + * string direction = 3; + * + * @return The bytes for direction. + */ + com.google.protobuf.ByteString getDirectionBytes(); + + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The action. + */ + java.lang.String getAction(); + /** + * + * + *
+   * Possible values: ALLOW, DENY
+   * 
+ * + * string action = 4; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); + + /** + * + * + *
+   * The priority of the firewall rule.
+   * 
+ * + * int32 priority = 5; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * The URI of the VPC network that the firewall rule is associated with.
+   * This field is not applicable to hierarchical firewall policy rules.
+   * 
+ * + * string network_uri = 6; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return A list containing the targetTags. + */ + java.util.List getTargetTagsList(); + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @return The count of targetTags. + */ + int getTargetTagsCount(); + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the element to return. + * @return The targetTags at the given index. + */ + java.lang.String getTargetTags(int index); + /** + * + * + *
+   * The target tags defined by the VPC firewall rule. This field is not
+   * applicable to hierarchical firewall policy rules.
+   * 
+ * + * repeated string target_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the targetTags at the given index. + */ + com.google.protobuf.ByteString getTargetTagsBytes(int index); + + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return A list containing the targetServiceAccounts. + */ + java.util.List getTargetServiceAccountsList(); + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @return The count of targetServiceAccounts. + */ + int getTargetServiceAccountsCount(); + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the element to return. + * @return The targetServiceAccounts at the given index. + */ + java.lang.String getTargetServiceAccounts(int index); + /** + * + * + *
+   * The target service accounts specified by the firewall rule.
+   * 
+ * + * repeated string target_service_accounts = 8; + * + * @param index The index of the value to return. + * @return The bytes of the targetServiceAccounts at the given index. + */ + com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index); + + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The policy. + */ + java.lang.String getPolicy(); + /** + * + * + *
+   * The hierarchical firewall policy that this rule is associated with.
+   * This field is not applicable to VPC firewall rules.
+   * 
+ * + * string policy = 9; + * + * @return The bytes for policy. + */ + com.google.protobuf.ByteString getPolicyBytes(); + + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The enum numeric value on the wire for firewallRuleType. + */ + int getFirewallRuleTypeValue(); + /** + * + * + *
+   * The firewall rule's type.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * + * + * @return The firewallRuleType. + */ + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType getFirewallRuleType(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardInfo.java new file mode 100644 index 00000000..50a4f9eb --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardInfo.java @@ -0,0 +1,1042 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Details of the final state "forward" and associated resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ForwardInfo} + */ +public final class ForwardInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.ForwardInfo) + ForwardInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForwardInfo.newBuilder() to construct. + private ForwardInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ForwardInfo() { + target_ = 0; + resourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ForwardInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ForwardInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + target_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.class, + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder.class); + } + + /** + * + * + *
+   * Forward target types.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.ForwardInfo.Target} + */ + public enum Target implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + TARGET_UNSPECIFIED(0), + /** + * + * + *
+     * Forwarded to a VPC peering network.
+     * 
+ * + * PEERING_VPC = 1; + */ + PEERING_VPC(1), + /** + * + * + *
+     * Forwarded to a Cloud VPN gateway.
+     * 
+ * + * VPN_GATEWAY = 2; + */ + VPN_GATEWAY(2), + /** + * + * + *
+     * Forwarded to a Cloud Interconnect connection.
+     * 
+ * + * INTERCONNECT = 3; + */ + INTERCONNECT(3), + /** + * + * + *
+     * Forwarded to a Google Kubernetes Engine Container cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + GKE_MASTER(4), + /** + * + * + *
+     * Forwarded to the next hop of a custom route imported from a peering VPC.
+     * 
+ * + * IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + */ + IMPORTED_CUSTOM_ROUTE_NEXT_HOP(5), + /** + * + * + *
+     * Forwarded to a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 6; + */ + CLOUD_SQL_INSTANCE(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Target not specified.
+     * 
+ * + * TARGET_UNSPECIFIED = 0; + */ + public static final int TARGET_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Forwarded to a VPC peering network.
+     * 
+ * + * PEERING_VPC = 1; + */ + public static final int PEERING_VPC_VALUE = 1; + /** + * + * + *
+     * Forwarded to a Cloud VPN gateway.
+     * 
+ * + * VPN_GATEWAY = 2; + */ + public static final int VPN_GATEWAY_VALUE = 2; + /** + * + * + *
+     * Forwarded to a Cloud Interconnect connection.
+     * 
+ * + * INTERCONNECT = 3; + */ + public static final int INTERCONNECT_VALUE = 3; + /** + * + * + *
+     * Forwarded to a Google Kubernetes Engine Container cluster master.
+     * 
+ * + * GKE_MASTER = 4; + */ + public static final int GKE_MASTER_VALUE = 4; + /** + * + * + *
+     * Forwarded to the next hop of a custom route imported from a peering VPC.
+     * 
+ * + * IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + */ + public static final int IMPORTED_CUSTOM_ROUTE_NEXT_HOP_VALUE = 5; + /** + * + * + *
+     * Forwarded to a Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 6; + */ + public static final int CLOUD_SQL_INSTANCE_VALUE = 6; + + 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 Target 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 Target forNumber(int value) { + switch (value) { + case 0: + return TARGET_UNSPECIFIED; + case 1: + return PEERING_VPC; + case 2: + return VPN_GATEWAY; + case 3: + return INTERCONNECT; + case 4: + return GKE_MASTER; + case 5: + return IMPORTED_CUSTOM_ROUTE_NEXT_HOP; + case 6: + return CLOUD_SQL_INSTANCE; + 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 Target findValueByNumber(int number) { + return Target.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.networkmanagement.v1beta1.ForwardInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Target[] VALUES = values(); + + public static Target 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 Target(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.ForwardInfo.Target) + } + + public static final int TARGET_FIELD_NUMBER = 1; + private int target_; + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target getTarget() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target result = + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target.valueOf(target_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object resourceUri_; + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = 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 (target_ + != com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, target_); + } + if (!getResourceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (target_ + != com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target.TARGET_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, target_); + } + if (!getResourceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceUri_); + } + size += unknownFields.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.networkmanagement.v1beta1.ForwardInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.ForwardInfo other = + (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) obj; + + if (target_ != other.target_) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + target_; + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardInfo 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.networkmanagement.v1beta1.ForwardInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardInfo 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.networkmanagement.v1beta1.ForwardInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardInfo 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.networkmanagement.v1beta1.ForwardInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardInfo 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.networkmanagement.v1beta1.ForwardInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardInfo 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.networkmanagement.v1beta1.ForwardInfo 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; + } + /** + * + * + *
+   * Details of the final state "forward" and associated resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ForwardInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.ForwardInfo) + com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.class, + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.ForwardInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + target_ = 0; + + resourceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardInfo build() { + com.google.cloud.networkmanagement.v1beta1.ForwardInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.ForwardInfo result = + new com.google.cloud.networkmanagement.v1beta1.ForwardInfo(this); + result.target_ = target_; + result.resourceUri_ = resourceUri_; + 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.networkmanagement.v1beta1.ForwardInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.ForwardInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.ForwardInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance()) + return this; + if (other.target_ != 0) { + setTargetValue(other.getTargetValue()); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.ForwardInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int target_ = 0; + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + @java.lang.Override + public int getTargetValue() { + return target_; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo.Target target = 1; + * + * @param value The enum numeric value on the wire for target to set. + * @return This builder for chaining. + */ + public Builder setTargetValue(int value) { + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo.Target target = 1; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target getTarget() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target result = + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target.valueOf(target_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo.Target target = 1; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target type where this packet is forwarded to.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo.Target target = 1; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + + resourceUri_ = getDefaultInstance().getResourceUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the resource that the packet is forwarded to.
+     * 
+ * + * string resource_uri = 2; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUri_ = value; + 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.networkmanagement.v1beta1.ForwardInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.ForwardInfo) + private static final com.google.cloud.networkmanagement.v1beta1.ForwardInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.ForwardInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForwardInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ForwardInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.ForwardInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardInfoOrBuilder.java new file mode 100644 index 00000000..5675787e --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardInfoOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface ForwardInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.ForwardInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo.Target target = 1; + * + * @return The enum numeric value on the wire for target. + */ + int getTargetValue(); + /** + * + * + *
+   * Target type where this packet is forwarded to.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo.Target target = 1; + * + * @return The target. + */ + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target getTarget(); + + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + /** + * + * + *
+   * URI of the resource that the packet is forwarded to.
+   * 
+ * + * string resource_uri = 2; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardingRuleInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardingRuleInfo.java new file mode 100644 index 00000000..66f84330 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardingRuleInfo.java @@ -0,0 +1,1715 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine forwarding rule.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} + */ +public final class ForwardingRuleInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) + ForwardingRuleInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForwardingRuleInfo.newBuilder() to construct. + private ForwardingRuleInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ForwardingRuleInfo() { + displayName_ = ""; + uri_ = ""; + matchedProtocol_ = ""; + matchedPortRange_ = ""; + vip_ = ""; + target_ = ""; + networkUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ForwardingRuleInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ForwardingRuleInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + matchedProtocol_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + vip_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + matchedPortRange_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.class, + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHED_PROTOCOL_FIELD_NUMBER = 3; + private volatile java.lang.Object matchedProtocol_; + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The matchedProtocol. + */ + @java.lang.Override + public java.lang.String getMatchedProtocol() { + java.lang.Object ref = matchedProtocol_; + 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(); + matchedProtocol_ = s; + return s; + } + } + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The bytes for matchedProtocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchedProtocolBytes() { + java.lang.Object ref = matchedProtocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHED_PORT_RANGE_FIELD_NUMBER = 6; + private volatile java.lang.Object matchedPortRange_; + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The matchedPortRange. + */ + @java.lang.Override + public java.lang.String getMatchedPortRange() { + java.lang.Object ref = matchedPortRange_; + 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(); + matchedPortRange_ = s; + return s; + } + } + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The bytes for matchedPortRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchedPortRangeBytes() { + java.lang.Object ref = matchedPortRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedPortRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIP_FIELD_NUMBER = 4; + private volatile java.lang.Object vip_; + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The vip. + */ + @java.lang.Override + public java.lang.String getVip() { + java.lang.Object ref = vip_; + 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(); + vip_ = s; + return s; + } + } + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The bytes for vip. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVipBytes() { + java.lang.Object ref = vip_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_FIELD_NUMBER = 5; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @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; + } + } + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @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 NETWORK_URI_FIELD_NUMBER = 7; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getMatchedProtocolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, matchedProtocol_); + } + if (!getVipBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, vip_); + } + if (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, target_); + } + if (!getMatchedPortRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, matchedPortRange_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getMatchedProtocolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, matchedProtocol_); + } + if (!getVipBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, vip_); + } + if (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, target_); + } + if (!getMatchedPortRangeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, matchedPortRange_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, networkUri_); + } + size += unknownFields.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.networkmanagement.v1beta1.ForwardingRuleInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo other = + (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getMatchedProtocol().equals(other.getMatchedProtocol())) return false; + if (!getMatchedPortRange().equals(other.getMatchedPortRange())) return false; + if (!getVip().equals(other.getVip())) return false; + if (!getTarget().equals(other.getTarget())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + MATCHED_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getMatchedProtocol().hashCode(); + hash = (37 * hash) + MATCHED_PORT_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getMatchedPortRange().hashCode(); + hash = (37 * hash) + VIP_FIELD_NUMBER; + hash = (53 * hash) + getVip().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo 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.networkmanagement.v1beta1.ForwardingRuleInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo 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.networkmanagement.v1beta1.ForwardingRuleInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo 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.networkmanagement.v1beta1.ForwardingRuleInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo 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.networkmanagement.v1beta1.ForwardingRuleInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo 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.networkmanagement.v1beta1.ForwardingRuleInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine forwarding rule.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.class, + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + matchedProtocol_ = ""; + + matchedPortRange_ = ""; + + vip_ = ""; + + target_ = ""; + + networkUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo build() { + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo result = + new com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.matchedProtocol_ = matchedProtocol_; + result.matchedPortRange_ = matchedPortRange_; + result.vip_ = vip_; + result.target_ = target_; + result.networkUri_ = networkUri_; + 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.networkmanagement.v1beta1.ForwardingRuleInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getMatchedProtocol().isEmpty()) { + matchedProtocol_ = other.matchedProtocol_; + onChanged(); + } + if (!other.getMatchedPortRange().isEmpty()) { + matchedPortRange_ = other.matchedPortRange_; + onChanged(); + } + if (!other.getVip().isEmpty()) { + vip_ = other.vip_; + onChanged(); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine forwarding rule.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine forwarding rule.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object matchedProtocol_ = ""; + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @return The matchedProtocol. + */ + public java.lang.String getMatchedProtocol() { + java.lang.Object ref = matchedProtocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedProtocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @return The bytes for matchedProtocol. + */ + public com.google.protobuf.ByteString getMatchedProtocolBytes() { + java.lang.Object ref = matchedProtocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @param value The matchedProtocol to set. + * @return This builder for chaining. + */ + public Builder setMatchedProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + matchedProtocol_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @return This builder for chaining. + */ + public Builder clearMatchedProtocol() { + + matchedProtocol_ = getDefaultInstance().getMatchedProtocol(); + onChanged(); + return this; + } + /** + * + * + *
+     * Protocol defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_protocol = 3; + * + * @param value The bytes for matchedProtocol to set. + * @return This builder for chaining. + */ + public Builder setMatchedProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + matchedProtocol_ = value; + onChanged(); + return this; + } + + private java.lang.Object matchedPortRange_ = ""; + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @return The matchedPortRange. + */ + public java.lang.String getMatchedPortRange() { + java.lang.Object ref = matchedPortRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedPortRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @return The bytes for matchedPortRange. + */ + public com.google.protobuf.ByteString getMatchedPortRangeBytes() { + java.lang.Object ref = matchedPortRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedPortRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @param value The matchedPortRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedPortRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + matchedPortRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @return This builder for chaining. + */ + public Builder clearMatchedPortRange() { + + matchedPortRange_ = getDefaultInstance().getMatchedPortRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * Port range defined in the forwarding rule that matches the test.
+     * 
+ * + * string matched_port_range = 6; + * + * @param value The bytes for matchedPortRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedPortRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + matchedPortRange_ = value; + onChanged(); + return this; + } + + private java.lang.Object vip_ = ""; + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @return The vip. + */ + public java.lang.String getVip() { + java.lang.Object ref = vip_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vip_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @return The bytes for vip. + */ + public com.google.protobuf.ByteString getVipBytes() { + java.lang.Object ref = vip_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @param value The vip to set. + * @return This builder for chaining. + */ + public Builder setVip(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vip_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @return This builder for chaining. + */ + public Builder clearVip() { + + vip_ = getDefaultInstance().getVip(); + onChanged(); + return this; + } + /** + * + * + *
+     * VIP of the forwarding rule.
+     * 
+ * + * string vip = 4; + * + * @param value The bytes for vip to set. + * @return This builder for chaining. + */ + public Builder setVipBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vip_ = value; + onChanged(); + return this; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @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; + } + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @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; + } + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target type of the forwarding rule.
+     * 
+ * + * string target = 5; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Network URI. Only valid for Internal Load Balancer.
+     * 
+ * + * string network_uri = 7; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + 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.networkmanagement.v1beta1.ForwardingRuleInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) + private static final com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForwardingRuleInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ForwardingRuleInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.ForwardingRuleInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardingRuleInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardingRuleInfoOrBuilder.java new file mode 100644 index 00000000..e4614809 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ForwardingRuleInfoOrBuilder.java @@ -0,0 +1,200 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface ForwardingRuleInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine forwarding rule.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine forwarding rule.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The matchedProtocol. + */ + java.lang.String getMatchedProtocol(); + /** + * + * + *
+   * Protocol defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_protocol = 3; + * + * @return The bytes for matchedProtocol. + */ + com.google.protobuf.ByteString getMatchedProtocolBytes(); + + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The matchedPortRange. + */ + java.lang.String getMatchedPortRange(); + /** + * + * + *
+   * Port range defined in the forwarding rule that matches the test.
+   * 
+ * + * string matched_port_range = 6; + * + * @return The bytes for matchedPortRange. + */ + com.google.protobuf.ByteString getMatchedPortRangeBytes(); + + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The vip. + */ + java.lang.String getVip(); + /** + * + * + *
+   * VIP of the forwarding rule.
+   * 
+ * + * string vip = 4; + * + * @return The bytes for vip. + */ + com.google.protobuf.ByteString getVipBytes(); + + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Target type of the forwarding rule.
+   * 
+ * + * string target = 5; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * Network URI. Only valid for Internal Load Balancer.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GKEMasterInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GKEMasterInfo.java new file mode 100644 index 00000000..b57ddac7 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GKEMasterInfo.java @@ -0,0 +1,1176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a Google Kubernetes Engine (GKE)
+ * cluster master.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.GKEMasterInfo} + */ +public final class GKEMasterInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.GKEMasterInfo) + GKEMasterInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use GKEMasterInfo.newBuilder() to construct. + private GKEMasterInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GKEMasterInfo() { + clusterUri_ = ""; + clusterNetworkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GKEMasterInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GKEMasterInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + clusterUri_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + clusterNetworkUri_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + internalIp_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalIp_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.class, + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.Builder.class); + } + + public static final int CLUSTER_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object clusterUri_; + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The clusterUri. + */ + @java.lang.Override + public java.lang.String getClusterUri() { + java.lang.Object ref = clusterUri_; + 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(); + clusterUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The bytes for clusterUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterUriBytes() { + java.lang.Object ref = clusterUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_NETWORK_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object clusterNetworkUri_; + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The clusterNetworkUri. + */ + @java.lang.Override + public java.lang.String getClusterNetworkUri() { + java.lang.Object ref = clusterNetworkUri_; + 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(); + clusterNetworkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The bytes for clusterNetworkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterNetworkUriBytes() { + java.lang.Object ref = clusterNetworkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_FIELD_NUMBER = 5; + private volatile java.lang.Object internalIp_; + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + @java.lang.Override + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + 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(); + internalIp_ = s; + return s; + } + } + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 6; + private volatile java.lang.Object externalIp_; + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + 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(); + externalIp_ = s; + return s; + } + } + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = 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 (!getClusterUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterUri_); + } + if (!getClusterNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterNetworkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalIp_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getClusterUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterUri_); + } + if (!getClusterNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterNetworkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalIp_); + } + size += unknownFields.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.networkmanagement.v1beta1.GKEMasterInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo other = + (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) obj; + + if (!getClusterUri().equals(other.getClusterUri())) return false; + if (!getClusterNetworkUri().equals(other.getClusterNetworkUri())) return false; + if (!getInternalIp().equals(other.getInternalIp())) return false; + if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CLUSTER_URI_FIELD_NUMBER; + hash = (53 * hash) + getClusterUri().hashCode(); + hash = (37 * hash) + CLUSTER_NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getClusterNetworkUri().hashCode(); + hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getInternalIp().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo 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.networkmanagement.v1beta1.GKEMasterInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo 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.networkmanagement.v1beta1.GKEMasterInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo 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.networkmanagement.v1beta1.GKEMasterInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo 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.networkmanagement.v1beta1.GKEMasterInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo 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.networkmanagement.v1beta1.GKEMasterInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Google Kubernetes Engine (GKE)
+   * cluster master.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.GKEMasterInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.GKEMasterInfo) + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.class, + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + clusterUri_ = ""; + + clusterNetworkUri_ = ""; + + internalIp_ = ""; + + externalIp_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo build() { + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo result = + new com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(this); + result.clusterUri_ = clusterUri_; + result.clusterNetworkUri_ = clusterNetworkUri_; + result.internalIp_ = internalIp_; + result.externalIp_ = externalIp_; + 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.networkmanagement.v1beta1.GKEMasterInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance()) + return this; + if (!other.getClusterUri().isEmpty()) { + clusterUri_ = other.clusterUri_; + onChanged(); + } + if (!other.getClusterNetworkUri().isEmpty()) { + clusterNetworkUri_ = other.clusterNetworkUri_; + onChanged(); + } + if (!other.getInternalIp().isEmpty()) { + internalIp_ = other.internalIp_; + onChanged(); + } + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object clusterUri_ = ""; + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @return The clusterUri. + */ + public java.lang.String getClusterUri() { + java.lang.Object ref = clusterUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @return The bytes for clusterUri. + */ + public com.google.protobuf.ByteString getClusterUriBytes() { + java.lang.Object ref = clusterUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @param value The clusterUri to set. + * @return This builder for chaining. + */ + public Builder setClusterUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearClusterUri() { + + clusterUri_ = getDefaultInstance().getClusterUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster.
+     * 
+ * + * string cluster_uri = 2; + * + * @param value The bytes for clusterUri to set. + * @return This builder for chaining. + */ + public Builder setClusterUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object clusterNetworkUri_ = ""; + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @return The clusterNetworkUri. + */ + public java.lang.String getClusterNetworkUri() { + java.lang.Object ref = clusterNetworkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterNetworkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @return The bytes for clusterNetworkUri. + */ + public com.google.protobuf.ByteString getClusterNetworkUriBytes() { + java.lang.Object ref = clusterNetworkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterNetworkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @param value The clusterNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setClusterNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterNetworkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearClusterNetworkUri() { + + clusterNetworkUri_ = getDefaultInstance().getClusterNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a GKE cluster network.
+     * 
+ * + * string cluster_network_uri = 4; + * + * @param value The bytes for clusterNetworkUri to set. + * @return This builder for chaining. + */ + public Builder setClusterNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterNetworkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object internalIp_ = ""; + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + internalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearInternalIp() { + + internalIp_ = getDefaultInstance().getInternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of a GKE cluster master.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The bytes for internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + internalIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + + externalIp_ = getDefaultInstance().getExternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of a GKE cluster master.
+     * 
+ * + * string external_ip = 6; + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalIp_ = value; + 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.networkmanagement.v1beta1.GKEMasterInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.GKEMasterInfo) + private static final com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GKEMasterInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GKEMasterInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.GKEMasterInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GKEMasterInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GKEMasterInfoOrBuilder.java new file mode 100644 index 00000000..312f3b88 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GKEMasterInfoOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface GKEMasterInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.GKEMasterInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The clusterUri. + */ + java.lang.String getClusterUri(); + /** + * + * + *
+   * URI of a GKE cluster.
+   * 
+ * + * string cluster_uri = 2; + * + * @return The bytes for clusterUri. + */ + com.google.protobuf.ByteString getClusterUriBytes(); + + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The clusterNetworkUri. + */ + java.lang.String getClusterNetworkUri(); + /** + * + * + *
+   * URI of a GKE cluster network.
+   * 
+ * + * string cluster_network_uri = 4; + * + * @return The bytes for clusterNetworkUri. + */ + com.google.protobuf.ByteString getClusterNetworkUriBytes(); + + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + java.lang.String getInternalIp(); + /** + * + * + *
+   * Internal IP address of a GKE cluster master.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + com.google.protobuf.ByteString getInternalIpBytes(); + + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + * + * + *
+   * External IP address of a GKE cluster master.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GetConnectivityTestRequest.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GetConnectivityTestRequest.java new file mode 100644 index 00000000..971c18e2 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GetConnectivityTestRequest.java @@ -0,0 +1,655 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Request for the `GetConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} + */ +public final class GetConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) + GetConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetConnectivityTestRequest.newBuilder() to construct. + private GetConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetConnectivityTestRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. `ConnectivityTest` resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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. `ConnectivityTest` resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.networkmanagement.v1beta1.GetConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest 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.networkmanagement.v1beta1.GetConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest 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.networkmanagement.v1beta1.GetConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest 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.networkmanagement.v1beta1.GetConnectivityTestRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + 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.networkmanagement.v1beta1.GetConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest 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.networkmanagement.v1beta1.GetConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `GetConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(this); + result.name_ = name_; + 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.networkmanagement.v1beta1.GetConnectivityTestRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. `ConnectivityTest` resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + 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.networkmanagement.v1beta1.GetConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.GetConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GetConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GetConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..18083dbb --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/GetConnectivityTestRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface GetConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. `ConnectivityTest` resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. `ConnectivityTest` resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfo.java new file mode 100644 index 00000000..e023cc1e --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfo.java @@ -0,0 +1,1998 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine instance.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.InstanceInfo} + */ +public final class InstanceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.InstanceInfo) + InstanceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceInfo.newBuilder() to construct. + private InstanceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceInfo() { + displayName_ = ""; + uri_ = ""; + interface_ = ""; + networkUri_ = ""; + internalIp_ = ""; + externalIp_ = ""; + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + serviceAccount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InstanceInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + interface_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + internalIp_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalIp_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + networkTags_.add(s); + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + networkTags_ = networkTags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.class, + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACE_FIELD_NUMBER = 3; + private volatile java.lang.Object interface_; + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @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 network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @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 NETWORK_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_FIELD_NUMBER = 5; + private volatile java.lang.Object internalIp_; + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + @java.lang.Override + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + 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(); + internalIp_ = s; + return s; + } + } + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 6; + private volatile java.lang.Object externalIp_; + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + 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(); + externalIp_ = s; + return s; + } + } + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_TAGS_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList networkTags_; + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_; + } + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 8; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The serviceAccount. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getInterfaceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, interface_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, networkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalIp_); + } + for (int i = 0; i < networkTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkTags_.getRaw(i)); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, serviceAccount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getInterfaceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, interface_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, networkUri_); + } + if (!getInternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalIp_); + } + if (!getExternalIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalIp_); + } + { + int dataSize = 0; + for (int i = 0; i < networkTags_.size(); i++) { + dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getNetworkTagsList().size(); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, serviceAccount_); + } + size += unknownFields.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.networkmanagement.v1beta1.InstanceInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.InstanceInfo other = + (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getInterface().equals(other.getInterface())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getInternalIp().equals(other.getInternalIp())) return false; + if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterface().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getInternalIp().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + if (getNetworkTagsCount() > 0) { + hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTagsList().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.InstanceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.InstanceInfo 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.networkmanagement.v1beta1.InstanceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.InstanceInfo 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.networkmanagement.v1beta1.InstanceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.InstanceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.InstanceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.InstanceInfo 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.networkmanagement.v1beta1.InstanceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.InstanceInfo 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.networkmanagement.v1beta1.InstanceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.InstanceInfo 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.networkmanagement.v1beta1.InstanceInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine instance.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.InstanceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.InstanceInfo) + com.google.cloud.networkmanagement.v1beta1.InstanceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.class, + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.InstanceInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + interface_ = ""; + + networkUri_ = ""; + + internalIp_ = ""; + + externalIp_ = ""; + + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAccount_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.InstanceInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.InstanceInfo build() { + com.google.cloud.networkmanagement.v1beta1.InstanceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.InstanceInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.InstanceInfo result = + new com.google.cloud.networkmanagement.v1beta1.InstanceInfo(this); + int from_bitField0_ = bitField0_; + result.displayName_ = displayName_; + result.uri_ = uri_; + result.interface_ = interface_; + result.networkUri_ = networkUri_; + result.internalIp_ = internalIp_; + result.externalIp_ = externalIp_; + if (((bitField0_ & 0x00000001) != 0)) { + networkTags_ = networkTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.networkTags_ = networkTags_; + result.serviceAccount_ = serviceAccount_; + 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.networkmanagement.v1beta1.InstanceInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.InstanceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.InstanceInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getInterface().isEmpty()) { + interface_ = other.interface_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.getInternalIp().isEmpty()) { + internalIp_ = other.internalIp_; + onChanged(); + } + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + onChanged(); + } + if (!other.networkTags_.isEmpty()) { + if (networkTags_.isEmpty()) { + networkTags_ = other.networkTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNetworkTagsIsMutable(); + networkTags_.addAll(other.networkTags_); + } + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.InstanceInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object interface_ = ""; + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @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 network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @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 network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @return This builder for chaining. + */ + public Builder clearInterface() { + + interface_ = getDefaultInstance().getInterface(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network interface of a Compute Engine instance.
+     * 
+ * + * string interface = 3; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 4; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object internalIp_ = ""; + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + public java.lang.String getInternalIp() { + java.lang.Object ref = internalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + public com.google.protobuf.ByteString getInternalIpBytes() { + java.lang.Object ref = internalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + internalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearInternalIp() { + + internalIp_ = getDefaultInstance().getInternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Internal IP address of the network interface.
+     * 
+ * + * string internal_ip = 5; + * + * @param value The bytes for internalIp to set. + * @return This builder for chaining. + */ + public Builder setInternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + internalIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + + externalIp_ = getDefaultInstance().getExternalIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * External IP address of the network interface.
+     * 
+ * + * string external_ip = 6; + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalIp_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList networkTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNetworkTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. + */ + public Builder setNetworkTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param value The networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param values The networkTags to add. + * @return This builder for chaining. + */ + public Builder addAllNetworkTags(java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @return This builder for chaining. + */ + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Network tags configured on the instance.
+     * 
+ * + * repeated string network_tags = 7; + * + * @param value The bytes of the networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The serviceAccount. + */ + @java.lang.Deprecated + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Service account authorized for the instance.
+     * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + 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.networkmanagement.v1beta1.InstanceInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.InstanceInfo) + private static final com.google.cloud.networkmanagement.v1beta1.InstanceInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.InstanceInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.InstanceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstanceInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.InstanceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfoOrBuilder.java new file mode 100644 index 00000000..57656044 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfoOrBuilder.java @@ -0,0 +1,253 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface InstanceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.InstanceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine instance.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine instance.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @return The interface. + */ + java.lang.String getInterface(); + /** + * + * + *
+   * Name of the network interface of a Compute Engine instance.
+   * 
+ * + * string interface = 3; + * + * @return The bytes for interface. + */ + com.google.protobuf.ByteString getInterfaceBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 4; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The internalIp. + */ + java.lang.String getInternalIp(); + /** + * + * + *
+   * Internal IP address of the network interface.
+   * 
+ * + * string internal_ip = 5; + * + * @return The bytes for internalIp. + */ + com.google.protobuf.ByteString getInternalIpBytes(); + + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + * + * + *
+   * External IP address of the network interface.
+   * 
+ * + * string external_ip = 6; + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); + + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return A list containing the networkTags. + */ + java.util.List getNetworkTagsList(); + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @return The count of networkTags. + */ + int getNetworkTagsCount(); + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + java.lang.String getNetworkTags(int index); + /** + * + * + *
+   * Network tags configured on the instance.
+   * 
+ * + * repeated string network_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + com.google.protobuf.ByteString getNetworkTagsBytes(int index); + + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The serviceAccount. + */ + @java.lang.Deprecated + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Service account authorized for the instance.
+   * 
+ * + * string service_account = 8 [deprecated = true]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getServiceAccountBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyDistribution.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyDistribution.java new file mode 100644 index 00000000..c3e4f900 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyDistribution.java @@ -0,0 +1,1033 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Describes measured latency distribution.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.LatencyDistribution} + */ +public final class LatencyDistribution extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.LatencyDistribution) + LatencyDistributionOrBuilder { + private static final long serialVersionUID = 0L; + // Use LatencyDistribution.newBuilder() to construct. + private LatencyDistribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LatencyDistribution() { + latencyPercentiles_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LatencyDistribution(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LatencyDistribution( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + latencyPercentiles_ = + new java.util.ArrayList< + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile>(); + mutable_bitField0_ |= 0x00000001; + } + latencyPercentiles_.add( + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + latencyPercentiles_ = java.util.Collections.unmodifiableList(latencyPercentiles_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.class, + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.Builder.class); + } + + public static final int LATENCY_PERCENTILES_FIELD_NUMBER = 1; + private java.util.List + latencyPercentiles_; + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + @java.lang.Override + public java.util.List + getLatencyPercentilesList() { + return latencyPercentiles_; + } + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkmanagement.v1beta1.LatencyPercentileOrBuilder> + getLatencyPercentilesOrBuilderList() { + return latencyPercentiles_; + } + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + @java.lang.Override + public int getLatencyPercentilesCount() { + return latencyPercentiles_.size(); + } + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentile getLatencyPercentiles( + int index) { + return latencyPercentiles_.get(index); + } + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentileOrBuilder + getLatencyPercentilesOrBuilder(int index) { + return latencyPercentiles_.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 < latencyPercentiles_.size(); i++) { + output.writeMessage(1, latencyPercentiles_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < latencyPercentiles_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, latencyPercentiles_.get(i)); + } + size += unknownFields.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.networkmanagement.v1beta1.LatencyDistribution)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution other = + (com.google.cloud.networkmanagement.v1beta1.LatencyDistribution) obj; + + if (!getLatencyPercentilesList().equals(other.getLatencyPercentilesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLatencyPercentilesCount() > 0) { + hash = (37 * hash) + LATENCY_PERCENTILES_FIELD_NUMBER; + hash = (53 * hash) + getLatencyPercentilesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyDistribution parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyDistribution 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.networkmanagement.v1beta1.LatencyDistribution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyDistribution 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.networkmanagement.v1beta1.LatencyDistribution parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyDistribution parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyDistribution parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyDistribution 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.networkmanagement.v1beta1.LatencyDistribution parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyDistribution 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.networkmanagement.v1beta1.LatencyDistribution parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyDistribution 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.networkmanagement.v1beta1.LatencyDistribution 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; + } + /** + * + * + *
+   * Describes measured latency distribution.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.LatencyDistribution} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.LatencyDistribution) + com.google.cloud.networkmanagement.v1beta1.LatencyDistributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.class, + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLatencyPercentilesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (latencyPercentilesBuilder_ == null) { + latencyPercentiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + latencyPercentilesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyDistribution_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyDistribution + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyDistribution build() { + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyDistribution buildPartial() { + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution result = + new com.google.cloud.networkmanagement.v1beta1.LatencyDistribution(this); + int from_bitField0_ = bitField0_; + if (latencyPercentilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + latencyPercentiles_ = java.util.Collections.unmodifiableList(latencyPercentiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.latencyPercentiles_ = latencyPercentiles_; + } else { + result.latencyPercentiles_ = latencyPercentilesBuilder_.build(); + } + 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.networkmanagement.v1beta1.LatencyDistribution) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.LatencyDistribution) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.LatencyDistribution other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.getDefaultInstance()) + return this; + if (latencyPercentilesBuilder_ == null) { + if (!other.latencyPercentiles_.isEmpty()) { + if (latencyPercentiles_.isEmpty()) { + latencyPercentiles_ = other.latencyPercentiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLatencyPercentilesIsMutable(); + latencyPercentiles_.addAll(other.latencyPercentiles_); + } + onChanged(); + } + } else { + if (!other.latencyPercentiles_.isEmpty()) { + if (latencyPercentilesBuilder_.isEmpty()) { + latencyPercentilesBuilder_.dispose(); + latencyPercentilesBuilder_ = null; + latencyPercentiles_ = other.latencyPercentiles_; + bitField0_ = (bitField0_ & ~0x00000001); + latencyPercentilesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLatencyPercentilesFieldBuilder() + : null; + } else { + latencyPercentilesBuilder_.addAllMessages(other.latencyPercentiles_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.LatencyDistribution) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + latencyPercentiles_ = java.util.Collections.emptyList(); + + private void ensureLatencyPercentilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + latencyPercentiles_ = + new java.util.ArrayList( + latencyPercentiles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentileOrBuilder> + latencyPercentilesBuilder_; + + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public java.util.List + getLatencyPercentilesList() { + if (latencyPercentilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(latencyPercentiles_); + } else { + return latencyPercentilesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public int getLatencyPercentilesCount() { + if (latencyPercentilesBuilder_ == null) { + return latencyPercentiles_.size(); + } else { + return latencyPercentilesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentile getLatencyPercentiles( + int index) { + if (latencyPercentilesBuilder_ == null) { + return latencyPercentiles_.get(index); + } else { + return latencyPercentilesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public Builder setLatencyPercentiles( + int index, com.google.cloud.networkmanagement.v1beta1.LatencyPercentile value) { + if (latencyPercentilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLatencyPercentilesIsMutable(); + latencyPercentiles_.set(index, value); + onChanged(); + } else { + latencyPercentilesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public Builder setLatencyPercentiles( + int index, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder builderForValue) { + if (latencyPercentilesBuilder_ == null) { + ensureLatencyPercentilesIsMutable(); + latencyPercentiles_.set(index, builderForValue.build()); + onChanged(); + } else { + latencyPercentilesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public Builder addLatencyPercentiles( + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile value) { + if (latencyPercentilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLatencyPercentilesIsMutable(); + latencyPercentiles_.add(value); + onChanged(); + } else { + latencyPercentilesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public Builder addLatencyPercentiles( + int index, com.google.cloud.networkmanagement.v1beta1.LatencyPercentile value) { + if (latencyPercentilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLatencyPercentilesIsMutable(); + latencyPercentiles_.add(index, value); + onChanged(); + } else { + latencyPercentilesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public Builder addLatencyPercentiles( + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder builderForValue) { + if (latencyPercentilesBuilder_ == null) { + ensureLatencyPercentilesIsMutable(); + latencyPercentiles_.add(builderForValue.build()); + onChanged(); + } else { + latencyPercentilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public Builder addLatencyPercentiles( + int index, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder builderForValue) { + if (latencyPercentilesBuilder_ == null) { + ensureLatencyPercentilesIsMutable(); + latencyPercentiles_.add(index, builderForValue.build()); + onChanged(); + } else { + latencyPercentilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public Builder addAllLatencyPercentiles( + java.lang.Iterable + values) { + if (latencyPercentilesBuilder_ == null) { + ensureLatencyPercentilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, latencyPercentiles_); + onChanged(); + } else { + latencyPercentilesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public Builder clearLatencyPercentiles() { + if (latencyPercentilesBuilder_ == null) { + latencyPercentiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + latencyPercentilesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public Builder removeLatencyPercentiles(int index) { + if (latencyPercentilesBuilder_ == null) { + ensureLatencyPercentilesIsMutable(); + latencyPercentiles_.remove(index); + onChanged(); + } else { + latencyPercentilesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder + getLatencyPercentilesBuilder(int index) { + return getLatencyPercentilesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentileOrBuilder + getLatencyPercentilesOrBuilder(int index) { + if (latencyPercentilesBuilder_ == null) { + return latencyPercentiles_.get(index); + } else { + return latencyPercentilesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.networkmanagement.v1beta1.LatencyPercentileOrBuilder> + getLatencyPercentilesOrBuilderList() { + if (latencyPercentilesBuilder_ != null) { + return latencyPercentilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(latencyPercentiles_); + } + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder + addLatencyPercentilesBuilder() { + return getLatencyPercentilesFieldBuilder() + .addBuilder( + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.getDefaultInstance()); + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder + addLatencyPercentilesBuilder(int index) { + return getLatencyPercentilesFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.getDefaultInstance()); + } + /** + * + * + *
+     * Representative latency percentiles.
+     * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + public java.util.List + getLatencyPercentilesBuilderList() { + return getLatencyPercentilesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentileOrBuilder> + getLatencyPercentilesFieldBuilder() { + if (latencyPercentilesBuilder_ == null) { + latencyPercentilesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentileOrBuilder>( + latencyPercentiles_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + latencyPercentiles_ = null; + } + return latencyPercentilesBuilder_; + } + + @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.networkmanagement.v1beta1.LatencyDistribution) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.LatencyDistribution) + private static final com.google.cloud.networkmanagement.v1beta1.LatencyDistribution + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.LatencyDistribution(); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyDistribution + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LatencyDistribution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LatencyDistribution(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.LatencyDistribution + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyDistributionOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyDistributionOrBuilder.java new file mode 100644 index 00000000..580c991f --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyDistributionOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface LatencyDistributionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.LatencyDistribution) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + java.util.List + getLatencyPercentilesList(); + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile getLatencyPercentiles(int index); + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + int getLatencyPercentilesCount(); + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + java.util.List + getLatencyPercentilesOrBuilderList(); + /** + * + * + *
+   * Representative latency percentiles.
+   * 
+ * + * + * repeated .google.cloud.networkmanagement.v1beta1.LatencyPercentile latency_percentiles = 1; + * + */ + com.google.cloud.networkmanagement.v1beta1.LatencyPercentileOrBuilder + getLatencyPercentilesOrBuilder(int index); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyPercentile.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyPercentile.java new file mode 100644 index 00000000..266dea07 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyPercentile.java @@ -0,0 +1,648 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Latency percentile rank and value.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.LatencyPercentile} + */ +public final class LatencyPercentile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.LatencyPercentile) + LatencyPercentileOrBuilder { + private static final long serialVersionUID = 0L; + // Use LatencyPercentile.newBuilder() to construct. + private LatencyPercentile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LatencyPercentile() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LatencyPercentile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LatencyPercentile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + percent_ = input.readInt32(); + break; + } + case 16: + { + latencyMicros_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyPercentile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyPercentile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.class, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder.class); + } + + public static final int PERCENT_FIELD_NUMBER = 1; + private int percent_; + /** + * + * + *
+   * Percentage of samples this data point applies to.
+   * 
+ * + * int32 percent = 1; + * + * @return The percent. + */ + @java.lang.Override + public int getPercent() { + return percent_; + } + + public static final int LATENCY_MICROS_FIELD_NUMBER = 2; + private long latencyMicros_; + /** + * + * + *
+   * percent-th percentile of latency observed, in microseconds.
+   * Fraction of percent/100 of samples have latency lower or
+   * equal to the value of this field.
+   * 
+ * + * int64 latency_micros = 2; + * + * @return The latencyMicros. + */ + @java.lang.Override + public long getLatencyMicros() { + return latencyMicros_; + } + + 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 (percent_ != 0) { + output.writeInt32(1, percent_); + } + if (latencyMicros_ != 0L) { + output.writeInt64(2, latencyMicros_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (percent_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, percent_); + } + if (latencyMicros_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, latencyMicros_); + } + size += unknownFields.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.networkmanagement.v1beta1.LatencyPercentile)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile other = + (com.google.cloud.networkmanagement.v1beta1.LatencyPercentile) obj; + + if (getPercent() != other.getPercent()) return false; + if (getLatencyMicros() != other.getLatencyMicros()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getPercent(); + hash = (37 * hash) + LATENCY_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLatencyMicros()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyPercentile parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyPercentile 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.networkmanagement.v1beta1.LatencyPercentile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyPercentile 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.networkmanagement.v1beta1.LatencyPercentile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyPercentile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyPercentile parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyPercentile 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.networkmanagement.v1beta1.LatencyPercentile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyPercentile 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.networkmanagement.v1beta1.LatencyPercentile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyPercentile 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.networkmanagement.v1beta1.LatencyPercentile 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; + } + /** + * + * + *
+   * Latency percentile rank and value.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.LatencyPercentile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.LatencyPercentile) + com.google.cloud.networkmanagement.v1beta1.LatencyPercentileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyPercentile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyPercentile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.class, + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + percent_ = 0; + + latencyMicros_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_LatencyPercentile_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentile + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentile build() { + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyPercentile buildPartial() { + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile result = + new com.google.cloud.networkmanagement.v1beta1.LatencyPercentile(this); + result.percent_ = percent_; + result.latencyMicros_ = latencyMicros_; + 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.networkmanagement.v1beta1.LatencyPercentile) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.LatencyPercentile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.LatencyPercentile other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.LatencyPercentile.getDefaultInstance()) + return this; + if (other.getPercent() != 0) { + setPercent(other.getPercent()); + } + if (other.getLatencyMicros() != 0L) { + setLatencyMicros(other.getLatencyMicros()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.LatencyPercentile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.LatencyPercentile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int percent_; + /** + * + * + *
+     * Percentage of samples this data point applies to.
+     * 
+ * + * int32 percent = 1; + * + * @return The percent. + */ + @java.lang.Override + public int getPercent() { + return percent_; + } + /** + * + * + *
+     * Percentage of samples this data point applies to.
+     * 
+ * + * int32 percent = 1; + * + * @param value The percent to set. + * @return This builder for chaining. + */ + public Builder setPercent(int value) { + + percent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Percentage of samples this data point applies to.
+     * 
+ * + * int32 percent = 1; + * + * @return This builder for chaining. + */ + public Builder clearPercent() { + + percent_ = 0; + onChanged(); + return this; + } + + private long latencyMicros_; + /** + * + * + *
+     * percent-th percentile of latency observed, in microseconds.
+     * Fraction of percent/100 of samples have latency lower or
+     * equal to the value of this field.
+     * 
+ * + * int64 latency_micros = 2; + * + * @return The latencyMicros. + */ + @java.lang.Override + public long getLatencyMicros() { + return latencyMicros_; + } + /** + * + * + *
+     * percent-th percentile of latency observed, in microseconds.
+     * Fraction of percent/100 of samples have latency lower or
+     * equal to the value of this field.
+     * 
+ * + * int64 latency_micros = 2; + * + * @param value The latencyMicros to set. + * @return This builder for chaining. + */ + public Builder setLatencyMicros(long value) { + + latencyMicros_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * percent-th percentile of latency observed, in microseconds.
+     * Fraction of percent/100 of samples have latency lower or
+     * equal to the value of this field.
+     * 
+ * + * int64 latency_micros = 2; + * + * @return This builder for chaining. + */ + public Builder clearLatencyMicros() { + + latencyMicros_ = 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.networkmanagement.v1beta1.LatencyPercentile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.LatencyPercentile) + private static final com.google.cloud.networkmanagement.v1beta1.LatencyPercentile + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.LatencyPercentile(); + } + + public static com.google.cloud.networkmanagement.v1beta1.LatencyPercentile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LatencyPercentile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LatencyPercentile(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.LatencyPercentile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyPercentileOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyPercentileOrBuilder.java new file mode 100644 index 00000000..e96b67a3 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LatencyPercentileOrBuilder.java @@ -0,0 +1,53 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface LatencyPercentileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.LatencyPercentile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Percentage of samples this data point applies to.
+   * 
+ * + * int32 percent = 1; + * + * @return The percent. + */ + int getPercent(); + + /** + * + * + *
+   * percent-th percentile of latency observed, in microseconds.
+   * Fraction of percent/100 of samples have latency lower or
+   * equal to the value of this field.
+   * 
+ * + * int64 latency_micros = 2; + * + * @return The latencyMicros. + */ + long getLatencyMicros(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsRequest.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsRequest.java new file mode 100644 index 00000000..f8541bb5 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsRequest.java @@ -0,0 +1,1391 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Request for the `ListConnectivityTests` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} + */ +public final class ListConnectivityTestsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) + ListConnectivityTestsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConnectivityTestsRequest.newBuilder() to construct. + private ListConnectivityTestsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConnectivityTestsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConnectivityTestsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListConnectivityTestsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.class, + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource of the Connectivity Tests:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource of the Connectivity Tests:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_; + /** + * + * + *
+   * Number of `ConnectivityTests` to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Page token from an earlier query, as returned in `next_page_token`.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Page token from an earlier query, as returned in `next_page_token`.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Lists the `ConnectivityTests` that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+   * `<=`,
+   * `>=`,
+   * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+   * roughly synonymous with equality). <field> can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+   * - Filter by labels:
+   *   - Resources that have a key called `foo`
+   *     labels.foo:*
+   *   - Resources that have a key called `foo` whose value is `bar`
+   *     labels.foo = bar
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Lists the `ConnectivityTests` that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+   * `<=`,
+   * `>=`,
+   * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+   * roughly synonymous with equality). <field> can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+   * - Filter by labels:
+   *   - Resources that have a key called `foo`
+   *     labels.foo:*
+   *   - Resources that have a key called `foo` whose value is `bar`
+   *     labels.foo = bar
+   * 
+ * + * 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; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.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.networkmanagement.v1beta1.ListConnectivityTestsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest other = + (com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) 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 (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest 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.networkmanagement.v1beta1.ListConnectivityTestsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest 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.networkmanagement.v1beta1.ListConnectivityTestsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest 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.networkmanagement.v1beta1.ListConnectivityTestsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + 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.networkmanagement.v1beta1.ListConnectivityTestsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest 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.networkmanagement.v1beta1.ListConnectivityTestsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `ListConnectivityTests` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.class, + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest build() { + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest buildPartial() { + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest result = + new com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + 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.networkmanagement.v1beta1.ListConnectivityTestsRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the Connectivity Tests:
+     *     `projects/{project_id}/locations/global`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of `ConnectivityTests` to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of `ConnectivityTests` to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of `ConnectivityTests` to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Page token from an earlier query, as returned in `next_page_token`.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the `ConnectivityTests` that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+     * `<=`,
+     * `>=`,
+     * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+     * roughly synonymous with equality). <field> can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+     * - Filter by labels:
+     *   - Resources that have a key called `foo`
+     *     labels.foo:*
+     *   - Resources that have a key called `foo` whose value is `bar`
+     *     labels.foo = bar
+     * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * 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; + 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.networkmanagement.v1beta1.ListConnectivityTestsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) + private static final com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConnectivityTestsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListConnectivityTestsRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.ListConnectivityTestsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsRequestOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsRequestOrBuilder.java new file mode 100644 index 00000000..e753e76a --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface ListConnectivityTestsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the Connectivity Tests:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource of the Connectivity Tests:
+   *     `projects/{project_id}/locations/global`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Number of `ConnectivityTests` to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Page token from an earlier query, as returned in `next_page_token`.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Page token from an earlier query, as returned in `next_page_token`.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Lists the `ConnectivityTests` that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+   * `<=`,
+   * `>=`,
+   * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+   * roughly synonymous with equality). <field> can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+   * - Filter by labels:
+   *   - Resources that have a key called `foo`
+   *     labels.foo:*
+   *   - Resources that have a key called `foo` whose value is `bar`
+   *     labels.foo = bar
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Lists the `ConnectivityTests` that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form `<field> <operator> <value>` where operators: `<`, `>`,
+   * `<=`,
+   * `>=`,
+   * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
+   * roughly synonymous with equality). <field> can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/proj-1/locations/global/connectivityTests/test-1
+   * - Filter by labels:
+   *   - Resources that have a key called `foo`
+   *     labels.foo:*
+   *   - Resources that have a key called `foo` whose value is `bar`
+   *     labels.foo = bar
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsResponse.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsResponse.java new file mode 100644 index 00000000..6fc01c0c --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsResponse.java @@ -0,0 +1,1444 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Response for the `ListConnectivityTests` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} + */ +public final class ListConnectivityTestsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) + ListConnectivityTestsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConnectivityTestsResponse.newBuilder() to construct. + private ListConnectivityTestsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConnectivityTestsResponse() { + resources_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConnectivityTestsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListConnectivityTestsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = + new java.util.ArrayList< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest>(); + mutable_bitField0_ |= 0x00000001; + } + resources_.add( + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.class, + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.Builder.class); + } + + public static final int RESOURCES_FIELD_NUMBER = 1; + private java.util.List resources_; + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public java.util.List + getResourcesList() { + return resources_; + } + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder> + getResourcesOrBuilderList() { + return resources_; + } + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public int getResourcesCount() { + return resources_.size(); + } + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getResources(int index) { + return resources_.get(index); + } + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder getResourcesOrBuilder( + int index) { + return resources_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Page token to fetch the next set of Connectivity Tests.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Page token to fetch the next set of Connectivity Tests.
+   * 
+ * + * 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; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * 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 (when querying all locations with `-`).
+   * 
+ * + * 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 < resources_.size(); i++) { + output.writeMessage(1, resources_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < resources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, resources_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 += unknownFields.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.networkmanagement.v1beta1.ListConnectivityTestsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse other = + (com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) obj; + + if (!getResourcesList().equals(other.getResourcesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse 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.networkmanagement.v1beta1.ListConnectivityTestsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse 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.networkmanagement.v1beta1.ListConnectivityTestsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse 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.networkmanagement.v1beta1.ListConnectivityTestsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + 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.networkmanagement.v1beta1.ListConnectivityTestsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse 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.networkmanagement.v1beta1.ListConnectivityTestsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for the `ListConnectivityTests` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.class, + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resourcesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse build() { + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse buildPartial() { + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse result = + new com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(this); + int from_bitField0_ = bitField0_; + if (resourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + 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.networkmanagement.v1beta1.ListConnectivityTestsResponse) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + .getDefaultInstance()) return this; + if (resourcesBuilder_ == null) { + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + } else { + if (!other.resources_.isEmpty()) { + if (resourcesBuilder_.isEmpty()) { + resourcesBuilder_.dispose(); + resourcesBuilder_ = null; + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + resourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourcesFieldBuilder() + : null; + } else { + resourcesBuilder_.addAllMessages(other.resources_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List resources_ = + java.util.Collections.emptyList(); + + private void ensureResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resources_ = + new java.util.ArrayList( + resources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder> + resourcesBuilder_; + + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public java.util.List + getResourcesList() { + if (resourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resources_); + } else { + return resourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public int getResourcesCount() { + if (resourcesBuilder_ == null) { + return resources_.size(); + } else { + return resourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getResources(int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public Builder setResources( + int index, com.google.cloud.networkmanagement.v1beta1.ConnectivityTest value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public Builder setResources( + int index, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.set(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public Builder addResources(com.google.cloud.networkmanagement.v1beta1.ConnectivityTest value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + } else { + resourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public Builder addResources( + int index, com.google.cloud.networkmanagement.v1beta1.ConnectivityTest value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(index, value); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public Builder addResources( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public Builder addResources( + int index, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public Builder addAllResources( + java.lang.Iterable + values) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + onChanged(); + } else { + resourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public Builder removeResources(int index) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.remove(index); + onChanged(); + } else { + resourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder getResourcesBuilder( + int index) { + return getResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder + getResourcesOrBuilder(int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public java.util.List< + ? extends com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder> + getResourcesOrBuilderList() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resources_); + } + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder + addResourcesBuilder() { + return getResourcesFieldBuilder() + .addBuilder( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance()); + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder addResourcesBuilder( + int index) { + return getResourcesFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance()); + } + /** + * + * + *
+     * List of Connectivity Tests.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + public java.util.List + getResourcesBuilderList() { + return getResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder>( + resources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Page token to fetch the next set of Connectivity Tests.
+     * 
+ * + * 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; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * 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 (when querying all locations with `-`).
+     * 
+ * + * 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 (when querying all locations with `-`).
+     * 
+ * + * 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); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * 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); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * 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_); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached (when querying all locations with `-`).
+     * 
+ * + * 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); + 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.networkmanagement.v1beta1.ListConnectivityTestsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) + private static final com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(); + } + + public static com.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConnectivityTestsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListConnectivityTestsResponse(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.ListConnectivityTestsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsResponseOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsResponseOrBuilder.java new file mode 100644 index 00000000..03a468de --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ListConnectivityTestsResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface ListConnectivityTestsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + java.util.List getResourcesList(); + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getResources(int index); + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + int getResourcesCount(); + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + java.util.List + getResourcesOrBuilderList(); + /** + * + * + *
+   * List of Connectivity Tests.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.ConnectivityTest resources = 1; + */ + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder getResourcesOrBuilder( + int index); + + /** + * + * + *
+   * Page token to fetch the next set of Connectivity Tests.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Page token to fetch the next set of Connectivity Tests.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached (when querying all locations with `-`).
+   * 
+ * + * 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 (when querying all locations with `-`).
+   * 
+ * + * 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/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerBackend.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerBackend.java new file mode 100644 index 00000000..a8422bbe --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerBackend.java @@ -0,0 +1,1744 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a specific load balancer backend.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} + */ +public final class LoadBalancerBackend extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) + LoadBalancerBackendOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoadBalancerBackend.newBuilder() to construct. + private LoadBalancerBackend(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoadBalancerBackend() { + displayName_ = ""; + uri_ = ""; + healthCheckFirewallState_ = 0; + healthCheckAllowingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + healthCheckBlockingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoadBalancerBackend(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LoadBalancerBackend( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + healthCheckFirewallState_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + healthCheckAllowingFirewallRules_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + healthCheckAllowingFirewallRules_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + healthCheckBlockingFirewallRules_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + healthCheckBlockingFirewallRules_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + healthCheckAllowingFirewallRules_ = healthCheckAllowingFirewallRules_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + healthCheckBlockingFirewallRules_ = healthCheckBlockingFirewallRules_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.class, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder.class); + } + + /** + * + * + *
+   * State of a health check firewall configuration:
+   * 
+ * + * Protobuf enum {@code + * google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState} + */ + public enum HealthCheckFirewallState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State is unspecified. Default state if not populated.
+     * 
+ * + * HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + */ + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * There are configured firewall rules to allow health check probes to the
+     * backend.
+     * 
+ * + * CONFIGURED = 1; + */ + CONFIGURED(1), + /** + * + * + *
+     * There are firewall rules configured to allow partial health check ranges
+     * or block all health check ranges.
+     * If a health check probe is sent from denied IP ranges,
+     * the health check to the backend will fail. Then, the backend will be
+     * marked unhealthy and will not receive traffic sent to the load balancer.
+     * 
+ * + * MISCONFIGURED = 2; + */ + MISCONFIGURED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State is unspecified. Default state if not populated.
+     * 
+ * + * HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + */ + public static final int HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * There are configured firewall rules to allow health check probes to the
+     * backend.
+     * 
+ * + * CONFIGURED = 1; + */ + public static final int CONFIGURED_VALUE = 1; + /** + * + * + *
+     * There are firewall rules configured to allow partial health check ranges
+     * or block all health check ranges.
+     * If a health check probe is sent from denied IP ranges,
+     * the health check to the backend will fail. Then, the backend will be
+     * marked unhealthy and will not receive traffic sent to the load balancer.
+     * 
+ * + * MISCONFIGURED = 2; + */ + public static final int MISCONFIGURED_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 HealthCheckFirewallState 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 HealthCheckFirewallState forNumber(int value) { + switch (value) { + case 0: + return HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED; + case 1: + return CONFIGURED; + case 2: + return MISCONFIGURED; + 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 HealthCheckFirewallState findValueByNumber(int number) { + return HealthCheckFirewallState.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.networkmanagement.v1beta1.LoadBalancerBackend.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HealthCheckFirewallState[] VALUES = values(); + + public static HealthCheckFirewallState 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 HealthCheckFirewallState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState) + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEALTH_CHECK_FIREWALL_STATE_FIELD_NUMBER = 3; + private int healthCheckFirewallState_; + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The enum numeric value on the wire for healthCheckFirewallState. + */ + @java.lang.Override + public int getHealthCheckFirewallStateValue() { + return healthCheckFirewallState_; + } + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The healthCheckFirewallState. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + getHealthCheckFirewallState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState result = + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + .valueOf(healthCheckFirewallState_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + .UNRECOGNIZED + : result; + } + + public static final int HEALTH_CHECK_ALLOWING_FIREWALL_RULES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList healthCheckAllowingFirewallRules_; + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return A list containing the healthCheckAllowingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckAllowingFirewallRulesList() { + return healthCheckAllowingFirewallRules_; + } + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return The count of healthCheckAllowingFirewallRules. + */ + public int getHealthCheckAllowingFirewallRulesCount() { + return healthCheckAllowingFirewallRules_.size(); + } + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the element to return. + * @return The healthCheckAllowingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckAllowingFirewallRules(int index) { + return healthCheckAllowingFirewallRules_.get(index); + } + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckAllowingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckAllowingFirewallRulesBytes(int index) { + return healthCheckAllowingFirewallRules_.getByteString(index); + } + + public static final int HEALTH_CHECK_BLOCKING_FIREWALL_RULES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList healthCheckBlockingFirewallRules_; + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return A list containing the healthCheckBlockingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckBlockingFirewallRulesList() { + return healthCheckBlockingFirewallRules_; + } + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return The count of healthCheckBlockingFirewallRules. + */ + public int getHealthCheckBlockingFirewallRulesCount() { + return healthCheckBlockingFirewallRules_.size(); + } + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the element to return. + * @return The healthCheckBlockingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckBlockingFirewallRules(int index) { + return healthCheckBlockingFirewallRules_.get(index); + } + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckBlockingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckBlockingFirewallRulesBytes(int index) { + return healthCheckBlockingFirewallRules_.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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (healthCheckFirewallState_ + != com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + .HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, healthCheckFirewallState_); + } + for (int i = 0; i < healthCheckAllowingFirewallRules_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 4, healthCheckAllowingFirewallRules_.getRaw(i)); + } + for (int i = 0; i < healthCheckBlockingFirewallRules_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, healthCheckBlockingFirewallRules_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (healthCheckFirewallState_ + != com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + .HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, healthCheckFirewallState_); + } + { + int dataSize = 0; + for (int i = 0; i < healthCheckAllowingFirewallRules_.size(); i++) { + dataSize += computeStringSizeNoTag(healthCheckAllowingFirewallRules_.getRaw(i)); + } + size += dataSize; + size += 1 * getHealthCheckAllowingFirewallRulesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < healthCheckBlockingFirewallRules_.size(); i++) { + dataSize += computeStringSizeNoTag(healthCheckBlockingFirewallRules_.getRaw(i)); + } + size += dataSize; + size += 1 * getHealthCheckBlockingFirewallRulesList().size(); + } + size += unknownFields.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.networkmanagement.v1beta1.LoadBalancerBackend)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend other = + (com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (healthCheckFirewallState_ != other.healthCheckFirewallState_) return false; + if (!getHealthCheckAllowingFirewallRulesList() + .equals(other.getHealthCheckAllowingFirewallRulesList())) return false; + if (!getHealthCheckBlockingFirewallRulesList() + .equals(other.getHealthCheckBlockingFirewallRulesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + HEALTH_CHECK_FIREWALL_STATE_FIELD_NUMBER; + hash = (53 * hash) + healthCheckFirewallState_; + if (getHealthCheckAllowingFirewallRulesCount() > 0) { + hash = (37 * hash) + HEALTH_CHECK_ALLOWING_FIREWALL_RULES_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheckAllowingFirewallRulesList().hashCode(); + } + if (getHealthCheckBlockingFirewallRulesCount() > 0) { + hash = (37 * hash) + HEALTH_CHECK_BLOCKING_FIREWALL_RULES_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheckBlockingFirewallRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend 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.networkmanagement.v1beta1.LoadBalancerBackend parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend 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.networkmanagement.v1beta1.LoadBalancerBackend parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend 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.networkmanagement.v1beta1.LoadBalancerBackend parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend 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.networkmanagement.v1beta1.LoadBalancerBackend parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend 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.networkmanagement.v1beta1.LoadBalancerBackend 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a specific load balancer backend.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.class, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + healthCheckFirewallState_ = 0; + + healthCheckAllowingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + healthCheckBlockingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend build() { + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend buildPartial() { + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend result = + new com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(this); + int from_bitField0_ = bitField0_; + result.displayName_ = displayName_; + result.uri_ = uri_; + result.healthCheckFirewallState_ = healthCheckFirewallState_; + if (((bitField0_ & 0x00000001) != 0)) { + healthCheckAllowingFirewallRules_ = healthCheckAllowingFirewallRules_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.healthCheckAllowingFirewallRules_ = healthCheckAllowingFirewallRules_; + if (((bitField0_ & 0x00000002) != 0)) { + healthCheckBlockingFirewallRules_ = healthCheckBlockingFirewallRules_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.healthCheckBlockingFirewallRules_ = healthCheckBlockingFirewallRules_; + 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.networkmanagement.v1beta1.LoadBalancerBackend) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (other.healthCheckFirewallState_ != 0) { + setHealthCheckFirewallStateValue(other.getHealthCheckFirewallStateValue()); + } + if (!other.healthCheckAllowingFirewallRules_.isEmpty()) { + if (healthCheckAllowingFirewallRules_.isEmpty()) { + healthCheckAllowingFirewallRules_ = other.healthCheckAllowingFirewallRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.addAll(other.healthCheckAllowingFirewallRules_); + } + onChanged(); + } + if (!other.healthCheckBlockingFirewallRules_.isEmpty()) { + if (healthCheckBlockingFirewallRules_.isEmpty()) { + healthCheckBlockingFirewallRules_ = other.healthCheckBlockingFirewallRules_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.addAll(other.healthCheckBlockingFirewallRules_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine instance or network endpoint.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine instance or network endpoint.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private int healthCheckFirewallState_ = 0; + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The enum numeric value on the wire for healthCheckFirewallState. + */ + @java.lang.Override + public int getHealthCheckFirewallStateValue() { + return healthCheckFirewallState_; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @param value The enum numeric value on the wire for healthCheckFirewallState to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckFirewallStateValue(int value) { + + healthCheckFirewallState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The healthCheckFirewallState. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + getHealthCheckFirewallState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + result = + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + .HealthCheckFirewallState.valueOf(healthCheckFirewallState_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @param value The healthCheckFirewallState to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckFirewallState( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + value) { + if (value == null) { + throw new NullPointerException(); + } + + healthCheckFirewallState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * State of the health check firewall configuration.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckFirewallState() { + + healthCheckFirewallState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList healthCheckAllowingFirewallRules_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureHealthCheckAllowingFirewallRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + healthCheckAllowingFirewallRules_ = + new com.google.protobuf.LazyStringArrayList(healthCheckAllowingFirewallRules_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return A list containing the healthCheckAllowingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckAllowingFirewallRulesList() { + return healthCheckAllowingFirewallRules_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return The count of healthCheckAllowingFirewallRules. + */ + public int getHealthCheckAllowingFirewallRulesCount() { + return healthCheckAllowingFirewallRules_.size(); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the element to return. + * @return The healthCheckAllowingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckAllowingFirewallRules(int index) { + return healthCheckAllowingFirewallRules_.get(index); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckAllowingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckAllowingFirewallRulesBytes(int index) { + return healthCheckAllowingFirewallRules_.getByteString(index); + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index to set the value at. + * @param value The healthCheckAllowingFirewallRules to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckAllowingFirewallRules(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param value The healthCheckAllowingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckAllowingFirewallRules(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param values The healthCheckAllowingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addAllHealthCheckAllowingFirewallRules( + java.lang.Iterable values) { + ensureHealthCheckAllowingFirewallRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, healthCheckAllowingFirewallRules_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckAllowingFirewallRules() { + healthCheckAllowingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs allowing probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param value The bytes of the healthCheckAllowingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckAllowingFirewallRulesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHealthCheckAllowingFirewallRulesIsMutable(); + healthCheckAllowingFirewallRules_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList healthCheckBlockingFirewallRules_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureHealthCheckBlockingFirewallRulesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + healthCheckBlockingFirewallRules_ = + new com.google.protobuf.LazyStringArrayList(healthCheckBlockingFirewallRules_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return A list containing the healthCheckBlockingFirewallRules. + */ + public com.google.protobuf.ProtocolStringList getHealthCheckBlockingFirewallRulesList() { + return healthCheckBlockingFirewallRules_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return The count of healthCheckBlockingFirewallRules. + */ + public int getHealthCheckBlockingFirewallRulesCount() { + return healthCheckBlockingFirewallRules_.size(); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the element to return. + * @return The healthCheckBlockingFirewallRules at the given index. + */ + public java.lang.String getHealthCheckBlockingFirewallRules(int index) { + return healthCheckBlockingFirewallRules_.get(index); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckBlockingFirewallRules at the given index. + */ + public com.google.protobuf.ByteString getHealthCheckBlockingFirewallRulesBytes(int index) { + return healthCheckBlockingFirewallRules_.getByteString(index); + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index to set the value at. + * @param value The healthCheckBlockingFirewallRules to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckBlockingFirewallRules(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param value The healthCheckBlockingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckBlockingFirewallRules(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param values The healthCheckBlockingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addAllHealthCheckBlockingFirewallRules( + java.lang.Iterable values) { + ensureHealthCheckBlockingFirewallRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, healthCheckBlockingFirewallRules_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckBlockingFirewallRules() { + healthCheckBlockingFirewallRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of firewall rule URIs blocking probes from health check IP ranges.
+     * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param value The bytes of the healthCheckBlockingFirewallRules to add. + * @return This builder for chaining. + */ + public Builder addHealthCheckBlockingFirewallRulesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHealthCheckBlockingFirewallRulesIsMutable(); + healthCheckBlockingFirewallRules_.add(value); + 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.networkmanagement.v1beta1.LoadBalancerBackend) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) + private static final com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoadBalancerBackend parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LoadBalancerBackend(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.LoadBalancerBackend + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerBackendOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerBackendOrBuilder.java new file mode 100644 index 00000000..e8fe035f --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerBackendOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface LoadBalancerBackendOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine instance or network endpoint.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine instance or network endpoint.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The enum numeric value on the wire for healthCheckFirewallState. + */ + int getHealthCheckFirewallStateValue(); + /** + * + * + *
+   * State of the health check firewall configuration.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * + * + * @return The healthCheckFirewallState. + */ + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + getHealthCheckFirewallState(); + + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return A list containing the healthCheckAllowingFirewallRules. + */ + java.util.List getHealthCheckAllowingFirewallRulesList(); + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @return The count of healthCheckAllowingFirewallRules. + */ + int getHealthCheckAllowingFirewallRulesCount(); + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the element to return. + * @return The healthCheckAllowingFirewallRules at the given index. + */ + java.lang.String getHealthCheckAllowingFirewallRules(int index); + /** + * + * + *
+   * A list of firewall rule URIs allowing probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_allowing_firewall_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckAllowingFirewallRules at the given index. + */ + com.google.protobuf.ByteString getHealthCheckAllowingFirewallRulesBytes(int index); + + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return A list containing the healthCheckBlockingFirewallRules. + */ + java.util.List getHealthCheckBlockingFirewallRulesList(); + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @return The count of healthCheckBlockingFirewallRules. + */ + int getHealthCheckBlockingFirewallRulesCount(); + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the element to return. + * @return The healthCheckBlockingFirewallRules at the given index. + */ + java.lang.String getHealthCheckBlockingFirewallRules(int index); + /** + * + * + *
+   * A list of firewall rule URIs blocking probes from health check IP ranges.
+   * 
+ * + * repeated string health_check_blocking_firewall_rules = 5; + * + * @param index The index of the value to return. + * @return The bytes of the healthCheckBlockingFirewallRules at the given index. + */ + com.google.protobuf.ByteString getHealthCheckBlockingFirewallRulesBytes(int index); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfo.java new file mode 100644 index 00000000..cbd37d40 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfo.java @@ -0,0 +1,2087 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a load balancer.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} + */ +public final class LoadBalancerInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) + LoadBalancerInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoadBalancerInfo.newBuilder() to construct. + private LoadBalancerInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoadBalancerInfo() { + loadBalancerType_ = 0; + healthCheckUri_ = ""; + backends_ = java.util.Collections.emptyList(); + backendType_ = 0; + backendUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoadBalancerInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LoadBalancerInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + loadBalancerType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + healthCheckUri_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + backends_ = + new java.util.ArrayList< + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend>(); + mutable_bitField0_ |= 0x00000001; + } + backends_.add( + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.parser(), + extensionRegistry)); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + backendType_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + backendUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + backends_ = java.util.Collections.unmodifiableList(backends_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.class, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.Builder.class); + } + + /** + * + * + *
+   * The type definition for a load balancer:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType} + */ + public enum LoadBalancerType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + */ + LOAD_BALANCER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Internal TCP/UDP load balancer.
+     * 
+ * + * INTERNAL_TCP_UDP = 1; + */ + INTERNAL_TCP_UDP(1), + /** + * + * + *
+     * Network TCP/UDP load balancer.
+     * 
+ * + * NETWORK_TCP_UDP = 2; + */ + NETWORK_TCP_UDP(2), + /** + * + * + *
+     * HTTP(S) proxy load balancer.
+     * 
+ * + * HTTP_PROXY = 3; + */ + HTTP_PROXY(3), + /** + * + * + *
+     * TCP proxy load balancer.
+     * 
+ * + * TCP_PROXY = 4; + */ + TCP_PROXY(4), + /** + * + * + *
+     * SSL proxy load balancer.
+     * 
+ * + * SSL_PROXY = 5; + */ + SSL_PROXY(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + */ + public static final int LOAD_BALANCER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Internal TCP/UDP load balancer.
+     * 
+ * + * INTERNAL_TCP_UDP = 1; + */ + public static final int INTERNAL_TCP_UDP_VALUE = 1; + /** + * + * + *
+     * Network TCP/UDP load balancer.
+     * 
+ * + * NETWORK_TCP_UDP = 2; + */ + public static final int NETWORK_TCP_UDP_VALUE = 2; + /** + * + * + *
+     * HTTP(S) proxy load balancer.
+     * 
+ * + * HTTP_PROXY = 3; + */ + public static final int HTTP_PROXY_VALUE = 3; + /** + * + * + *
+     * TCP proxy load balancer.
+     * 
+ * + * TCP_PROXY = 4; + */ + public static final int TCP_PROXY_VALUE = 4; + /** + * + * + *
+     * SSL proxy load balancer.
+     * 
+ * + * SSL_PROXY = 5; + */ + public static final int SSL_PROXY_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 LoadBalancerType 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 LoadBalancerType forNumber(int value) { + switch (value) { + case 0: + return LOAD_BALANCER_TYPE_UNSPECIFIED; + case 1: + return INTERNAL_TCP_UDP; + case 2: + return NETWORK_TCP_UDP; + case 3: + return HTTP_PROXY; + case 4: + return TCP_PROXY; + case 5: + return SSL_PROXY; + 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 LoadBalancerType findValueByNumber(int number) { + return LoadBalancerType.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.networkmanagement.v1beta1.LoadBalancerInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final LoadBalancerType[] VALUES = values(); + + public static LoadBalancerType 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 LoadBalancerType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType) + } + + /** + * + * + *
+   * The type definition for a load balancer backend configuration:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType} + */ + public enum BackendType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * BACKEND_TYPE_UNSPECIFIED = 0; + */ + BACKEND_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Backend Service as the load balancer's backend.
+     * 
+ * + * BACKEND_SERVICE = 1; + */ + BACKEND_SERVICE(1), + /** + * + * + *
+     * Target Pool as the load balancer's backend.
+     * 
+ * + * TARGET_POOL = 2; + */ + TARGET_POOL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type is unspecified.
+     * 
+ * + * BACKEND_TYPE_UNSPECIFIED = 0; + */ + public static final int BACKEND_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Backend Service as the load balancer's backend.
+     * 
+ * + * BACKEND_SERVICE = 1; + */ + public static final int BACKEND_SERVICE_VALUE = 1; + /** + * + * + *
+     * Target Pool as the load balancer's backend.
+     * 
+ * + * TARGET_POOL = 2; + */ + public static final int TARGET_POOL_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 BackendType 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 BackendType forNumber(int value) { + switch (value) { + case 0: + return BACKEND_TYPE_UNSPECIFIED; + case 1: + return BACKEND_SERVICE; + case 2: + return TARGET_POOL; + 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 BackendType findValueByNumber(int number) { + return BackendType.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.networkmanagement.v1beta1.LoadBalancerInfo.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final BackendType[] VALUES = values(); + + public static BackendType 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 BackendType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType) + } + + public static final int LOAD_BALANCER_TYPE_FIELD_NUMBER = 1; + private int loadBalancerType_; + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The enum numeric value on the wire for loadBalancerType. + */ + @java.lang.Override + public int getLoadBalancerTypeValue() { + return loadBalancerType_; + } + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The loadBalancerType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType + getLoadBalancerType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType result = + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType.valueOf( + loadBalancerType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType.UNRECOGNIZED + : result; + } + + public static final int HEALTH_CHECK_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object healthCheckUri_; + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The healthCheckUri. + */ + @java.lang.Override + public java.lang.String getHealthCheckUri() { + java.lang.Object ref = healthCheckUri_; + 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(); + healthCheckUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The bytes for healthCheckUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHealthCheckUriBytes() { + java.lang.Object ref = healthCheckUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthCheckUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKENDS_FIELD_NUMBER = 3; + private java.util.List backends_; + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public java.util.List + getBackendsList() { + return backends_; + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendOrBuilder> + getBackendsOrBuilderList() { + return backends_; + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public int getBackendsCount() { + return backends_.size(); + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend getBackends(int index) { + return backends_.get(index); + } + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendOrBuilder + getBackendsOrBuilder(int index) { + return backends_.get(index); + } + + public static final int BACKEND_TYPE_FIELD_NUMBER = 4; + private int backendType_; + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The enum numeric value on the wire for backendType. + */ + @java.lang.Override + public int getBackendTypeValue() { + return backendType_; + } + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The backendType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType getBackendType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType result = + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType.valueOf( + backendType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType.UNRECOGNIZED + : result; + } + + public static final int BACKEND_URI_FIELD_NUMBER = 5; + private volatile java.lang.Object backendUri_; + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The backendUri. + */ + @java.lang.Override + public java.lang.String getBackendUri() { + java.lang.Object ref = backendUri_; + 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(); + backendUri_ = s; + return s; + } + } + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The bytes for backendUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackendUriBytes() { + java.lang.Object ref = backendUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backendUri_ = 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 (loadBalancerType_ + != com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType + .LOAD_BALANCER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, loadBalancerType_); + } + if (!getHealthCheckUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, healthCheckUri_); + } + for (int i = 0; i < backends_.size(); i++) { + output.writeMessage(3, backends_.get(i)); + } + if (backendType_ + != com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType + .BACKEND_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, backendType_); + } + if (!getBackendUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, backendUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (loadBalancerType_ + != com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType + .LOAD_BALANCER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, loadBalancerType_); + } + if (!getHealthCheckUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, healthCheckUri_); + } + for (int i = 0; i < backends_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, backends_.get(i)); + } + if (backendType_ + != com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType + .BACKEND_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, backendType_); + } + if (!getBackendUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, backendUri_); + } + size += unknownFields.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.networkmanagement.v1beta1.LoadBalancerInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo other = + (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) obj; + + if (loadBalancerType_ != other.loadBalancerType_) return false; + if (!getHealthCheckUri().equals(other.getHealthCheckUri())) return false; + if (!getBackendsList().equals(other.getBackendsList())) return false; + if (backendType_ != other.backendType_) return false; + if (!getBackendUri().equals(other.getBackendUri())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + LOAD_BALANCER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + loadBalancerType_; + hash = (37 * hash) + HEALTH_CHECK_URI_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheckUri().hashCode(); + if (getBackendsCount() > 0) { + hash = (37 * hash) + BACKENDS_FIELD_NUMBER; + hash = (53 * hash) + getBackendsList().hashCode(); + } + hash = (37 * hash) + BACKEND_TYPE_FIELD_NUMBER; + hash = (53 * hash) + backendType_; + hash = (37 * hash) + BACKEND_URI_FIELD_NUMBER; + hash = (53 * hash) + getBackendUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo 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.networkmanagement.v1beta1.LoadBalancerInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo 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.networkmanagement.v1beta1.LoadBalancerInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo 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.networkmanagement.v1beta1.LoadBalancerInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo 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.networkmanagement.v1beta1.LoadBalancerInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo 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.networkmanagement.v1beta1.LoadBalancerInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a load balancer.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.class, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBackendsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + loadBalancerType_ = 0; + + healthCheckUri_ = ""; + + if (backendsBuilder_ == null) { + backends_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + backendsBuilder_.clear(); + } + backendType_ = 0; + + backendUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo build() { + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo result = + new com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(this); + int from_bitField0_ = bitField0_; + result.loadBalancerType_ = loadBalancerType_; + result.healthCheckUri_ = healthCheckUri_; + if (backendsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backends_ = java.util.Collections.unmodifiableList(backends_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backends_ = backends_; + } else { + result.backends_ = backendsBuilder_.build(); + } + result.backendType_ = backendType_; + result.backendUri_ = backendUri_; + 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.networkmanagement.v1beta1.LoadBalancerInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.getDefaultInstance()) + return this; + if (other.loadBalancerType_ != 0) { + setLoadBalancerTypeValue(other.getLoadBalancerTypeValue()); + } + if (!other.getHealthCheckUri().isEmpty()) { + healthCheckUri_ = other.healthCheckUri_; + onChanged(); + } + if (backendsBuilder_ == null) { + if (!other.backends_.isEmpty()) { + if (backends_.isEmpty()) { + backends_ = other.backends_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackendsIsMutable(); + backends_.addAll(other.backends_); + } + onChanged(); + } + } else { + if (!other.backends_.isEmpty()) { + if (backendsBuilder_.isEmpty()) { + backendsBuilder_.dispose(); + backendsBuilder_ = null; + backends_ = other.backends_; + bitField0_ = (bitField0_ & ~0x00000001); + backendsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBackendsFieldBuilder() + : null; + } else { + backendsBuilder_.addAllMessages(other.backends_); + } + } + } + if (other.backendType_ != 0) { + setBackendTypeValue(other.getBackendTypeValue()); + } + if (!other.getBackendUri().isEmpty()) { + backendUri_ = other.backendUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int loadBalancerType_ = 0; + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The enum numeric value on the wire for loadBalancerType. + */ + @java.lang.Override + public int getLoadBalancerTypeValue() { + return loadBalancerType_; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @param value The enum numeric value on the wire for loadBalancerType to set. + * @return This builder for chaining. + */ + public Builder setLoadBalancerTypeValue(int value) { + + loadBalancerType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The loadBalancerType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType + getLoadBalancerType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType result = + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType.valueOf( + loadBalancerType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @param value The loadBalancerType to set. + * @return This builder for chaining. + */ + public Builder setLoadBalancerType( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType value) { + if (value == null) { + throw new NullPointerException(); + } + + loadBalancerType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the load balancer.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearLoadBalancerType() { + + loadBalancerType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object healthCheckUri_ = ""; + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @return The healthCheckUri. + */ + public java.lang.String getHealthCheckUri() { + java.lang.Object ref = healthCheckUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + healthCheckUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @return The bytes for healthCheckUri. + */ + public com.google.protobuf.ByteString getHealthCheckUriBytes() { + java.lang.Object ref = healthCheckUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthCheckUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @param value The healthCheckUri to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + healthCheckUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearHealthCheckUri() { + + healthCheckUri_ = getDefaultInstance().getHealthCheckUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the health check for the load balancer.
+     * 
+ * + * string health_check_uri = 2; + * + * @param value The bytes for healthCheckUri to set. + * @return This builder for chaining. + */ + public Builder setHealthCheckUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + healthCheckUri_ = value; + onChanged(); + return this; + } + + private java.util.List + backends_ = java.util.Collections.emptyList(); + + private void ensureBackendsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backends_ = + new java.util.ArrayList( + backends_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendOrBuilder> + backendsBuilder_; + + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public java.util.List + getBackendsList() { + if (backendsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backends_); + } else { + return backendsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public int getBackendsCount() { + if (backendsBuilder_ == null) { + return backends_.size(); + } else { + return backendsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend getBackends(int index) { + if (backendsBuilder_ == null) { + return backends_.get(index); + } else { + return backendsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public Builder setBackends( + int index, com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend value) { + if (backendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackendsIsMutable(); + backends_.set(index, value); + onChanged(); + } else { + backendsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public Builder setBackends( + int index, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder builderForValue) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.set(index, builderForValue.build()); + onChanged(); + } else { + backendsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public Builder addBackends( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend value) { + if (backendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackendsIsMutable(); + backends_.add(value); + onChanged(); + } else { + backendsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public Builder addBackends( + int index, com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend value) { + if (backendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackendsIsMutable(); + backends_.add(index, value); + onChanged(); + } else { + backendsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public Builder addBackends( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder builderForValue) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.add(builderForValue.build()); + onChanged(); + } else { + backendsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public Builder addBackends( + int index, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder builderForValue) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.add(index, builderForValue.build()); + onChanged(); + } else { + backendsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public Builder addAllBackends( + java.lang.Iterable + values) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backends_); + onChanged(); + } else { + backendsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public Builder clearBackends() { + if (backendsBuilder_ == null) { + backends_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backendsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public Builder removeBackends(int index) { + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.remove(index); + onChanged(); + } else { + backendsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder + getBackendsBuilder(int index) { + return getBackendsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendOrBuilder + getBackendsOrBuilder(int index) { + if (backendsBuilder_ == null) { + return backends_.get(index); + } else { + return backendsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendOrBuilder> + getBackendsOrBuilderList() { + if (backendsBuilder_ != null) { + return backendsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backends_); + } + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder + addBackendsBuilder() { + return getBackendsFieldBuilder() + .addBuilder( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.getDefaultInstance()); + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder + addBackendsBuilder(int index) { + return getBackendsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.getDefaultInstance()); + } + /** + * + * + *
+     * Information for the loadbalancer backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + * + */ + public java.util.List + getBackendsBuilderList() { + return getBackendsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendOrBuilder> + getBackendsFieldBuilder() { + if (backendsBuilder_ == null) { + backendsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.Builder, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendOrBuilder>( + backends_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + backends_ = null; + } + return backendsBuilder_; + } + + private int backendType_ = 0; + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The enum numeric value on the wire for backendType. + */ + @java.lang.Override + public int getBackendTypeValue() { + return backendType_; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @param value The enum numeric value on the wire for backendType to set. + * @return This builder for chaining. + */ + public Builder setBackendTypeValue(int value) { + + backendType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The backendType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType + getBackendType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType result = + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType.valueOf( + backendType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @param value The backendType to set. + * @return This builder for chaining. + */ + public Builder setBackendType( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType value) { + if (value == null) { + throw new NullPointerException(); + } + + backendType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of load balancer's backend configuration.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearBackendType() { + + backendType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object backendUri_ = ""; + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @return The backendUri. + */ + public java.lang.String getBackendUri() { + java.lang.Object ref = backendUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backendUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @return The bytes for backendUri. + */ + public com.google.protobuf.ByteString getBackendUriBytes() { + java.lang.Object ref = backendUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backendUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @param value The backendUri to set. + * @return This builder for chaining. + */ + public Builder setBackendUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + backendUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearBackendUri() { + + backendUri_ = getDefaultInstance().getBackendUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Backend configuration URI.
+     * 
+ * + * string backend_uri = 5; + * + * @param value The bytes for backendUri to set. + * @return This builder for chaining. + */ + public Builder setBackendUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + backendUri_ = value; + 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.networkmanagement.v1beta1.LoadBalancerInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) + private static final com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoadBalancerInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LoadBalancerInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.LoadBalancerInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfoOrBuilder.java new file mode 100644 index 00000000..84015c49 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfoOrBuilder.java @@ -0,0 +1,185 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface LoadBalancerInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The enum numeric value on the wire for loadBalancerType. + */ + int getLoadBalancerTypeValue(); + /** + * + * + *
+   * Type of the load balancer.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * + * + * @return The loadBalancerType. + */ + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType + getLoadBalancerType(); + + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The healthCheckUri. + */ + java.lang.String getHealthCheckUri(); + /** + * + * + *
+   * URI of the health check for the load balancer.
+   * 
+ * + * string health_check_uri = 2; + * + * @return The bytes for healthCheckUri. + */ + com.google.protobuf.ByteString getHealthCheckUriBytes(); + + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + java.util.List getBackendsList(); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend getBackends(int index); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + int getBackendsCount(); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + java.util.List + getBackendsOrBuilderList(); + /** + * + * + *
+   * Information for the loadbalancer backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.LoadBalancerBackend backends = 3; + */ + com.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendOrBuilder getBackendsOrBuilder( + int index); + + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The enum numeric value on the wire for backendType. + */ + int getBackendTypeValue(); + /** + * + * + *
+   * Type of load balancer's backend configuration.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType backend_type = 4; + * + * + * @return The backendType. + */ + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType getBackendType(); + + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The backendUri. + */ + java.lang.String getBackendUri(); + /** + * + * + *
+   * Backend configuration URI.
+   * 
+ * + * string backend_uri = 5; + * + * @return The bytes for backendUri. + */ + com.google.protobuf.ByteString getBackendUriBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/NetworkInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/NetworkInfo.java new file mode 100644 index 00000000..316d99f1 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/NetworkInfo.java @@ -0,0 +1,995 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine network.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.NetworkInfo} + */ +public final class NetworkInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.NetworkInfo) + NetworkInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkInfo.newBuilder() to construct. + private NetworkInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkInfo() { + displayName_ = ""; + uri_ = ""; + matchedIpRange_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NetworkInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + matchedIpRange_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.class, + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHED_IP_RANGE_FIELD_NUMBER = 4; + private volatile java.lang.Object matchedIpRange_; + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The matchedIpRange. + */ + @java.lang.Override + public java.lang.String getMatchedIpRange() { + java.lang.Object ref = matchedIpRange_; + 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(); + matchedIpRange_ = s; + return s; + } + } + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The bytes for matchedIpRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchedIpRangeBytes() { + java.lang.Object ref = matchedIpRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedIpRange_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getMatchedIpRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, matchedIpRange_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getMatchedIpRangeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, matchedIpRange_); + } + size += unknownFields.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.networkmanagement.v1beta1.NetworkInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.NetworkInfo other = + (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getMatchedIpRange().equals(other.getMatchedIpRange())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + MATCHED_IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getMatchedIpRange().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.NetworkInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.NetworkInfo 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.networkmanagement.v1beta1.NetworkInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.NetworkInfo 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.networkmanagement.v1beta1.NetworkInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.NetworkInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.NetworkInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.NetworkInfo 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.networkmanagement.v1beta1.NetworkInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.NetworkInfo 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.networkmanagement.v1beta1.NetworkInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.NetworkInfo 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.networkmanagement.v1beta1.NetworkInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine network.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.NetworkInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.NetworkInfo) + com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.class, + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.NetworkInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + matchedIpRange_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.NetworkInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.NetworkInfo build() { + com.google.cloud.networkmanagement.v1beta1.NetworkInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.NetworkInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.NetworkInfo result = + new com.google.cloud.networkmanagement.v1beta1.NetworkInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.matchedIpRange_ = matchedIpRange_; + 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.networkmanagement.v1beta1.NetworkInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.NetworkInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.NetworkInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getMatchedIpRange().isEmpty()) { + matchedIpRange_ = other.matchedIpRange_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.NetworkInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine network.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object matchedIpRange_ = ""; + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @return The matchedIpRange. + */ + public java.lang.String getMatchedIpRange() { + java.lang.Object ref = matchedIpRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchedIpRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @return The bytes for matchedIpRange. + */ + public com.google.protobuf.ByteString getMatchedIpRangeBytes() { + java.lang.Object ref = matchedIpRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchedIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @param value The matchedIpRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + matchedIpRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @return This builder for chaining. + */ + public Builder clearMatchedIpRange() { + + matchedIpRange_ = getDefaultInstance().getMatchedIpRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range that matches the test.
+     * 
+ * + * string matched_ip_range = 4; + * + * @param value The bytes for matchedIpRange to set. + * @return This builder for chaining. + */ + public Builder setMatchedIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + matchedIpRange_ = value; + 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.networkmanagement.v1beta1.NetworkInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.NetworkInfo) + private static final com.google.cloud.networkmanagement.v1beta1.NetworkInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.NetworkInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.NetworkInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.NetworkInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/NetworkInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/NetworkInfoOrBuilder.java new file mode 100644 index 00000000..8d394499 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/NetworkInfoOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface NetworkInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.NetworkInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine network.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The matchedIpRange. + */ + java.lang.String getMatchedIpRange(); + /** + * + * + *
+   * The IP range that matches the test.
+   * 
+ * + * string matched_ip_range = 4; + * + * @return The bytes for matchedIpRange. + */ + com.google.protobuf.ByteString getMatchedIpRangeBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/OperationMetadata.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/OperationMetadata.java new file mode 100644 index 00000000..018b357a --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/OperationMetadata.java @@ -0,0 +1,1814 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Metadata describing an [Operation][google.longrunning.Operation]
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.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_ = ""; + statusDetail_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + verb_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + statusDetail_ = s; + break; + } + case 48: + { + cancelRequested_ = input.readBool(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.OperationMetadata.class, + com.google.cloud.networkmanagement.v1beta1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Target of the operation - for example
+   * projects/project-1/locations/global/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * + * @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; + } + } + /** + * + * + *
+   * Target of the operation - for example
+   * projects/project-1/locations/global/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * + * @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; + private volatile java.lang.Object verb_; + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @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; + } + } + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @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_DETAIL_FIELD_NUMBER = 5; + private volatile java.lang.Object statusDetail_; + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + @java.lang.Override + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + 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(); + statusDetail_ = s; + return s; + } + } + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CANCEL_REQUESTED_FIELD_NUMBER = 6; + private boolean cancelRequested_; + /** + * + * + *
+   * Specifies if cancellation was requested for the operation.
+   * 
+ * + * bool cancel_requested = 6; + * + * @return The cancelRequested. + */ + @java.lang.Override + public boolean getCancelRequested() { + return cancelRequested_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + * + * + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * + * @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; + } + } + /** + * + * + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * + * @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 (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!getVerbBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!getStatusDetailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusDetail_); + } + if (cancelRequested_ != false) { + output.writeBool(6, cancelRequested_); + } + if (!getApiVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + unknownFields.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 (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!getVerbBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!getStatusDetailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusDetail_); + } + if (cancelRequested_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, cancelRequested_); + } + if (!getApiVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += unknownFields.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.networkmanagement.v1beta1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.OperationMetadata other = + (com.google.cloud.networkmanagement.v1beta1.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 (!getStatusDetail().equals(other.getStatusDetail())) return false; + if (getCancelRequested() != other.getCancelRequested()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) 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_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getStatusDetail().hashCode(); + hash = (37 * hash) + CANCEL_REQUESTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCancelRequested()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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; + } + /** + * + * + *
+   * Metadata describing an [Operation][google.longrunning.Operation]
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.OperationMetadata) + com.google.cloud.networkmanagement.v1beta1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.OperationMetadata.class, + com.google.cloud.networkmanagement.v1beta1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusDetail_ = ""; + + cancelRequested_ = false; + + apiVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.OperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.OperationMetadata build() { + com.google.cloud.networkmanagement.v1beta1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.OperationMetadata buildPartial() { + com.google.cloud.networkmanagement.v1beta1.OperationMetadata result = + new com.google.cloud.networkmanagement.v1beta1.OperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusDetail_ = statusDetail_; + result.cancelRequested_ = cancelRequested_; + result.apiVersion_ = apiVersion_; + 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.networkmanagement.v1beta1.OperationMetadata) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.OperationMetadata other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusDetail().isEmpty()) { + statusDetail_ = other.statusDetail_; + onChanged(); + } + if (other.getCancelRequested() != false) { + setCancelRequested(other.getCancelRequested()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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_; + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @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(); + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + 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_; + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @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(); + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + 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_ = ""; + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @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; + } + } + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @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; + } + } + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Target of the operation - for example
+     * projects/project-1/locations/global/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object statusDetail_ = ""; + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @param value The statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusDetail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @return This builder for chaining. + */ + public Builder clearStatusDetail() { + + statusDetail_ = getDefaultInstance().getStatusDetail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * + * @param value The bytes for statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusDetail_ = value; + onChanged(); + return this; + } + + private boolean cancelRequested_; + /** + * + * + *
+     * Specifies if cancellation was requested for the operation.
+     * 
+ * + * bool cancel_requested = 6; + * + * @return The cancelRequested. + */ + @java.lang.Override + public boolean getCancelRequested() { + return cancelRequested_; + } + /** + * + * + *
+     * Specifies if cancellation was requested for the operation.
+     * 
+ * + * bool cancel_requested = 6; + * + * @param value The cancelRequested to set. + * @return This builder for chaining. + */ + public Builder setCancelRequested(boolean value) { + + cancelRequested_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if cancellation was requested for the operation.
+     * 
+ * + * bool cancel_requested = 6; + * + * @return This builder for chaining. + */ + public Builder clearCancelRequested() { + + cancelRequested_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @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; + } + } + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @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; + } + } + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * + * @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; + 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.networkmanagement.v1beta1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.OperationMetadata) + private static final com.google.cloud.networkmanagement.v1beta1.OperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.OperationMetadata(); + } + + public static com.google.cloud.networkmanagement.v1beta1.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 { + return new OperationMetadata(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/OperationMetadataOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..a8f911a5 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/OperationMetadataOrBuilder.java @@ -0,0 +1,210 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Target of the operation - for example
+   * projects/project-1/locations/global/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Target of the operation - for example
+   * projects/project-1/locations/global/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + java.lang.String getStatusDetail(); + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + com.google.protobuf.ByteString getStatusDetailBytes(); + + /** + * + * + *
+   * Specifies if cancellation was requested for the operation.
+   * 
+ * + * bool cancel_requested = 6; + * + * @return The cancelRequested. + */ + boolean getCancelRequested(); + + /** + * + * + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ProbingDetails.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ProbingDetails.java new file mode 100644 index 00000000..55d09812 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ProbingDetails.java @@ -0,0 +1,2477 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Results of active probing from the last run of the test.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ProbingDetails} + */ +public final class ProbingDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.ProbingDetails) + ProbingDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProbingDetails.newBuilder() to construct. + private ProbingDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProbingDetails() { + result_ = 0; + abortCause_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProbingDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ProbingDetails( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + result_ = rawValue; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (verifyTime_ != null) { + subBuilder = verifyTime_.toBuilder(); + } + verifyTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(verifyTime_); + verifyTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + int rawValue = input.readEnum(); + + abortCause_ = rawValue; + break; + } + case 40: + { + sentProbeCount_ = input.readInt32(); + break; + } + case 48: + { + successfulProbeCount_ = input.readInt32(); + break; + } + case 58: + { + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder subBuilder = null; + if (endpointInfo_ != null) { + subBuilder = endpointInfo_.toBuilder(); + } + endpointInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endpointInfo_); + endpointInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.Builder subBuilder = + null; + if (probingLatency_ != null) { + subBuilder = probingLatency_.toBuilder(); + } + probingLatency_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(probingLatency_); + probingLatency_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ProbingDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ProbingDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.class, + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.Builder.class); + } + + /** + * + * + *
+   * Overall probing result of the test.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult} + */ + public enum ProbingResult implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No result was specified.
+     * 
+ * + * PROBING_RESULT_UNSPECIFIED = 0; + */ + PROBING_RESULT_UNSPECIFIED(0), + /** + * + * + *
+     * At least 95% of packets reached the destination.
+     * 
+ * + * REACHABLE = 1; + */ + REACHABLE(1), + /** + * + * + *
+     * No packets reached the destination.
+     * 
+ * + * UNREACHABLE = 2; + */ + UNREACHABLE(2), + /** + * + * + *
+     * Less than 95% of packets reached the destination.
+     * 
+ * + * REACHABILITY_INCONSISTENT = 3; + */ + REACHABILITY_INCONSISTENT(3), + /** + * + * + *
+     * Reachability could not be determined. Possible reasons are:
+     * * The user lacks permission to access some of the network resources
+     *   required to run the test.
+     * * No valid source endpoint could be derived from the request.
+     * * An internal error occurred.
+     * 
+ * + * UNDETERMINED = 4; + */ + UNDETERMINED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No result was specified.
+     * 
+ * + * PROBING_RESULT_UNSPECIFIED = 0; + */ + public static final int PROBING_RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * At least 95% of packets reached the destination.
+     * 
+ * + * REACHABLE = 1; + */ + public static final int REACHABLE_VALUE = 1; + /** + * + * + *
+     * No packets reached the destination.
+     * 
+ * + * UNREACHABLE = 2; + */ + public static final int UNREACHABLE_VALUE = 2; + /** + * + * + *
+     * Less than 95% of packets reached the destination.
+     * 
+ * + * REACHABILITY_INCONSISTENT = 3; + */ + public static final int REACHABILITY_INCONSISTENT_VALUE = 3; + /** + * + * + *
+     * Reachability could not be determined. Possible reasons are:
+     * * The user lacks permission to access some of the network resources
+     *   required to run the test.
+     * * No valid source endpoint could be derived from the request.
+     * * An internal error occurred.
+     * 
+ * + * UNDETERMINED = 4; + */ + public static final int UNDETERMINED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProbingResult 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 ProbingResult forNumber(int value) { + switch (value) { + case 0: + return PROBING_RESULT_UNSPECIFIED; + case 1: + return REACHABLE; + case 2: + return UNREACHABLE; + case 3: + return REACHABILITY_INCONSISTENT; + case 4: + return UNDETERMINED; + 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 ProbingResult findValueByNumber(int number) { + return ProbingResult.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.networkmanagement.v1beta1.ProbingDetails.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ProbingResult[] VALUES = values(); + + public static ProbingResult 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 ProbingResult(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult) + } + + /** + * + * + *
+   * Abort cause types.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause} + */ + public enum ProbingAbortCause implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No reason was specified.
+     * 
+ * + * PROBING_ABORT_CAUSE_UNSPECIFIED = 0; + */ + PROBING_ABORT_CAUSE_UNSPECIFIED(0), + /** + * + * + *
+     * The user lacks permission to access some of the
+     * network resources required to run the test.
+     * 
+ * + * PERMISSION_DENIED = 1; + */ + PERMISSION_DENIED(1), + /** + * + * + *
+     * No valid source endpoint could be derived from the request.
+     * 
+ * + * NO_SOURCE_LOCATION = 2; + */ + NO_SOURCE_LOCATION(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No reason was specified.
+     * 
+ * + * PROBING_ABORT_CAUSE_UNSPECIFIED = 0; + */ + public static final int PROBING_ABORT_CAUSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The user lacks permission to access some of the
+     * network resources required to run the test.
+     * 
+ * + * PERMISSION_DENIED = 1; + */ + public static final int PERMISSION_DENIED_VALUE = 1; + /** + * + * + *
+     * No valid source endpoint could be derived from the request.
+     * 
+ * + * NO_SOURCE_LOCATION = 2; + */ + public static final int NO_SOURCE_LOCATION_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 ProbingAbortCause 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 ProbingAbortCause forNumber(int value) { + switch (value) { + case 0: + return PROBING_ABORT_CAUSE_UNSPECIFIED; + case 1: + return PERMISSION_DENIED; + case 2: + return NO_SOURCE_LOCATION; + 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 ProbingAbortCause findValueByNumber(int number) { + return ProbingAbortCause.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.networkmanagement.v1beta1.ProbingDetails.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final ProbingAbortCause[] VALUES = values(); + + public static ProbingAbortCause 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 ProbingAbortCause(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause) + } + + public static final int RESULT_FIELD_NUMBER = 1; + private int result_; + /** + * + * + *
+   * The overall result of active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = 1; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+   * The overall result of active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = 1; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult getResult() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult.valueOf(result_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult.UNRECOGNIZED + : result; + } + + public static final int VERIFY_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp verifyTime_; + /** + * + * + *
+   * The time that reachability was assessed through active probing.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + @java.lang.Override + public boolean hasVerifyTime() { + return verifyTime_ != null; + } + /** + * + * + *
+   * The time that reachability was assessed through active probing.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getVerifyTime() { + return verifyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : verifyTime_; + } + /** + * + * + *
+   * The time that reachability was assessed through active probing.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + return getVerifyTime(); + } + + public static final int ERROR_FIELD_NUMBER = 3; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Details about an internal failure or the cancellation of active probing.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Details about an internal failure or the cancellation of active probing.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Details about an internal failure or the cancellation of active probing.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int ABORT_CAUSE_FIELD_NUMBER = 4; + private int abortCause_; + /** + * + * + *
+   * The reason probing was aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * + * + * @return The enum numeric value on the wire for abortCause. + */ + @java.lang.Override + public int getAbortCauseValue() { + return abortCause_; + } + /** + * + * + *
+   * The reason probing was aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * + * + * @return The abortCause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause + getAbortCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause result = + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause.valueOf( + abortCause_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause.UNRECOGNIZED + : result; + } + + public static final int SENT_PROBE_COUNT_FIELD_NUMBER = 5; + private int sentProbeCount_; + /** + * + * + *
+   * Number of probes sent.
+   * 
+ * + * int32 sent_probe_count = 5; + * + * @return The sentProbeCount. + */ + @java.lang.Override + public int getSentProbeCount() { + return sentProbeCount_; + } + + public static final int SUCCESSFUL_PROBE_COUNT_FIELD_NUMBER = 6; + private int successfulProbeCount_; + /** + * + * + *
+   * Number of probes that reached the destination.
+   * 
+ * + * int32 successful_probe_count = 6; + * + * @return The successfulProbeCount. + */ + @java.lang.Override + public int getSuccessfulProbeCount() { + return successfulProbeCount_; + } + + public static final int ENDPOINT_INFO_FIELD_NUMBER = 7; + private com.google.cloud.networkmanagement.v1beta1.EndpointInfo endpointInfo_; + /** + * + * + *
+   * The source and destination endpoints derived from the test input and used
+   * for active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + * + * @return Whether the endpointInfo field is set. + */ + @java.lang.Override + public boolean hasEndpointInfo() { + return endpointInfo_ != null; + } + /** + * + * + *
+   * The source and destination endpoints derived from the test input and used
+   * for active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + * + * @return The endpointInfo. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo getEndpointInfo() { + return endpointInfo_ == null + ? com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } + /** + * + * + *
+   * The source and destination endpoints derived from the test input and used
+   * for active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder + getEndpointInfoOrBuilder() { + return getEndpointInfo(); + } + + public static final int PROBING_LATENCY_FIELD_NUMBER = 8; + private com.google.cloud.networkmanagement.v1beta1.LatencyDistribution probingLatency_; + /** + * + * + *
+   * Latency as measured by active probing in one direction:
+   * from the source to the destination endpoint.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + * + * @return Whether the probingLatency field is set. + */ + @java.lang.Override + public boolean hasProbingLatency() { + return probingLatency_ != null; + } + /** + * + * + *
+   * Latency as measured by active probing in one direction:
+   * from the source to the destination endpoint.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + * + * @return The probingLatency. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyDistribution getProbingLatency() { + return probingLatency_ == null + ? com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.getDefaultInstance() + : probingLatency_; + } + /** + * + * + *
+   * Latency as measured by active probing in one direction:
+   * from the source to the destination endpoint.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LatencyDistributionOrBuilder + getProbingLatencyOrBuilder() { + return getProbingLatency(); + } + + 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 (result_ + != com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult + .PROBING_RESULT_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, result_); + } + if (verifyTime_ != null) { + output.writeMessage(2, getVerifyTime()); + } + if (error_ != null) { + output.writeMessage(3, getError()); + } + if (abortCause_ + != com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause + .PROBING_ABORT_CAUSE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, abortCause_); + } + if (sentProbeCount_ != 0) { + output.writeInt32(5, sentProbeCount_); + } + if (successfulProbeCount_ != 0) { + output.writeInt32(6, successfulProbeCount_); + } + if (endpointInfo_ != null) { + output.writeMessage(7, getEndpointInfo()); + } + if (probingLatency_ != null) { + output.writeMessage(8, getProbingLatency()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (result_ + != com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult + .PROBING_RESULT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, result_); + } + if (verifyTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVerifyTime()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getError()); + } + if (abortCause_ + != com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause + .PROBING_ABORT_CAUSE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, abortCause_); + } + if (sentProbeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, sentProbeCount_); + } + if (successfulProbeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, successfulProbeCount_); + } + if (endpointInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEndpointInfo()); + } + if (probingLatency_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getProbingLatency()); + } + size += unknownFields.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.networkmanagement.v1beta1.ProbingDetails)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.ProbingDetails other = + (com.google.cloud.networkmanagement.v1beta1.ProbingDetails) obj; + + if (result_ != other.result_) return false; + if (hasVerifyTime() != other.hasVerifyTime()) return false; + if (hasVerifyTime()) { + if (!getVerifyTime().equals(other.getVerifyTime())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (abortCause_ != other.abortCause_) return false; + if (getSentProbeCount() != other.getSentProbeCount()) return false; + if (getSuccessfulProbeCount() != other.getSuccessfulProbeCount()) return false; + if (hasEndpointInfo() != other.hasEndpointInfo()) return false; + if (hasEndpointInfo()) { + if (!getEndpointInfo().equals(other.getEndpointInfo())) return false; + } + if (hasProbingLatency() != other.hasProbingLatency()) return false; + if (hasProbingLatency()) { + if (!getProbingLatency().equals(other.getProbingLatency())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; + if (hasVerifyTime()) { + hash = (37 * hash) + VERIFY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getVerifyTime().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (37 * hash) + ABORT_CAUSE_FIELD_NUMBER; + hash = (53 * hash) + abortCause_; + hash = (37 * hash) + SENT_PROBE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSentProbeCount(); + hash = (37 * hash) + SUCCESSFUL_PROBE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSuccessfulProbeCount(); + if (hasEndpointInfo()) { + hash = (37 * hash) + ENDPOINT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getEndpointInfo().hashCode(); + } + if (hasProbingLatency()) { + hash = (37 * hash) + PROBING_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + getProbingLatency().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.ProbingDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ProbingDetails 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.networkmanagement.v1beta1.ProbingDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ProbingDetails 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.networkmanagement.v1beta1.ProbingDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ProbingDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.ProbingDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ProbingDetails 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.networkmanagement.v1beta1.ProbingDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ProbingDetails 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.networkmanagement.v1beta1.ProbingDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ProbingDetails 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.networkmanagement.v1beta1.ProbingDetails 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; + } + /** + * + * + *
+   * Results of active probing from the last run of the test.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ProbingDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.ProbingDetails) + com.google.cloud.networkmanagement.v1beta1.ProbingDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ProbingDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ProbingDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.class, + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.ProbingDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + result_ = 0; + + if (verifyTimeBuilder_ == null) { + verifyTime_ = null; + } else { + verifyTime_ = null; + verifyTimeBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + abortCause_ = 0; + + sentProbeCount_ = 0; + + successfulProbeCount_ = 0; + + if (endpointInfoBuilder_ == null) { + endpointInfo_ = null; + } else { + endpointInfo_ = null; + endpointInfoBuilder_ = null; + } + if (probingLatencyBuilder_ == null) { + probingLatency_ = null; + } else { + probingLatency_ = null; + probingLatencyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ProbingDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.ProbingDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails build() { + com.google.cloud.networkmanagement.v1beta1.ProbingDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails buildPartial() { + com.google.cloud.networkmanagement.v1beta1.ProbingDetails result = + new com.google.cloud.networkmanagement.v1beta1.ProbingDetails(this); + result.result_ = result_; + if (verifyTimeBuilder_ == null) { + result.verifyTime_ = verifyTime_; + } else { + result.verifyTime_ = verifyTimeBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + result.abortCause_ = abortCause_; + result.sentProbeCount_ = sentProbeCount_; + result.successfulProbeCount_ = successfulProbeCount_; + if (endpointInfoBuilder_ == null) { + result.endpointInfo_ = endpointInfo_; + } else { + result.endpointInfo_ = endpointInfoBuilder_.build(); + } + if (probingLatencyBuilder_ == null) { + result.probingLatency_ = probingLatency_; + } else { + result.probingLatency_ = probingLatencyBuilder_.build(); + } + 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.networkmanagement.v1beta1.ProbingDetails) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.ProbingDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.ProbingDetails other) { + if (other == com.google.cloud.networkmanagement.v1beta1.ProbingDetails.getDefaultInstance()) + return this; + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + if (other.hasVerifyTime()) { + mergeVerifyTime(other.getVerifyTime()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.abortCause_ != 0) { + setAbortCauseValue(other.getAbortCauseValue()); + } + if (other.getSentProbeCount() != 0) { + setSentProbeCount(other.getSentProbeCount()); + } + if (other.getSuccessfulProbeCount() != 0) { + setSuccessfulProbeCount(other.getSuccessfulProbeCount()); + } + if (other.hasEndpointInfo()) { + mergeEndpointInfo(other.getEndpointInfo()); + } + if (other.hasProbingLatency()) { + mergeProbingLatency(other.getProbingLatency()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.ProbingDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.ProbingDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int result_ = 0; + /** + * + * + *
+     * The overall result of active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = 1; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+     * The overall result of active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = 1; + * + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + + result_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The overall result of active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = 1; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult getResult() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult.valueOf(result_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The overall result of active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = 1; + * + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult( + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult value) { + if (value == null) { + throw new NullPointerException(); + } + + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The overall result of active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = 1; + * + * @return This builder for chaining. + */ + public Builder clearResult() { + + result_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp verifyTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + verifyTimeBuilder_; + /** + * + * + *
+     * The time that reachability was assessed through active probing.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + public boolean hasVerifyTime() { + return verifyTimeBuilder_ != null || verifyTime_ != null; + } + /** + * + * + *
+     * The time that reachability was assessed through active probing.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + public com.google.protobuf.Timestamp getVerifyTime() { + if (verifyTimeBuilder_ == null) { + return verifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : verifyTime_; + } else { + return verifyTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time that reachability was assessed through active probing.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder setVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + verifyTime_ = value; + onChanged(); + } else { + verifyTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time that reachability was assessed through active probing.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder setVerifyTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (verifyTimeBuilder_ == null) { + verifyTime_ = builderForValue.build(); + onChanged(); + } else { + verifyTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time that reachability was assessed through active probing.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder mergeVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (verifyTime_ != null) { + verifyTime_ = + com.google.protobuf.Timestamp.newBuilder(verifyTime_).mergeFrom(value).buildPartial(); + } else { + verifyTime_ = value; + } + onChanged(); + } else { + verifyTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time that reachability was assessed through active probing.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder clearVerifyTime() { + if (verifyTimeBuilder_ == null) { + verifyTime_ = null; + onChanged(); + } else { + verifyTime_ = null; + verifyTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time that reachability was assessed through active probing.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getVerifyTimeBuilder() { + + onChanged(); + return getVerifyTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time that reachability was assessed through active probing.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + if (verifyTimeBuilder_ != null) { + return verifyTimeBuilder_.getMessageOrBuilder(); + } else { + return verifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : verifyTime_; + } + } + /** + * + * + *
+     * The time that reachability was assessed through active probing.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getVerifyTimeFieldBuilder() { + if (verifyTimeBuilder_ == null) { + verifyTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getVerifyTime(), getParentForChildren(), isClean()); + verifyTime_ = null; + } + return verifyTimeBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Details about an internal failure or the cancellation of active probing.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * Details about an internal failure or the cancellation of active probing.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Details about an internal failure or the cancellation of active probing.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Details about an internal failure or the cancellation of active probing.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Details about an internal failure or the cancellation of active probing.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Details about an internal failure or the cancellation of active probing.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Details about an internal failure or the cancellation of active probing.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Details about an internal failure or the cancellation of active probing.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Details about an internal failure or the cancellation of active probing.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private int abortCause_ = 0; + /** + * + * + *
+     * The reason probing was aborted.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * + * + * @return The enum numeric value on the wire for abortCause. + */ + @java.lang.Override + public int getAbortCauseValue() { + return abortCause_; + } + /** + * + * + *
+     * The reason probing was aborted.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * + * + * @param value The enum numeric value on the wire for abortCause to set. + * @return This builder for chaining. + */ + public Builder setAbortCauseValue(int value) { + + abortCause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The reason probing was aborted.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * + * + * @return The abortCause. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause + getAbortCause() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause result = + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause.valueOf( + abortCause_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The reason probing was aborted.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * + * + * @param value The abortCause to set. + * @return This builder for chaining. + */ + public Builder setAbortCause( + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause value) { + if (value == null) { + throw new NullPointerException(); + } + + abortCause_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The reason probing was aborted.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearAbortCause() { + + abortCause_ = 0; + onChanged(); + return this; + } + + private int sentProbeCount_; + /** + * + * + *
+     * Number of probes sent.
+     * 
+ * + * int32 sent_probe_count = 5; + * + * @return The sentProbeCount. + */ + @java.lang.Override + public int getSentProbeCount() { + return sentProbeCount_; + } + /** + * + * + *
+     * Number of probes sent.
+     * 
+ * + * int32 sent_probe_count = 5; + * + * @param value The sentProbeCount to set. + * @return This builder for chaining. + */ + public Builder setSentProbeCount(int value) { + + sentProbeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of probes sent.
+     * 
+ * + * int32 sent_probe_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearSentProbeCount() { + + sentProbeCount_ = 0; + onChanged(); + return this; + } + + private int successfulProbeCount_; + /** + * + * + *
+     * Number of probes that reached the destination.
+     * 
+ * + * int32 successful_probe_count = 6; + * + * @return The successfulProbeCount. + */ + @java.lang.Override + public int getSuccessfulProbeCount() { + return successfulProbeCount_; + } + /** + * + * + *
+     * Number of probes that reached the destination.
+     * 
+ * + * int32 successful_probe_count = 6; + * + * @param value The successfulProbeCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessfulProbeCount(int value) { + + successfulProbeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of probes that reached the destination.
+     * 
+ * + * int32 successful_probe_count = 6; + * + * @return This builder for chaining. + */ + public Builder clearSuccessfulProbeCount() { + + successfulProbeCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.networkmanagement.v1beta1.EndpointInfo endpointInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.EndpointInfo, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder> + endpointInfoBuilder_; + /** + * + * + *
+     * The source and destination endpoints derived from the test input and used
+     * for active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + * + * @return Whether the endpointInfo field is set. + */ + public boolean hasEndpointInfo() { + return endpointInfoBuilder_ != null || endpointInfo_ != null; + } + /** + * + * + *
+     * The source and destination endpoints derived from the test input and used
+     * for active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + * + * @return The endpointInfo. + */ + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo getEndpointInfo() { + if (endpointInfoBuilder_ == null) { + return endpointInfo_ == null + ? com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } else { + return endpointInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The source and destination endpoints derived from the test input and used
+     * for active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + */ + public Builder setEndpointInfo(com.google.cloud.networkmanagement.v1beta1.EndpointInfo value) { + if (endpointInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointInfo_ = value; + onChanged(); + } else { + endpointInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The source and destination endpoints derived from the test input and used
+     * for active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + */ + public Builder setEndpointInfo( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder builderForValue) { + if (endpointInfoBuilder_ == null) { + endpointInfo_ = builderForValue.build(); + onChanged(); + } else { + endpointInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The source and destination endpoints derived from the test input and used
+     * for active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + */ + public Builder mergeEndpointInfo( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo value) { + if (endpointInfoBuilder_ == null) { + if (endpointInfo_ != null) { + endpointInfo_ = + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.newBuilder(endpointInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + endpointInfo_ = value; + } + onChanged(); + } else { + endpointInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The source and destination endpoints derived from the test input and used
+     * for active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + */ + public Builder clearEndpointInfo() { + if (endpointInfoBuilder_ == null) { + endpointInfo_ = null; + onChanged(); + } else { + endpointInfo_ = null; + endpointInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The source and destination endpoints derived from the test input and used
+     * for active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + */ + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder + getEndpointInfoBuilder() { + + onChanged(); + return getEndpointInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The source and destination endpoints derived from the test input and used
+     * for active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + */ + public com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder + getEndpointInfoOrBuilder() { + if (endpointInfoBuilder_ != null) { + return endpointInfoBuilder_.getMessageOrBuilder(); + } else { + return endpointInfo_ == null + ? com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } + } + /** + * + * + *
+     * The source and destination endpoints derived from the test input and used
+     * for active probing.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.EndpointInfo, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder> + getEndpointInfoFieldBuilder() { + if (endpointInfoBuilder_ == null) { + endpointInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.EndpointInfo, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>( + getEndpointInfo(), getParentForChildren(), isClean()); + endpointInfo_ = null; + } + return endpointInfoBuilder_; + } + + private com.google.cloud.networkmanagement.v1beta1.LatencyDistribution probingLatency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution, + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.Builder, + com.google.cloud.networkmanagement.v1beta1.LatencyDistributionOrBuilder> + probingLatencyBuilder_; + /** + * + * + *
+     * Latency as measured by active probing in one direction:
+     * from the source to the destination endpoint.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + * + * @return Whether the probingLatency field is set. + */ + public boolean hasProbingLatency() { + return probingLatencyBuilder_ != null || probingLatency_ != null; + } + /** + * + * + *
+     * Latency as measured by active probing in one direction:
+     * from the source to the destination endpoint.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + * + * @return The probingLatency. + */ + public com.google.cloud.networkmanagement.v1beta1.LatencyDistribution getProbingLatency() { + if (probingLatencyBuilder_ == null) { + return probingLatency_ == null + ? com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.getDefaultInstance() + : probingLatency_; + } else { + return probingLatencyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Latency as measured by active probing in one direction:
+     * from the source to the destination endpoint.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + */ + public Builder setProbingLatency( + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution value) { + if (probingLatencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + probingLatency_ = value; + onChanged(); + } else { + probingLatencyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Latency as measured by active probing in one direction:
+     * from the source to the destination endpoint.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + */ + public Builder setProbingLatency( + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.Builder builderForValue) { + if (probingLatencyBuilder_ == null) { + probingLatency_ = builderForValue.build(); + onChanged(); + } else { + probingLatencyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Latency as measured by active probing in one direction:
+     * from the source to the destination endpoint.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + */ + public Builder mergeProbingLatency( + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution value) { + if (probingLatencyBuilder_ == null) { + if (probingLatency_ != null) { + probingLatency_ = + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.newBuilder( + probingLatency_) + .mergeFrom(value) + .buildPartial(); + } else { + probingLatency_ = value; + } + onChanged(); + } else { + probingLatencyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Latency as measured by active probing in one direction:
+     * from the source to the destination endpoint.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + */ + public Builder clearProbingLatency() { + if (probingLatencyBuilder_ == null) { + probingLatency_ = null; + onChanged(); + } else { + probingLatency_ = null; + probingLatencyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Latency as measured by active probing in one direction:
+     * from the source to the destination endpoint.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + */ + public com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.Builder + getProbingLatencyBuilder() { + + onChanged(); + return getProbingLatencyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Latency as measured by active probing in one direction:
+     * from the source to the destination endpoint.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + */ + public com.google.cloud.networkmanagement.v1beta1.LatencyDistributionOrBuilder + getProbingLatencyOrBuilder() { + if (probingLatencyBuilder_ != null) { + return probingLatencyBuilder_.getMessageOrBuilder(); + } else { + return probingLatency_ == null + ? com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.getDefaultInstance() + : probingLatency_; + } + } + /** + * + * + *
+     * Latency as measured by active probing in one direction:
+     * from the source to the destination endpoint.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution, + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.Builder, + com.google.cloud.networkmanagement.v1beta1.LatencyDistributionOrBuilder> + getProbingLatencyFieldBuilder() { + if (probingLatencyBuilder_ == null) { + probingLatencyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution, + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution.Builder, + com.google.cloud.networkmanagement.v1beta1.LatencyDistributionOrBuilder>( + getProbingLatency(), getParentForChildren(), isClean()); + probingLatency_ = null; + } + return probingLatencyBuilder_; + } + + @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.networkmanagement.v1beta1.ProbingDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.ProbingDetails) + private static final com.google.cloud.networkmanagement.v1beta1.ProbingDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.ProbingDetails(); + } + + public static com.google.cloud.networkmanagement.v1beta1.ProbingDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProbingDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProbingDetails(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.ProbingDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ProbingDetailsOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ProbingDetailsOrBuilder.java new file mode 100644 index 00000000..3e019514 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ProbingDetailsOrBuilder.java @@ -0,0 +1,250 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface ProbingDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.ProbingDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The overall result of active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = 1; + * + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + * + * + *
+   * The overall result of active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult result = 1; + * + * @return The result. + */ + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult getResult(); + + /** + * + * + *
+   * The time that reachability was assessed through active probing.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + boolean hasVerifyTime(); + /** + * + * + *
+   * The time that reachability was assessed through active probing.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + com.google.protobuf.Timestamp getVerifyTime(); + /** + * + * + *
+   * The time that reachability was assessed through active probing.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder(); + + /** + * + * + *
+   * Details about an internal failure or the cancellation of active probing.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Details about an internal failure or the cancellation of active probing.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Details about an internal failure or the cancellation of active probing.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * The reason probing was aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * + * + * @return The enum numeric value on the wire for abortCause. + */ + int getAbortCauseValue(); + /** + * + * + *
+   * The reason probing was aborted.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * + * + * @return The abortCause. + */ + com.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause getAbortCause(); + + /** + * + * + *
+   * Number of probes sent.
+   * 
+ * + * int32 sent_probe_count = 5; + * + * @return The sentProbeCount. + */ + int getSentProbeCount(); + + /** + * + * + *
+   * Number of probes that reached the destination.
+   * 
+ * + * int32 successful_probe_count = 6; + * + * @return The successfulProbeCount. + */ + int getSuccessfulProbeCount(); + + /** + * + * + *
+   * The source and destination endpoints derived from the test input and used
+   * for active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + * + * @return Whether the endpointInfo field is set. + */ + boolean hasEndpointInfo(); + /** + * + * + *
+   * The source and destination endpoints derived from the test input and used
+   * for active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + * + * @return The endpointInfo. + */ + com.google.cloud.networkmanagement.v1beta1.EndpointInfo getEndpointInfo(); + /** + * + * + *
+   * The source and destination endpoints derived from the test input and used
+   * for active probing.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 7; + */ + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder getEndpointInfoOrBuilder(); + + /** + * + * + *
+   * Latency as measured by active probing in one direction:
+   * from the source to the destination endpoint.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + * + * @return Whether the probingLatency field is set. + */ + boolean hasProbingLatency(); + /** + * + * + *
+   * Latency as measured by active probing in one direction:
+   * from the source to the destination endpoint.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + * + * @return The probingLatency. + */ + com.google.cloud.networkmanagement.v1beta1.LatencyDistribution getProbingLatency(); + /** + * + * + *
+   * Latency as measured by active probing in one direction:
+   * from the source to the destination endpoint.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LatencyDistribution probing_latency = 8; + */ + com.google.cloud.networkmanagement.v1beta1.LatencyDistributionOrBuilder + getProbingLatencyOrBuilder(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityDetails.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityDetails.java new file mode 100644 index 00000000..31c28a7a --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityDetails.java @@ -0,0 +1,1929 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Results of the configuration analysis from the last run of the test.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ReachabilityDetails} + */ +public final class ReachabilityDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.ReachabilityDetails) + ReachabilityDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReachabilityDetails.newBuilder() to construct. + private ReachabilityDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReachabilityDetails() { + result_ = 0; + traces_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReachabilityDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReachabilityDetails( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + result_ = rawValue; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (verifyTime_ != null) { + subBuilder = verifyTime_.toBuilder(); + } + verifyTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(verifyTime_); + verifyTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + traces_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + traces_.add( + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.Trace.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + traces_ = java.util.Collections.unmodifiableList(traces_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ReachabilityDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ReachabilityDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.class, + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Builder.class); + } + + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result} + */ + public enum Result implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No result was specified.
+     * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + RESULT_UNSPECIFIED(0), + /** + * + * + *
+     * Possible scenarios are:
+     * * The configuration analysis determined that a packet originating from
+     *   the source is expected to reach the destination.
+     * * The analysis didn't complete because the user lacks permission for
+     *   some of the resources in the trace. However, at the time the user's
+     *   permission became insufficient, the trace had been successful so far.
+     * 
+ * + * REACHABLE = 1; + */ + REACHABLE(1), + /** + * + * + *
+     * A packet originating from the source is expected to be dropped before
+     * reaching the destination.
+     * 
+ * + * UNREACHABLE = 2; + */ + UNREACHABLE(2), + /** + * + * + *
+     * The source and destination endpoints do not uniquely identify
+     * the test location in the network, and the reachability result contains
+     * multiple traces. For some traces, a packet could be delivered, and for
+     * others, it would not be.
+     * 
+ * + * AMBIGUOUS = 4; + */ + AMBIGUOUS(4), + /** + * + * + *
+     * The configuration analysis did not complete. Possible reasons are:
+     * * A permissions error occurred--for example, the user might not have
+     *   read permission for all of the resources named in the test.
+     * * An internal error occurred.
+     * * The analyzer received an invalid or unsupported argument or was unable
+     *   to identify a known endpoint.
+     * 
+ * + * UNDETERMINED = 5; + */ + UNDETERMINED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No result was specified.
+     * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + public static final int RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Possible scenarios are:
+     * * The configuration analysis determined that a packet originating from
+     *   the source is expected to reach the destination.
+     * * The analysis didn't complete because the user lacks permission for
+     *   some of the resources in the trace. However, at the time the user's
+     *   permission became insufficient, the trace had been successful so far.
+     * 
+ * + * REACHABLE = 1; + */ + public static final int REACHABLE_VALUE = 1; + /** + * + * + *
+     * A packet originating from the source is expected to be dropped before
+     * reaching the destination.
+     * 
+ * + * UNREACHABLE = 2; + */ + public static final int UNREACHABLE_VALUE = 2; + /** + * + * + *
+     * The source and destination endpoints do not uniquely identify
+     * the test location in the network, and the reachability result contains
+     * multiple traces. For some traces, a packet could be delivered, and for
+     * others, it would not be.
+     * 
+ * + * AMBIGUOUS = 4; + */ + public static final int AMBIGUOUS_VALUE = 4; + /** + * + * + *
+     * The configuration analysis did not complete. Possible reasons are:
+     * * A permissions error occurred--for example, the user might not have
+     *   read permission for all of the resources named in the test.
+     * * An internal error occurred.
+     * * The analyzer received an invalid or unsupported argument or was unable
+     *   to identify a known endpoint.
+     * 
+ * + * UNDETERMINED = 5; + */ + public static final int UNDETERMINED_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 Result 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 Result forNumber(int value) { + switch (value) { + case 0: + return RESULT_UNSPECIFIED; + case 1: + return REACHABLE; + case 2: + return UNREACHABLE; + case 4: + return AMBIGUOUS; + case 5: + return UNDETERMINED; + 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 Result findValueByNumber(int number) { + return Result.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.networkmanagement.v1beta1.ReachabilityDetails.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Result[] VALUES = values(); + + public static Result 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 Result(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result) + } + + public static final int RESULT_FIELD_NUMBER = 1; + private int result_; + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = 1; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = 1; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result getResult() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result.valueOf(result_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result.UNRECOGNIZED + : result; + } + + public static final int VERIFY_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp verifyTime_; + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + @java.lang.Override + public boolean hasVerifyTime() { + return verifyTime_ != null; + } + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getVerifyTime() { + return verifyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : verifyTime_; + } + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + return getVerifyTime(); + } + + public static final int ERROR_FIELD_NUMBER = 3; + private com.google.rpc.Status error_; + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int TRACES_FIELD_NUMBER = 5; + private java.util.List traces_; + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + @java.lang.Override + public java.util.List getTracesList() { + return traces_; + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + @java.lang.Override + public java.util.List + getTracesOrBuilderList() { + return traces_; + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + @java.lang.Override + public int getTracesCount() { + return traces_.size(); + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Trace getTraces(int index) { + return traces_.get(index); + } + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.TraceOrBuilder getTracesOrBuilder(int index) { + return traces_.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 (result_ + != com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result.RESULT_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, result_); + } + if (verifyTime_ != null) { + output.writeMessage(2, getVerifyTime()); + } + if (error_ != null) { + output.writeMessage(3, getError()); + } + for (int i = 0; i < traces_.size(); i++) { + output.writeMessage(5, traces_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (result_ + != com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result.RESULT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, result_); + } + if (verifyTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVerifyTime()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getError()); + } + for (int i = 0; i < traces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, traces_.get(i)); + } + size += unknownFields.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.networkmanagement.v1beta1.ReachabilityDetails)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails other = + (com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails) obj; + + if (result_ != other.result_) return false; + if (hasVerifyTime() != other.hasVerifyTime()) return false; + if (hasVerifyTime()) { + if (!getVerifyTime().equals(other.getVerifyTime())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (!getTracesList().equals(other.getTracesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; + if (hasVerifyTime()) { + hash = (37 * hash) + VERIFY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getVerifyTime().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (getTracesCount() > 0) { + hash = (37 * hash) + TRACES_FIELD_NUMBER; + hash = (53 * hash) + getTracesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails 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.networkmanagement.v1beta1.ReachabilityDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails 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.networkmanagement.v1beta1.ReachabilityDetails parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails 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.networkmanagement.v1beta1.ReachabilityDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails 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.networkmanagement.v1beta1.ReachabilityDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails 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.networkmanagement.v1beta1.ReachabilityDetails 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; + } + /** + * + * + *
+   * Results of the configuration analysis from the last run of the test.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.ReachabilityDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.ReachabilityDetails) + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ReachabilityDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ReachabilityDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.class, + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTracesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + result_ = 0; + + if (verifyTimeBuilder_ == null) { + verifyTime_ = null; + } else { + verifyTime_ = null; + verifyTimeBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (tracesBuilder_ == null) { + traces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tracesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TestOuterClass + .internal_static_google_cloud_networkmanagement_v1beta1_ReachabilityDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails build() { + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails buildPartial() { + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails result = + new com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(this); + int from_bitField0_ = bitField0_; + result.result_ = result_; + if (verifyTimeBuilder_ == null) { + result.verifyTime_ = verifyTime_; + } else { + result.verifyTime_ = verifyTimeBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (tracesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + traces_ = java.util.Collections.unmodifiableList(traces_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.traces_ = traces_; + } else { + result.traces_ = tracesBuilder_.build(); + } + 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.networkmanagement.v1beta1.ReachabilityDetails) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.getDefaultInstance()) + return this; + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + if (other.hasVerifyTime()) { + mergeVerifyTime(other.getVerifyTime()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (tracesBuilder_ == null) { + if (!other.traces_.isEmpty()) { + if (traces_.isEmpty()) { + traces_ = other.traces_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTracesIsMutable(); + traces_.addAll(other.traces_); + } + onChanged(); + } + } else { + if (!other.traces_.isEmpty()) { + if (tracesBuilder_.isEmpty()) { + tracesBuilder_.dispose(); + tracesBuilder_ = null; + traces_ = other.traces_; + bitField0_ = (bitField0_ & ~0x00000001); + tracesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTracesFieldBuilder() + : null; + } else { + tracesBuilder_.addAllMessages(other.traces_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int result_ = 0; + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = 1; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = 1; + * + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + + result_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = 1; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result getResult() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result.valueOf(result_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = 1; + * + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult( + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result value) { + if (value == null) { + throw new NullPointerException(); + } + + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The overall result of the test's configuration analysis.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = 1; + * + * @return This builder for chaining. + */ + public Builder clearResult() { + + result_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp verifyTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + verifyTimeBuilder_; + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + public boolean hasVerifyTime() { + return verifyTimeBuilder_ != null || verifyTime_ != null; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + public com.google.protobuf.Timestamp getVerifyTime() { + if (verifyTimeBuilder_ == null) { + return verifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : verifyTime_; + } else { + return verifyTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder setVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + verifyTime_ = value; + onChanged(); + } else { + verifyTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder setVerifyTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (verifyTimeBuilder_ == null) { + verifyTime_ = builderForValue.build(); + onChanged(); + } else { + verifyTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder mergeVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (verifyTime_ != null) { + verifyTime_ = + com.google.protobuf.Timestamp.newBuilder(verifyTime_).mergeFrom(value).buildPartial(); + } else { + verifyTime_ = value; + } + onChanged(); + } else { + verifyTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public Builder clearVerifyTime() { + if (verifyTimeBuilder_ == null) { + verifyTime_ = null; + onChanged(); + } else { + verifyTime_ = null; + verifyTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getVerifyTimeBuilder() { + + onChanged(); + return getVerifyTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + if (verifyTimeBuilder_ != null) { + return verifyTimeBuilder_.getMessageOrBuilder(); + } else { + return verifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : verifyTime_; + } + } + /** + * + * + *
+     * The time of the configuration analysis.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getVerifyTimeFieldBuilder() { + if (verifyTimeBuilder_ == null) { + verifyTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getVerifyTime(), getParentForChildren(), isClean()); + verifyTime_ = null; + } + return verifyTimeBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * The details of a failure or a cancellation of reachability analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private java.util.List traces_ = + java.util.Collections.emptyList(); + + private void ensureTracesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + traces_ = + new java.util.ArrayList(traces_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Trace, + com.google.cloud.networkmanagement.v1beta1.Trace.Builder, + com.google.cloud.networkmanagement.v1beta1.TraceOrBuilder> + tracesBuilder_; + + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public java.util.List getTracesList() { + if (tracesBuilder_ == null) { + return java.util.Collections.unmodifiableList(traces_); + } else { + return tracesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public int getTracesCount() { + if (tracesBuilder_ == null) { + return traces_.size(); + } else { + return tracesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1beta1.Trace getTraces(int index) { + if (tracesBuilder_ == null) { + return traces_.get(index); + } else { + return tracesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public Builder setTraces(int index, com.google.cloud.networkmanagement.v1beta1.Trace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.set(index, value); + onChanged(); + } else { + tracesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public Builder setTraces( + int index, com.google.cloud.networkmanagement.v1beta1.Trace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.set(index, builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public Builder addTraces(com.google.cloud.networkmanagement.v1beta1.Trace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.add(value); + onChanged(); + } else { + tracesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public Builder addTraces(int index, com.google.cloud.networkmanagement.v1beta1.Trace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.add(index, value); + onChanged(); + } else { + tracesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public Builder addTraces( + com.google.cloud.networkmanagement.v1beta1.Trace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public Builder addTraces( + int index, com.google.cloud.networkmanagement.v1beta1.Trace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(index, builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public Builder addAllTraces( + java.lang.Iterable values) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, traces_); + onChanged(); + } else { + tracesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public Builder clearTraces() { + if (tracesBuilder_ == null) { + traces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tracesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public Builder removeTraces(int index) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.remove(index); + onChanged(); + } else { + tracesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1beta1.Trace.Builder getTracesBuilder(int index) { + return getTracesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1beta1.TraceOrBuilder getTracesOrBuilder(int index) { + if (tracesBuilder_ == null) { + return traces_.get(index); + } else { + return tracesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public java.util.List + getTracesOrBuilderList() { + if (tracesBuilder_ != null) { + return tracesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(traces_); + } + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1beta1.Trace.Builder addTracesBuilder() { + return getTracesFieldBuilder() + .addBuilder(com.google.cloud.networkmanagement.v1beta1.Trace.getDefaultInstance()); + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public com.google.cloud.networkmanagement.v1beta1.Trace.Builder addTracesBuilder(int index) { + return getTracesFieldBuilder() + .addBuilder(index, com.google.cloud.networkmanagement.v1beta1.Trace.getDefaultInstance()); + } + /** + * + * + *
+     * Result may contain a list of traces if a test has multiple possible
+     * paths in the network, such as when destination endpoint is a load balancer
+     * with multiple backends.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + public java.util.List + getTracesBuilderList() { + return getTracesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Trace, + com.google.cloud.networkmanagement.v1beta1.Trace.Builder, + com.google.cloud.networkmanagement.v1beta1.TraceOrBuilder> + getTracesFieldBuilder() { + if (tracesBuilder_ == null) { + tracesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Trace, + com.google.cloud.networkmanagement.v1beta1.Trace.Builder, + com.google.cloud.networkmanagement.v1beta1.TraceOrBuilder>( + traces_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + traces_ = null; + } + return tracesBuilder_; + } + + @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.networkmanagement.v1beta1.ReachabilityDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.ReachabilityDetails) + private static final com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(); + } + + public static com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReachabilityDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReachabilityDetails(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.ReachabilityDetails + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityDetailsOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityDetailsOrBuilder.java new file mode 100644 index 00000000..e2c81b7c --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityDetailsOrBuilder.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface ReachabilityDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.ReachabilityDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = 1; + * + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + * + * + *
+   * The overall result of the test's configuration analysis.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result result = 1; + * + * @return The result. + */ + com.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result getResult(); + + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return Whether the verifyTime field is set. + */ + boolean hasVerifyTime(); + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + * + * @return The verifyTime. + */ + com.google.protobuf.Timestamp getVerifyTime(); + /** + * + * + *
+   * The time of the configuration analysis.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder(); + + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * The details of a failure or a cancellation of reachability analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + java.util.List getTracesList(); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + com.google.cloud.networkmanagement.v1beta1.Trace getTraces(int index); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + int getTracesCount(); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + java.util.List + getTracesOrBuilderList(); + /** + * + * + *
+   * Result may contain a list of traces if a test has multiple possible
+   * paths in the network, such as when destination endpoint is a load balancer
+   * with multiple backends.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Trace traces = 5; + */ + com.google.cloud.networkmanagement.v1beta1.TraceOrBuilder getTracesOrBuilder(int index); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceProto.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceProto.java new file mode 100644 index 00000000..37728f37 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/ReachabilityServiceProto.java @@ -0,0 +1,260 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public final class ReachabilityServiceProto { + private ReachabilityServiceProto() {} + + 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_networkmanagement_v1beta1_ListConnectivityTestsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/networkmanagement/v1beta1" + + "/reachability.proto\022&google.cloud.networ" + + "kmanagement.v1beta1\032\034google/api/annotati" + + "ons.proto\032\037google/api/field_behavior.pro" + + "to\032\031google/api/resource.proto\032>google/cl" + + "oud/networkmanagement/v1beta1/connectivi" + + "ty_test.proto\032#google/longrunning/operat" + + "ions.proto\032 google/protobuf/field_mask.p" + + "roto\032\037google/protobuf/timestamp.proto\032\027g" + + "oogle/api/client.proto\"|\n\034ListConnectivi" + + "tyTestsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006fi" + + "lter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\232\001\n\035ListCon" + + "nectivityTestsResponse\022K\n\tresources\030\001 \003(" + + "\01328.google.cloud.networkmanagement.v1bet" + + "a1.ConnectivityTest\022\027\n\017next_page_token\030\002" + + " \001(\t\022\023\n\013unreachable\030\003 \003(\t\"/\n\032GetConnecti" + + "vityTestRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"\233\001\n\035C" + + "reateConnectivityTestRequest\022\023\n\006parent\030\001" + + " \001(\tB\003\340A\002\022\024\n\007test_id\030\002 \001(\tB\003\340A\002\022O\n\010resou" + + "rce\030\003 \001(\01328.google.cloud.networkmanageme" + + "nt.v1beta1.ConnectivityTestB\003\340A\002\"\246\001\n\035Upd" + + "ateConnectivityTestRequest\0224\n\013update_mas" + + "k\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002" + + "\022O\n\010resource\030\002 \001(\01328.google.cloud.networ" + + "kmanagement.v1beta1.ConnectivityTestB\003\340A" + + "\002\"2\n\035DeleteConnectivityTestRequest\022\021\n\004na" + + "me\030\001 \001(\tB\003\340A\002\"1\n\034RerunConnectivityTestRe" + + "quest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"\326\001\n\021OperationMe" + + "tadata\022/\n\013create_time\030\001 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n" + + "\004verb\030\004 \001(\t\022\025\n\rstatus_detail\030\005 \001(\t\022\030\n\020ca" + + "ncel_requested\030\006 \001(\010\022\023\n\013api_version\030\007 \001(" + + "\t2\243\r\n\023ReachabilityService\022\355\001\n\025ListConnec" + + "tivityTests\022D.google.cloud.networkmanage" + + "ment.v1beta1.ListConnectivityTestsReques" + + "t\032E.google.cloud.networkmanagement.v1bet" + + "a1.ListConnectivityTestsResponse\"G\202\323\344\223\002A" + + "\022?/v1beta1/{parent=projects/*/locations/" + + "global}/connectivityTests\022\334\001\n\023GetConnect" + + "ivityTest\022B.google.cloud.networkmanageme" + + "nt.v1beta1.GetConnectivityTestRequest\0328." + + "google.cloud.networkmanagement.v1beta1.C" + + "onnectivityTest\"G\202\323\344\223\002A\022?/v1beta1/{name=" + + "projects/*/locations/global/connectivity" + + "Tests/*}\022\241\002\n\026CreateConnectivityTest\022E.go" + + "ogle.cloud.networkmanagement.v1beta1.Cre" + + "ateConnectivityTestRequest\032\035.google.long" + + "running.Operation\"\240\001\202\323\344\223\002K\"?/v1beta1/{pa" + + "rent=projects/*/locations/global}/connec" + + "tivityTests:\010resource\312AL\n7google.cloud.n" + + "etworkmanagement.v1beta1.ConnectivityTes" + + "t\022\021OperationMetadata\022\252\002\n\026UpdateConnectiv" + + "ityTest\022E.google.cloud.networkmanagement" + + ".v1beta1.UpdateConnectivityTestRequest\032\035" + + ".google.longrunning.Operation\"\251\001\202\323\344\223\002T2H" + + "/v1beta1/{resource.name=projects/*/locat" + + "ions/global/connectivityTests/*}:\010resour" + + "ce\312AL\n7google.cloud.networkmanagement.v1" + + "beta1.ConnectivityTest\022\021OperationMetadat" + + "a\022\236\002\n\025RerunConnectivityTest\022D.google.clo" + + "ud.networkmanagement.v1beta1.RerunConnec" + + "tivityTestRequest\032\035.google.longrunning.O" + + "peration\"\237\001\202\323\344\223\002J\"E/v1beta1/{name=projec" + + "ts/*/locations/global/connectivityTests/" + + "*}:rerun:\001*\312AL\n7google.cloud.networkmana" + + "gement.v1beta1.ConnectivityTest\022\021Operati" + + "onMetadata\022\364\001\n\026DeleteConnectivityTest\022E." + + "google.cloud.networkmanagement.v1beta1.D" + + "eleteConnectivityTestRequest\032\035.google.lo" + + "ngrunning.Operation\"t\202\323\344\223\002A*?/v1beta1/{n" + + "ame=projects/*/locations/global/connecti" + + "vityTests/*}\312A*\n\025google.protobuf.Empty\022\021" + + "OperationMetadata\032T\312A networkmanagement." + + "googleapis.com\322A.https://www.googleapis." + + "com/auth/cloud-platformB\237\002\n*com.google.c" + + "loud.networkmanagement.v1beta1B\030Reachabi" + + "lityServiceProtoP\001ZWgoogle.golang.org/ge" + + "nproto/googleapis/cloud/networkmanagemen" + + "t/v1beta1;networkmanagement\252\002&Google.Clo" + + "ud.NetworkManagement.V1Beta1\312\002&Google\\Cl" + + "oud\\NetworkManagement\\V1beta1\352\002)Google::" + + "Cloud::NetworkManagement::V1beta1b\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.networkmanagement.v1beta1.TestOuterClass.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + }); + internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_ListConnectivityTestsResponse_descriptor, + new java.lang.String[] { + "Resources", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_GetConnectivityTestRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_CreateConnectivityTestRequest_descriptor, + new java.lang.String[] { + "Parent", "TestId", "Resource", + }); + internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Resource", + }); + internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_DeleteConnectivityTestRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusDetail", + "CancelRequested", + "ApiVersion", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.networkmanagement.v1beta1.TestOuterClass.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RerunConnectivityTestRequest.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RerunConnectivityTestRequest.java new file mode 100644 index 00000000..9ed03aa6 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RerunConnectivityTestRequest.java @@ -0,0 +1,659 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Request for the `RerunConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} + */ +public final class RerunConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) + RerunConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RerunConnectivityTestRequest.newBuilder() to construct. + private RerunConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RerunConnectivityTestRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RerunConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RerunConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * 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; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.networkmanagement.v1beta1.RerunConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest 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.networkmanagement.v1beta1.RerunConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest 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.networkmanagement.v1beta1.RerunConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest 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.networkmanagement.v1beta1.RerunConnectivityTestRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + 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.networkmanagement.v1beta1.RerunConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest 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.networkmanagement.v1beta1.RerunConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `RerunConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RerunConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(this); + result.name_ = name_; + 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.networkmanagement.v1beta1.RerunConnectivityTestRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Connectivity Test resource name using the form:
+     *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+     * 
+ * + * 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; + 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.networkmanagement.v1beta1.RerunConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RerunConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RerunConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.RerunConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RerunConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RerunConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..79fc4312 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RerunConnectivityTestRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface RerunConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Connectivity Test resource name using the form:
+   *     `projects/{project_id}/locations/global/connectivityTests/{test_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfo.java new file mode 100644 index 00000000..11e1dfd1 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfo.java @@ -0,0 +1,2655 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine route.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.RouteInfo} + */ +public final class RouteInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.RouteInfo) + RouteInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use RouteInfo.newBuilder() to construct. + private RouteInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RouteInfo() { + routeType_ = 0; + nextHopType_ = 0; + displayName_ = ""; + uri_ = ""; + destIpRange_ = ""; + nextHop_ = ""; + networkUri_ = ""; + instanceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RouteInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RouteInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + destIpRange_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextHop_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 48: + { + priority_ = input.readInt32(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + instanceTags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instanceTags_.add(s); + break; + } + case 64: + { + int rawValue = input.readEnum(); + + routeType_ = rawValue; + break; + } + case 72: + { + int rawValue = input.readEnum(); + + nextHopType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + instanceTags_ = instanceTags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.RouteInfo.class, + com.google.cloud.networkmanagement.v1beta1.RouteInfo.Builder.class); + } + + /** + * + * + *
+   * Type of route:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType} + */ + public enum RouteType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + ROUTE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Route is a subnet route automatically created by the system.
+     * 
+ * + * SUBNET = 1; + */ + SUBNET(1), + /** + * + * + *
+     * Static route created by the user, including the default route to the
+     * internet.
+     * 
+ * + * STATIC = 2; + */ + STATIC(2), + /** + * + * + *
+     * Dynamic route exchanged between BGP peers.
+     * 
+ * + * DYNAMIC = 3; + */ + DYNAMIC(3), + /** + * + * + *
+     * A subnet route received from peering network.
+     * 
+ * + * PEERING_SUBNET = 4; + */ + PEERING_SUBNET(4), + /** + * + * + *
+     * A static route received from peering network.
+     * 
+ * + * PEERING_STATIC = 5; + */ + PEERING_STATIC(5), + /** + * + * + *
+     * A dynamic route received from peering network.
+     * 
+ * + * PEERING_DYNAMIC = 6; + */ + PEERING_DYNAMIC(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + public static final int ROUTE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Route is a subnet route automatically created by the system.
+     * 
+ * + * SUBNET = 1; + */ + public static final int SUBNET_VALUE = 1; + /** + * + * + *
+     * Static route created by the user, including the default route to the
+     * internet.
+     * 
+ * + * STATIC = 2; + */ + public static final int STATIC_VALUE = 2; + /** + * + * + *
+     * Dynamic route exchanged between BGP peers.
+     * 
+ * + * DYNAMIC = 3; + */ + public static final int DYNAMIC_VALUE = 3; + /** + * + * + *
+     * A subnet route received from peering network.
+     * 
+ * + * PEERING_SUBNET = 4; + */ + public static final int PEERING_SUBNET_VALUE = 4; + /** + * + * + *
+     * A static route received from peering network.
+     * 
+ * + * PEERING_STATIC = 5; + */ + public static final int PEERING_STATIC_VALUE = 5; + /** + * + * + *
+     * A dynamic route received from peering network.
+     * 
+ * + * PEERING_DYNAMIC = 6; + */ + public static final int PEERING_DYNAMIC_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RouteType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RouteType forNumber(int value) { + switch (value) { + case 0: + return ROUTE_TYPE_UNSPECIFIED; + case 1: + return SUBNET; + case 2: + return STATIC; + case 3: + return DYNAMIC; + case 4: + return PEERING_SUBNET; + case 5: + return PEERING_STATIC; + case 6: + return PEERING_DYNAMIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RouteType findValueByNumber(int number) { + return RouteType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RouteType[] VALUES = values(); + + public static RouteType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RouteType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType) + } + + /** + * + * + *
+   * Type of next hop:
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType} + */ + public enum NextHopType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * NEXT_HOP_TYPE_UNSPECIFIED = 0; + */ + NEXT_HOP_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Next hop is an IP address.
+     * 
+ * + * NEXT_HOP_IP = 1; + */ + NEXT_HOP_IP(1), + /** + * + * + *
+     * Next hop is a Compute Engine instance.
+     * 
+ * + * NEXT_HOP_INSTANCE = 2; + */ + NEXT_HOP_INSTANCE(2), + /** + * + * + *
+     * Next hop is a VPC network gateway.
+     * 
+ * + * NEXT_HOP_NETWORK = 3; + */ + NEXT_HOP_NETWORK(3), + /** + * + * + *
+     * Next hop is a peering VPC.
+     * 
+ * + * NEXT_HOP_PEERING = 4; + */ + NEXT_HOP_PEERING(4), + /** + * + * + *
+     * Next hop is an interconnect.
+     * 
+ * + * NEXT_HOP_INTERCONNECT = 5; + */ + NEXT_HOP_INTERCONNECT(5), + /** + * + * + *
+     * Next hop is a VPN tunnel.
+     * 
+ * + * NEXT_HOP_VPN_TUNNEL = 6; + */ + NEXT_HOP_VPN_TUNNEL(6), + /** + * + * + *
+     * Next hop is a VPN gateway. This scenario only happens when tracing
+     * connectivity from an on-premises network to Google Cloud through a VPN.
+     * The analysis simulates a packet departing from the on-premises network
+     * through a VPN tunnel and arriving at a Cloud VPN gateway.
+     * 
+ * + * NEXT_HOP_VPN_GATEWAY = 7; + */ + NEXT_HOP_VPN_GATEWAY(7), + /** + * + * + *
+     * Next hop is an internet gateway.
+     * 
+ * + * NEXT_HOP_INTERNET_GATEWAY = 8; + */ + NEXT_HOP_INTERNET_GATEWAY(8), + /** + * + * + *
+     * Next hop is blackhole; that is, the next hop either does not exist or is
+     * not running.
+     * 
+ * + * NEXT_HOP_BLACKHOLE = 9; + */ + NEXT_HOP_BLACKHOLE(9), + /** + * + * + *
+     * Next hop is the forwarding rule of an Internal Load Balancer.
+     * 
+ * + * NEXT_HOP_ILB = 10; + */ + NEXT_HOP_ILB(10), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * NEXT_HOP_TYPE_UNSPECIFIED = 0; + */ + public static final int NEXT_HOP_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Next hop is an IP address.
+     * 
+ * + * NEXT_HOP_IP = 1; + */ + public static final int NEXT_HOP_IP_VALUE = 1; + /** + * + * + *
+     * Next hop is a Compute Engine instance.
+     * 
+ * + * NEXT_HOP_INSTANCE = 2; + */ + public static final int NEXT_HOP_INSTANCE_VALUE = 2; + /** + * + * + *
+     * Next hop is a VPC network gateway.
+     * 
+ * + * NEXT_HOP_NETWORK = 3; + */ + public static final int NEXT_HOP_NETWORK_VALUE = 3; + /** + * + * + *
+     * Next hop is a peering VPC.
+     * 
+ * + * NEXT_HOP_PEERING = 4; + */ + public static final int NEXT_HOP_PEERING_VALUE = 4; + /** + * + * + *
+     * Next hop is an interconnect.
+     * 
+ * + * NEXT_HOP_INTERCONNECT = 5; + */ + public static final int NEXT_HOP_INTERCONNECT_VALUE = 5; + /** + * + * + *
+     * Next hop is a VPN tunnel.
+     * 
+ * + * NEXT_HOP_VPN_TUNNEL = 6; + */ + public static final int NEXT_HOP_VPN_TUNNEL_VALUE = 6; + /** + * + * + *
+     * Next hop is a VPN gateway. This scenario only happens when tracing
+     * connectivity from an on-premises network to Google Cloud through a VPN.
+     * The analysis simulates a packet departing from the on-premises network
+     * through a VPN tunnel and arriving at a Cloud VPN gateway.
+     * 
+ * + * NEXT_HOP_VPN_GATEWAY = 7; + */ + public static final int NEXT_HOP_VPN_GATEWAY_VALUE = 7; + /** + * + * + *
+     * Next hop is an internet gateway.
+     * 
+ * + * NEXT_HOP_INTERNET_GATEWAY = 8; + */ + public static final int NEXT_HOP_INTERNET_GATEWAY_VALUE = 8; + /** + * + * + *
+     * Next hop is blackhole; that is, the next hop either does not exist or is
+     * not running.
+     * 
+ * + * NEXT_HOP_BLACKHOLE = 9; + */ + public static final int NEXT_HOP_BLACKHOLE_VALUE = 9; + /** + * + * + *
+     * Next hop is the forwarding rule of an Internal Load Balancer.
+     * 
+ * + * NEXT_HOP_ILB = 10; + */ + public static final int NEXT_HOP_ILB_VALUE = 10; + + 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 NextHopType 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 NextHopType forNumber(int value) { + switch (value) { + case 0: + return NEXT_HOP_TYPE_UNSPECIFIED; + case 1: + return NEXT_HOP_IP; + case 2: + return NEXT_HOP_INSTANCE; + case 3: + return NEXT_HOP_NETWORK; + case 4: + return NEXT_HOP_PEERING; + case 5: + return NEXT_HOP_INTERCONNECT; + case 6: + return NEXT_HOP_VPN_TUNNEL; + case 7: + return NEXT_HOP_VPN_GATEWAY; + case 8: + return NEXT_HOP_INTERNET_GATEWAY; + case 9: + return NEXT_HOP_BLACKHOLE; + case 10: + return NEXT_HOP_ILB; + 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 NextHopType findValueByNumber(int number) { + return NextHopType.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.networkmanagement.v1beta1.RouteInfo.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final NextHopType[] VALUES = values(); + + public static NextHopType 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 NextHopType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType) + } + + public static final int ROUTE_TYPE_FIELD_NUMBER = 8; + private int routeType_; + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType route_type = 8; + * + * @return The enum numeric value on the wire for routeType. + */ + @java.lang.Override + public int getRouteTypeValue() { + return routeType_; + } + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType route_type = 8; + * + * @return The routeType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType getRouteType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType result = + com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType.valueOf(routeType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType.UNRECOGNIZED + : result; + } + + public static final int NEXT_HOP_TYPE_FIELD_NUMBER = 9; + private int nextHopType_; + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The enum numeric value on the wire for nextHopType. + */ + @java.lang.Override + public int getNextHopTypeValue() { + return nextHopType_; + } + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The nextHopType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType getNextHopType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType result = + com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType.valueOf(nextHopType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType.UNRECOGNIZED + : result; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEST_IP_RANGE_FIELD_NUMBER = 3; + private volatile java.lang.Object destIpRange_; + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The destIpRange. + */ + @java.lang.Override + public java.lang.String getDestIpRange() { + java.lang.Object ref = destIpRange_; + 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(); + destIpRange_ = s; + return s; + } + } + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The bytes for destIpRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestIpRangeBytes() { + java.lang.Object ref = destIpRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEXT_HOP_FIELD_NUMBER = 4; + private volatile java.lang.Object nextHop_; + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The nextHop. + */ + @java.lang.Override + public java.lang.String getNextHop() { + java.lang.Object ref = nextHop_; + 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(); + nextHop_ = s; + return s; + } + } + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The bytes for nextHop. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextHopBytes() { + java.lang.Object ref = nextHop_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextHop_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 5; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 6; + private int priority_; + /** + * + * + *
+   * Priority of the route.
+   * 
+ * + * int32 priority = 6; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int INSTANCE_TAGS_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList instanceTags_; + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return A list containing the instanceTags. + */ + public com.google.protobuf.ProtocolStringList getInstanceTagsList() { + return instanceTags_; + } + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return The count of instanceTags. + */ + public int getInstanceTagsCount() { + return instanceTags_.size(); + } + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the element to return. + * @return The instanceTags at the given index. + */ + public java.lang.String getInstanceTags(int index) { + return instanceTags_.get(index); + } + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the instanceTags at the given index. + */ + public com.google.protobuf.ByteString getInstanceTagsBytes(int index) { + return instanceTags_.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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getDestIpRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, destIpRange_); + } + if (!getNextHopBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, nextHop_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, networkUri_); + } + if (priority_ != 0) { + output.writeInt32(6, priority_); + } + for (int i = 0; i < instanceTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, instanceTags_.getRaw(i)); + } + if (routeType_ + != com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType.ROUTE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, routeType_); + } + if (nextHopType_ + != com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType + .NEXT_HOP_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, nextHopType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getDestIpRangeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, destIpRange_); + } + if (!getNextHopBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, nextHop_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, networkUri_); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, priority_); + } + { + int dataSize = 0; + for (int i = 0; i < instanceTags_.size(); i++) { + dataSize += computeStringSizeNoTag(instanceTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getInstanceTagsList().size(); + } + if (routeType_ + != com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType.ROUTE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, routeType_); + } + if (nextHopType_ + != com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType + .NEXT_HOP_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, nextHopType_); + } + size += unknownFields.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.networkmanagement.v1beta1.RouteInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.RouteInfo other = + (com.google.cloud.networkmanagement.v1beta1.RouteInfo) obj; + + if (routeType_ != other.routeType_) return false; + if (nextHopType_ != other.nextHopType_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getDestIpRange().equals(other.getDestIpRange())) return false; + if (!getNextHop().equals(other.getNextHop())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (getPriority() != other.getPriority()) return false; + if (!getInstanceTagsList().equals(other.getInstanceTagsList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ROUTE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + routeType_; + hash = (37 * hash) + NEXT_HOP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nextHopType_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + DEST_IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getDestIpRange().hashCode(); + hash = (37 * hash) + NEXT_HOP_FIELD_NUMBER; + hash = (53 * hash) + getNextHop().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + if (getInstanceTagsCount() > 0) { + hash = (37 * hash) + INSTANCE_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getInstanceTagsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.RouteInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.RouteInfo 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.networkmanagement.v1beta1.RouteInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.RouteInfo 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.networkmanagement.v1beta1.RouteInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.RouteInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.RouteInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.RouteInfo 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.networkmanagement.v1beta1.RouteInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.RouteInfo 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.networkmanagement.v1beta1.RouteInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.RouteInfo 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.networkmanagement.v1beta1.RouteInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine route.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.RouteInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.RouteInfo) + com.google.cloud.networkmanagement.v1beta1.RouteInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.RouteInfo.class, + com.google.cloud.networkmanagement.v1beta1.RouteInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.RouteInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + routeType_ = 0; + + nextHopType_ = 0; + + displayName_ = ""; + + uri_ = ""; + + destIpRange_ = ""; + + nextHop_ = ""; + + networkUri_ = ""; + + priority_ = 0; + + instanceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfo build() { + com.google.cloud.networkmanagement.v1beta1.RouteInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.RouteInfo result = + new com.google.cloud.networkmanagement.v1beta1.RouteInfo(this); + int from_bitField0_ = bitField0_; + result.routeType_ = routeType_; + result.nextHopType_ = nextHopType_; + result.displayName_ = displayName_; + result.uri_ = uri_; + result.destIpRange_ = destIpRange_; + result.nextHop_ = nextHop_; + result.networkUri_ = networkUri_; + result.priority_ = priority_; + if (((bitField0_ & 0x00000001) != 0)) { + instanceTags_ = instanceTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instanceTags_ = instanceTags_; + 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.networkmanagement.v1beta1.RouteInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.RouteInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.RouteInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance()) + return this; + if (other.routeType_ != 0) { + setRouteTypeValue(other.getRouteTypeValue()); + } + if (other.nextHopType_ != 0) { + setNextHopTypeValue(other.getNextHopTypeValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getDestIpRange().isEmpty()) { + destIpRange_ = other.destIpRange_; + onChanged(); + } + if (!other.getNextHop().isEmpty()) { + nextHop_ = other.nextHop_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (!other.instanceTags_.isEmpty()) { + if (instanceTags_.isEmpty()) { + instanceTags_ = other.instanceTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstanceTagsIsMutable(); + instanceTags_.addAll(other.instanceTags_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.RouteInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.RouteInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int routeType_ = 0; + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType route_type = 8; + * + * @return The enum numeric value on the wire for routeType. + */ + @java.lang.Override + public int getRouteTypeValue() { + return routeType_; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType route_type = 8; + * + * @param value The enum numeric value on the wire for routeType to set. + * @return This builder for chaining. + */ + public Builder setRouteTypeValue(int value) { + + routeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType route_type = 8; + * + * @return The routeType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType getRouteType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType result = + com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType.valueOf(routeType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType route_type = 8; + * + * @param value The routeType to set. + * @return This builder for chaining. + */ + public Builder setRouteType( + com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType value) { + if (value == null) { + throw new NullPointerException(); + } + + routeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType route_type = 8; + * + * @return This builder for chaining. + */ + public Builder clearRouteType() { + + routeType_ = 0; + onChanged(); + return this; + } + + private int nextHopType_ = 0; + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The enum numeric value on the wire for nextHopType. + */ + @java.lang.Override + public int getNextHopTypeValue() { + return nextHopType_; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType next_hop_type = 9; + * + * @param value The enum numeric value on the wire for nextHopType to set. + * @return This builder for chaining. + */ + public Builder setNextHopTypeValue(int value) { + + nextHopType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The nextHopType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType getNextHopType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType result = + com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType.valueOf(nextHopType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType next_hop_type = 9; + * + * @param value The nextHopType to set. + * @return This builder for chaining. + */ + public Builder setNextHopType( + com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType value) { + if (value == null) { + throw new NullPointerException(); + } + + nextHopType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of next hop.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return This builder for chaining. + */ + public Builder clearNextHopType() { + + nextHopType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Compute Engine route.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine route.
+     * Dynamic route from cloud router does not have a URI.
+     * Advertised route from Google Cloud VPC to on-premises network also does
+     * not have a URI.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object destIpRange_ = ""; + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @return The destIpRange. + */ + public java.lang.String getDestIpRange() { + java.lang.Object ref = destIpRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destIpRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @return The bytes for destIpRange. + */ + public com.google.protobuf.ByteString getDestIpRangeBytes() { + java.lang.Object ref = destIpRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destIpRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @param value The destIpRange to set. + * @return This builder for chaining. + */ + public Builder setDestIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destIpRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @return This builder for chaining. + */ + public Builder clearDestIpRange() { + + destIpRange_ = getDefaultInstance().getDestIpRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * Destination IP range of the route.
+     * 
+ * + * string dest_ip_range = 3; + * + * @param value The bytes for destIpRange to set. + * @return This builder for chaining. + */ + public Builder setDestIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destIpRange_ = value; + onChanged(); + return this; + } + + private java.lang.Object nextHop_ = ""; + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @return The nextHop. + */ + public java.lang.String getNextHop() { + java.lang.Object ref = nextHop_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextHop_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @return The bytes for nextHop. + */ + public com.google.protobuf.ByteString getNextHopBytes() { + java.lang.Object ref = nextHop_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextHop_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @param value The nextHop to set. + * @return This builder for chaining. + */ + public Builder setNextHop(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextHop_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @return This builder for chaining. + */ + public Builder clearNextHop() { + + nextHop_ = getDefaultInstance().getNextHop(); + onChanged(); + return this; + } + /** + * + * + *
+     * Next hop of the route.
+     * 
+ * + * string next_hop = 4; + * + * @param value The bytes for nextHop to set. + * @return This builder for chaining. + */ + public Builder setNextHopBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextHop_ = value; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network.
+     * 
+ * + * string network_uri = 5; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private int priority_; + /** + * + * + *
+     * Priority of the route.
+     * 
+ * + * int32 priority = 6; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + /** + * + * + *
+     * Priority of the route.
+     * 
+ * + * int32 priority = 6; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Priority of the route.
+     * 
+ * + * int32 priority = 6; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + + priority_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList instanceTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstanceTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instanceTags_ = new com.google.protobuf.LazyStringArrayList(instanceTags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @return A list containing the instanceTags. + */ + public com.google.protobuf.ProtocolStringList getInstanceTagsList() { + return instanceTags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @return The count of instanceTags. + */ + public int getInstanceTagsCount() { + return instanceTags_.size(); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the element to return. + * @return The instanceTags at the given index. + */ + public java.lang.String getInstanceTags(int index) { + return instanceTags_.get(index); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the instanceTags at the given index. + */ + public com.google.protobuf.ByteString getInstanceTagsBytes(int index) { + return instanceTags_.getByteString(index); + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index to set the value at. + * @param value The instanceTags to set. + * @return This builder for chaining. + */ + public Builder setInstanceTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceTagsIsMutable(); + instanceTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param value The instanceTags to add. + * @return This builder for chaining. + */ + public Builder addInstanceTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceTagsIsMutable(); + instanceTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param values The instanceTags to add. + * @return This builder for chaining. + */ + public Builder addAllInstanceTags(java.lang.Iterable values) { + ensureInstanceTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceTags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @return This builder for chaining. + */ + public Builder clearInstanceTags() { + instanceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance tags of the route.
+     * 
+ * + * repeated string instance_tags = 7; + * + * @param value The bytes of the instanceTags to add. + * @return This builder for chaining. + */ + public Builder addInstanceTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInstanceTagsIsMutable(); + instanceTags_.add(value); + 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.networkmanagement.v1beta1.RouteInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.RouteInfo) + private static final com.google.cloud.networkmanagement.v1beta1.RouteInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.RouteInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.RouteInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RouteInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RouteInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.RouteInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfoOrBuilder.java new file mode 100644 index 00000000..2dfc1b9d --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfoOrBuilder.java @@ -0,0 +1,270 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface RouteInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.RouteInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType route_type = 8; + * + * @return The enum numeric value on the wire for routeType. + */ + int getRouteTypeValue(); + /** + * + * + *
+   * Type of route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType route_type = 8; + * + * @return The routeType. + */ + com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType getRouteType(); + + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The enum numeric value on the wire for nextHopType. + */ + int getNextHopTypeValue(); + /** + * + * + *
+   * Type of next hop.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType next_hop_type = 9; + * + * @return The nextHopType. + */ + com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType getNextHopType(); + + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a Compute Engine route.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a Compute Engine route.
+   * Dynamic route from cloud router does not have a URI.
+   * Advertised route from Google Cloud VPC to on-premises network also does
+   * not have a URI.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The destIpRange. + */ + java.lang.String getDestIpRange(); + /** + * + * + *
+   * Destination IP range of the route.
+   * 
+ * + * string dest_ip_range = 3; + * + * @return The bytes for destIpRange. + */ + com.google.protobuf.ByteString getDestIpRangeBytes(); + + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The nextHop. + */ + java.lang.String getNextHop(); + /** + * + * + *
+   * Next hop of the route.
+   * 
+ * + * string next_hop = 4; + * + * @return The bytes for nextHop. + */ + com.google.protobuf.ByteString getNextHopBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network.
+   * 
+ * + * string network_uri = 5; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Priority of the route.
+   * 
+ * + * int32 priority = 6; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return A list containing the instanceTags. + */ + java.util.List getInstanceTagsList(); + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @return The count of instanceTags. + */ + int getInstanceTagsCount(); + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the element to return. + * @return The instanceTags at the given index. + */ + java.lang.String getInstanceTags(int index); + /** + * + * + *
+   * Instance tags of the route.
+   * 
+ * + * repeated string instance_tags = 7; + * + * @param index The index of the value to return. + * @return The bytes of the instanceTags at the given index. + */ + com.google.protobuf.ByteString getInstanceTagsBytes(int index); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Step.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Step.java new file mode 100644 index 00000000..d1ec39e7 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Step.java @@ -0,0 +1,6499 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * A simulated forwarding path is composed of multiple steps.
+ * Each step has a well-defined state and an associated configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.Step} + */ +public final class Step extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.Step) + StepOrBuilder { + private static final long serialVersionUID = 0L; + // Use Step.newBuilder() to construct. + private Step(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Step() { + description_ = ""; + state_ = 0; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Step(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Step( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 24: + { + causesDrop_ = input.readBool(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 42: + { + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.Builder subBuilder = null; + if (stepInfoCase_ == 5) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 5; + break; + } + case 50: + { + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.Builder subBuilder = null; + if (stepInfoCase_ == 6) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 6; + break; + } + case 58: + { + com.google.cloud.networkmanagement.v1beta1.RouteInfo.Builder subBuilder = null; + if (stepInfoCase_ == 7) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.RouteInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 7; + break; + } + case 66: + { + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder subBuilder = null; + if (stepInfoCase_ == 8) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 8; + break; + } + case 74: + { + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.Builder subBuilder = + null; + if (stepInfoCase_ == 9) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 9; + break; + } + case 82: + { + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.Builder subBuilder = null; + if (stepInfoCase_ == 10) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 10; + break; + } + case 90: + { + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.Builder subBuilder = null; + if (stepInfoCase_ == 11) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 11; + break; + } + case 98: + { + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Builder subBuilder = null; + if (stepInfoCase_ == 12) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 12; + break; + } + case 106: + { + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder subBuilder = null; + if (stepInfoCase_ == 13) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 13; + break; + } + case 114: + { + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Builder subBuilder = null; + if (stepInfoCase_ == 14) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.AbortInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 14; + break; + } + case 122: + { + com.google.cloud.networkmanagement.v1beta1.DropInfo.Builder subBuilder = null; + if (stepInfoCase_ == 15) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_).toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.DropInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 15; + break; + } + case 130: + { + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.Builder subBuilder = null; + if (stepInfoCase_ == 16) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 16; + break; + } + case 138: + { + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.Builder subBuilder = null; + if (stepInfoCase_ == 17) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 17; + break; + } + case 146: + { + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.Builder subBuilder = null; + if (stepInfoCase_ == 18) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 18; + break; + } + case 154: + { + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.Builder subBuilder = + null; + if (stepInfoCase_ == 19) { + subBuilder = + ((com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_) + .toBuilder(); + } + stepInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_); + stepInfo_ = subBuilder.buildPartial(); + } + stepInfoCase_ = 19; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.Step.class, + com.google.cloud.networkmanagement.v1beta1.Step.Builder.class); + } + + /** + * + * + *
+   * Type of states that are defined in the network state machine.
+   * Each step in the packet trace is in a specific state.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.Step.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Initial state: packet originating from a Compute Engine instance.
+     * An InstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_INSTANCE = 1; + */ + START_FROM_INSTANCE(1), + /** + * + * + *
+     * Initial state: packet originating from the internet.
+     * The endpoint information is populated.
+     * 
+ * + * START_FROM_INTERNET = 2; + */ + START_FROM_INTERNET(2), + /** + * + * + *
+     * Initial state: packet originating from a VPC or on-premises network
+     * with internal source IP.
+     * If the source is a VPC network visible to the user, a NetworkInfo
+     * is populated with details of the network.
+     * 
+ * + * START_FROM_PRIVATE_NETWORK = 3; + */ + START_FROM_PRIVATE_NETWORK(3), + /** + * + * + *
+     * Initial state: packet originating from a Google Kubernetes Engine cluster
+     * master. A GKEMasterInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_GKE_MASTER = 21; + */ + START_FROM_GKE_MASTER(21), + /** + * + * + *
+     * Initial state: packet originating from a Cloud SQL instance.
+     * A CloudSQLInstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_CLOUD_SQL_INSTANCE = 22; + */ + START_FROM_CLOUD_SQL_INSTANCE(22), + /** + * + * + *
+     * Config checking state: verify ingress firewall rule.
+     * 
+ * + * APPLY_INGRESS_FIREWALL_RULE = 4; + */ + APPLY_INGRESS_FIREWALL_RULE(4), + /** + * + * + *
+     * Config checking state: verify egress firewall rule.
+     * 
+ * + * APPLY_EGRESS_FIREWALL_RULE = 5; + */ + APPLY_EGRESS_FIREWALL_RULE(5), + /** + * + * + *
+     * Config checking state: verify route.
+     * 
+ * + * APPLY_ROUTE = 6; + */ + APPLY_ROUTE(6), + /** + * + * + *
+     * Config checking state: match forwarding rule.
+     * 
+ * + * APPLY_FORWARDING_RULE = 7; + */ + APPLY_FORWARDING_RULE(7), + /** + * + * + *
+     * Config checking state: packet sent or received under foreign IP
+     * address and allowed.
+     * 
+ * + * SPOOFING_APPROVED = 8; + */ + SPOOFING_APPROVED(8), + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine instance.
+     * 
+ * + * ARRIVE_AT_INSTANCE = 9; + */ + ARRIVE_AT_INSTANCE(9), + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine internal load balancer.
+     * 
+ * + * ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + */ + ARRIVE_AT_INTERNAL_LOAD_BALANCER(10), + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine external load balancer.
+     * 
+ * + * ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + */ + ARRIVE_AT_EXTERNAL_LOAD_BALANCER(11), + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN gateway.
+     * 
+ * + * ARRIVE_AT_VPN_GATEWAY = 12; + */ + ARRIVE_AT_VPN_GATEWAY(12), + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN tunnel.
+     * 
+ * + * ARRIVE_AT_VPN_TUNNEL = 13; + */ + ARRIVE_AT_VPN_TUNNEL(13), + /** + * + * + *
+     * Transition state: packet header translated.
+     * 
+ * + * NAT = 14; + */ + NAT(14), + /** + * + * + *
+     * Transition state: original connection is terminated and a new proxied
+     * connection is initiated.
+     * 
+ * + * PROXY_CONNECTION = 15; + */ + PROXY_CONNECTION(15), + /** + * + * + *
+     * Final state: packet could be delivered.
+     * 
+ * + * DELIVER = 16; + */ + DELIVER(16), + /** + * + * + *
+     * Final state: packet could be dropped.
+     * 
+ * + * DROP = 17; + */ + DROP(17), + /** + * + * + *
+     * Final state: packet could be forwarded to a network with an unknown
+     * configuration.
+     * 
+ * + * FORWARD = 18; + */ + FORWARD(18), + /** + * + * + *
+     * Final state: analysis is aborted.
+     * 
+ * + * ABORT = 19; + */ + ABORT(19), + /** + * + * + *
+     * Special state: viewer of the test result does not have permission to
+     * see the configuration in this step.
+     * 
+ * + * VIEWER_PERMISSION_MISSING = 20; + */ + VIEWER_PERMISSION_MISSING(20), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Initial state: packet originating from a Compute Engine instance.
+     * An InstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_INSTANCE = 1; + */ + public static final int START_FROM_INSTANCE_VALUE = 1; + /** + * + * + *
+     * Initial state: packet originating from the internet.
+     * The endpoint information is populated.
+     * 
+ * + * START_FROM_INTERNET = 2; + */ + public static final int START_FROM_INTERNET_VALUE = 2; + /** + * + * + *
+     * Initial state: packet originating from a VPC or on-premises network
+     * with internal source IP.
+     * If the source is a VPC network visible to the user, a NetworkInfo
+     * is populated with details of the network.
+     * 
+ * + * START_FROM_PRIVATE_NETWORK = 3; + */ + public static final int START_FROM_PRIVATE_NETWORK_VALUE = 3; + /** + * + * + *
+     * Initial state: packet originating from a Google Kubernetes Engine cluster
+     * master. A GKEMasterInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_GKE_MASTER = 21; + */ + public static final int START_FROM_GKE_MASTER_VALUE = 21; + /** + * + * + *
+     * Initial state: packet originating from a Cloud SQL instance.
+     * A CloudSQLInstanceInfo is populated with starting instance information.
+     * 
+ * + * START_FROM_CLOUD_SQL_INSTANCE = 22; + */ + public static final int START_FROM_CLOUD_SQL_INSTANCE_VALUE = 22; + /** + * + * + *
+     * Config checking state: verify ingress firewall rule.
+     * 
+ * + * APPLY_INGRESS_FIREWALL_RULE = 4; + */ + public static final int APPLY_INGRESS_FIREWALL_RULE_VALUE = 4; + /** + * + * + *
+     * Config checking state: verify egress firewall rule.
+     * 
+ * + * APPLY_EGRESS_FIREWALL_RULE = 5; + */ + public static final int APPLY_EGRESS_FIREWALL_RULE_VALUE = 5; + /** + * + * + *
+     * Config checking state: verify route.
+     * 
+ * + * APPLY_ROUTE = 6; + */ + public static final int APPLY_ROUTE_VALUE = 6; + /** + * + * + *
+     * Config checking state: match forwarding rule.
+     * 
+ * + * APPLY_FORWARDING_RULE = 7; + */ + public static final int APPLY_FORWARDING_RULE_VALUE = 7; + /** + * + * + *
+     * Config checking state: packet sent or received under foreign IP
+     * address and allowed.
+     * 
+ * + * SPOOFING_APPROVED = 8; + */ + public static final int SPOOFING_APPROVED_VALUE = 8; + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine instance.
+     * 
+ * + * ARRIVE_AT_INSTANCE = 9; + */ + public static final int ARRIVE_AT_INSTANCE_VALUE = 9; + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine internal load balancer.
+     * 
+ * + * ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + */ + public static final int ARRIVE_AT_INTERNAL_LOAD_BALANCER_VALUE = 10; + /** + * + * + *
+     * Forwarding state: arriving at a Compute Engine external load balancer.
+     * 
+ * + * ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + */ + public static final int ARRIVE_AT_EXTERNAL_LOAD_BALANCER_VALUE = 11; + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN gateway.
+     * 
+ * + * ARRIVE_AT_VPN_GATEWAY = 12; + */ + public static final int ARRIVE_AT_VPN_GATEWAY_VALUE = 12; + /** + * + * + *
+     * Forwarding state: arriving at a Cloud VPN tunnel.
+     * 
+ * + * ARRIVE_AT_VPN_TUNNEL = 13; + */ + public static final int ARRIVE_AT_VPN_TUNNEL_VALUE = 13; + /** + * + * + *
+     * Transition state: packet header translated.
+     * 
+ * + * NAT = 14; + */ + public static final int NAT_VALUE = 14; + /** + * + * + *
+     * Transition state: original connection is terminated and a new proxied
+     * connection is initiated.
+     * 
+ * + * PROXY_CONNECTION = 15; + */ + public static final int PROXY_CONNECTION_VALUE = 15; + /** + * + * + *
+     * Final state: packet could be delivered.
+     * 
+ * + * DELIVER = 16; + */ + public static final int DELIVER_VALUE = 16; + /** + * + * + *
+     * Final state: packet could be dropped.
+     * 
+ * + * DROP = 17; + */ + public static final int DROP_VALUE = 17; + /** + * + * + *
+     * Final state: packet could be forwarded to a network with an unknown
+     * configuration.
+     * 
+ * + * FORWARD = 18; + */ + public static final int FORWARD_VALUE = 18; + /** + * + * + *
+     * Final state: analysis is aborted.
+     * 
+ * + * ABORT = 19; + */ + public static final int ABORT_VALUE = 19; + /** + * + * + *
+     * Special state: viewer of the test result does not have permission to
+     * see the configuration in this step.
+     * 
+ * + * VIEWER_PERMISSION_MISSING = 20; + */ + public static final int VIEWER_PERMISSION_MISSING_VALUE = 20; + + 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 STATE_UNSPECIFIED; + case 1: + return START_FROM_INSTANCE; + case 2: + return START_FROM_INTERNET; + case 3: + return START_FROM_PRIVATE_NETWORK; + case 21: + return START_FROM_GKE_MASTER; + case 22: + return START_FROM_CLOUD_SQL_INSTANCE; + case 4: + return APPLY_INGRESS_FIREWALL_RULE; + case 5: + return APPLY_EGRESS_FIREWALL_RULE; + case 6: + return APPLY_ROUTE; + case 7: + return APPLY_FORWARDING_RULE; + case 8: + return SPOOFING_APPROVED; + case 9: + return ARRIVE_AT_INSTANCE; + case 10: + return ARRIVE_AT_INTERNAL_LOAD_BALANCER; + case 11: + return ARRIVE_AT_EXTERNAL_LOAD_BALANCER; + case 12: + return ARRIVE_AT_VPN_GATEWAY; + case 13: + return ARRIVE_AT_VPN_TUNNEL; + case 14: + return NAT; + case 15: + return PROXY_CONNECTION; + case 16: + return DELIVER; + case 17: + return DROP; + case 18: + return FORWARD; + case 19: + return ABORT; + case 20: + return VIEWER_PERMISSION_MISSING; + 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.networkmanagement.v1beta1.Step.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.networkmanagement.v1beta1.Step.State) + } + + private int stepInfoCase_ = 0; + private java.lang.Object stepInfo_; + + public enum StepInfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSTANCE(5), + FIREWALL(6), + ROUTE(7), + ENDPOINT(8), + FORWARDING_RULE(9), + VPN_GATEWAY(10), + VPN_TUNNEL(11), + DELIVER(12), + FORWARD(13), + ABORT(14), + DROP(15), + LOAD_BALANCER(16), + NETWORK(17), + GKE_MASTER(18), + CLOUD_SQL_INSTANCE(19), + STEPINFO_NOT_SET(0); + private final int value; + + private StepInfoCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StepInfoCase valueOf(int value) { + return forNumber(value); + } + + public static StepInfoCase forNumber(int value) { + switch (value) { + case 5: + return INSTANCE; + case 6: + return FIREWALL; + case 7: + return ROUTE; + case 8: + return ENDPOINT; + case 9: + return FORWARDING_RULE; + case 10: + return VPN_GATEWAY; + case 11: + return VPN_TUNNEL; + case 12: + return DELIVER; + case 13: + return FORWARD; + case 14: + return ABORT; + case 15: + return DROP; + case 16: + return LOAD_BALANCER; + case 17: + return NETWORK; + case 18: + return GKE_MASTER; + case 19: + return CLOUD_SQL_INSTANCE; + case 0: + return STEPINFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StepInfoCase getStepInfoCase() { + return StepInfoCase.forNumber(stepInfoCase_); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @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; + } + } + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @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 STATE_FIELD_NUMBER = 2; + private int state_; + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.Step.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.Step.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Step.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.Step.State result = + com.google.cloud.networkmanagement.v1beta1.Step.State.valueOf(state_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.Step.State.UNRECOGNIZED + : result; + } + + public static final int CAUSES_DROP_FIELD_NUMBER = 3; + private boolean causesDrop_; + /** + * + * + *
+   * This is a step that leads to the final state Drop.
+   * 
+ * + * bool causes_drop = 3; + * + * @return The causesDrop. + */ + @java.lang.Override + public boolean getCausesDrop() { + return causesDrop_; + } + + public static final int PROJECT_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object projectId_; + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return stepInfoCase_ == 5; + } + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.InstanceInfo getInstance() { + if (stepInfoCase_ == 5) { + return (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.InstanceInfoOrBuilder getInstanceOrBuilder() { + if (stepInfoCase_ == 5) { + return (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance(); + } + + public static final int FIREWALL_FIELD_NUMBER = 6; + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + * + * @return Whether the firewall field is set. + */ + @java.lang.Override + public boolean hasFirewall() { + return stepInfoCase_ == 6; + } + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + * + * @return The firewall. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.FirewallInfo getFirewall() { + if (stepInfoCase_ == 6) { + return (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.FirewallInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.FirewallInfoOrBuilder getFirewallOrBuilder() { + if (stepInfoCase_ == 6) { + return (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.FirewallInfo.getDefaultInstance(); + } + + public static final int ROUTE_FIELD_NUMBER = 7; + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + * + * @return Whether the route field is set. + */ + @java.lang.Override + public boolean hasRoute() { + return stepInfoCase_ == 7; + } + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + * + * @return The route. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfo getRoute() { + if (stepInfoCase_ == 7) { + return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfoOrBuilder getRouteOrBuilder() { + if (stepInfoCase_ == 7) { + return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance(); + } + + public static final int ENDPOINT_FIELD_NUMBER = 8; + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + * + * @return Whether the endpoint field is set. + */ + @java.lang.Override + public boolean hasEndpoint() { + return stepInfoCase_ == 8; + } + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + * + * @return The endpoint. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo getEndpoint() { + if (stepInfoCase_ == 8) { + return (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder getEndpointOrBuilder() { + if (stepInfoCase_ == 8) { + return (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance(); + } + + public static final int FORWARDING_RULE_FIELD_NUMBER = 9; + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return Whether the forwardingRule field is set. + */ + @java.lang.Override + public boolean hasForwardingRule() { + return stepInfoCase_ == 9; + } + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return The forwardingRule. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo getForwardingRule() { + if (stepInfoCase_ == 9) { + return (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfoOrBuilder + getForwardingRuleOrBuilder() { + if (stepInfoCase_ == 9) { + return (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.getDefaultInstance(); + } + + public static final int VPN_GATEWAY_FIELD_NUMBER = 10; + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + * + * @return Whether the vpnGateway field is set. + */ + @java.lang.Override + public boolean hasVpnGateway() { + return stepInfoCase_ == 10; + } + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + * + * @return The vpnGateway. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo getVpnGateway() { + if (stepInfoCase_ == 10) { + return (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfoOrBuilder + getVpnGatewayOrBuilder() { + if (stepInfoCase_ == 10) { + return (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.getDefaultInstance(); + } + + public static final int VPN_TUNNEL_FIELD_NUMBER = 11; + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return Whether the vpnTunnel field is set. + */ + @java.lang.Override + public boolean hasVpnTunnel() { + return stepInfoCase_ == 11; + } + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return The vpnTunnel. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo getVpnTunnel() { + if (stepInfoCase_ == 11) { + return (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfoOrBuilder getVpnTunnelOrBuilder() { + if (stepInfoCase_ == 11) { + return (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.getDefaultInstance(); + } + + public static final int DELIVER_FIELD_NUMBER = 12; + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + * + * @return Whether the deliver field is set. + */ + @java.lang.Override + public boolean hasDeliver() { + return stepInfoCase_ == 12; + } + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + * + * @return The deliver. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDeliver() { + if (stepInfoCase_ == 12) { + return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder getDeliverOrBuilder() { + if (stepInfoCase_ == 12) { + return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance(); + } + + public static final int FORWARD_FIELD_NUMBER = 13; + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + * + * @return Whether the forward field is set. + */ + @java.lang.Override + public boolean hasForward() { + return stepInfoCase_ == 13; + } + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + * + * @return The forward. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardInfo getForward() { + if (stepInfoCase_ == 13) { + return (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder getForwardOrBuilder() { + if (stepInfoCase_ == 13) { + return (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance(); + } + + public static final int ABORT_FIELD_NUMBER = 14; + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + * + * @return Whether the abort field is set. + */ + @java.lang.Override + public boolean hasAbort() { + return stepInfoCase_ == 14; + } + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + * + * @return The abort. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.AbortInfo getAbort() { + if (stepInfoCase_ == 14) { + return (com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.AbortInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.AbortInfoOrBuilder getAbortOrBuilder() { + if (stepInfoCase_ == 14) { + return (com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.AbortInfo.getDefaultInstance(); + } + + public static final int DROP_FIELD_NUMBER = 15; + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + * + * @return Whether the drop field is set. + */ + @java.lang.Override + public boolean hasDrop() { + return stepInfoCase_ == 15; + } + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + * + * @return The drop. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DropInfo getDrop() { + if (stepInfoCase_ == 15) { + return (com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.DropInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DropInfoOrBuilder getDropOrBuilder() { + if (stepInfoCase_ == 15) { + return (com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.DropInfo.getDefaultInstance(); + } + + public static final int LOAD_BALANCER_FIELD_NUMBER = 16; + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + * + * @return Whether the loadBalancer field is set. + */ + @java.lang.Override + public boolean hasLoadBalancer() { + return stepInfoCase_ == 16; + } + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + * + * @return The loadBalancer. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo getLoadBalancer() { + if (stepInfoCase_ == 16) { + return (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfoOrBuilder + getLoadBalancerOrBuilder() { + if (stepInfoCase_ == 16) { + return (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.getDefaultInstance(); + } + + public static final int NETWORK_FIELD_NUMBER = 17; + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return stepInfoCase_ == 17; + } + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.NetworkInfo getNetwork() { + if (stepInfoCase_ == 17) { + return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder getNetworkOrBuilder() { + if (stepInfoCase_ == 17) { + return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance(); + } + + public static final int GKE_MASTER_FIELD_NUMBER = 18; + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + * + * @return Whether the gkeMaster field is set. + */ + @java.lang.Override + public boolean hasGkeMaster() { + return stepInfoCase_ == 18; + } + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + * + * @return The gkeMaster. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo getGkeMaster() { + if (stepInfoCase_ == 18) { + return (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfoOrBuilder getGkeMasterOrBuilder() { + if (stepInfoCase_ == 18) { + return (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance(); + } + + public static final int CLOUD_SQL_INSTANCE_FIELD_NUMBER = 19; + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return Whether the cloudSqlInstance field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstance() { + return stepInfoCase_ == 19; + } + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return The cloudSqlInstance. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo getCloudSqlInstance() { + if (stepInfoCase_ == 19) { + return (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfoOrBuilder + getCloudSqlInstanceOrBuilder() { + if (stepInfoCase_ == 19) { + return (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.getDefaultInstance(); + } + + 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 (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (state_ + != com.google.cloud.networkmanagement.v1beta1.Step.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (causesDrop_ != false) { + output.writeBool(3, causesDrop_); + } + if (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, projectId_); + } + if (stepInfoCase_ == 5) { + output.writeMessage(5, (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_); + } + if (stepInfoCase_ == 6) { + output.writeMessage(6, (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_); + } + if (stepInfoCase_ == 7) { + output.writeMessage(7, (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_); + } + if (stepInfoCase_ == 8) { + output.writeMessage(8, (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_); + } + if (stepInfoCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_); + } + if (stepInfoCase_ == 10) { + output.writeMessage( + 10, (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_); + } + if (stepInfoCase_ == 11) { + output.writeMessage(11, (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_); + } + if (stepInfoCase_ == 12) { + output.writeMessage(12, (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_); + } + if (stepInfoCase_ == 13) { + output.writeMessage(13, (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_); + } + if (stepInfoCase_ == 14) { + output.writeMessage(14, (com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_); + } + if (stepInfoCase_ == 15) { + output.writeMessage(15, (com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_); + } + if (stepInfoCase_ == 16) { + output.writeMessage( + 16, (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_); + } + if (stepInfoCase_ == 17) { + output.writeMessage(17, (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_); + } + if (stepInfoCase_ == 18) { + output.writeMessage(18, (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_); + } + if (stepInfoCase_ == 19) { + output.writeMessage( + 19, (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (state_ + != com.google.cloud.networkmanagement.v1beta1.Step.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (causesDrop_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, causesDrop_); + } + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, projectId_); + } + if (stepInfoCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_); + } + if (stepInfoCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_); + } + if (stepInfoCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_); + } + if (stepInfoCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_); + } + if (stepInfoCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_); + } + if (stepInfoCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_); + } + if (stepInfoCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_); + } + if (stepInfoCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_); + } + if (stepInfoCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_); + } + if (stepInfoCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_); + } + if (stepInfoCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_); + } + if (stepInfoCase_ == 16) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 16, (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_); + } + if (stepInfoCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_); + } + if (stepInfoCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_); + } + if (stepInfoCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_); + } + size += unknownFields.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.networkmanagement.v1beta1.Step)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.Step other = + (com.google.cloud.networkmanagement.v1beta1.Step) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (getCausesDrop() != other.getCausesDrop()) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getStepInfoCase().equals(other.getStepInfoCase())) return false; + switch (stepInfoCase_) { + case 5: + if (!getInstance().equals(other.getInstance())) return false; + break; + case 6: + if (!getFirewall().equals(other.getFirewall())) return false; + break; + case 7: + if (!getRoute().equals(other.getRoute())) return false; + break; + case 8: + if (!getEndpoint().equals(other.getEndpoint())) return false; + break; + case 9: + if (!getForwardingRule().equals(other.getForwardingRule())) return false; + break; + case 10: + if (!getVpnGateway().equals(other.getVpnGateway())) return false; + break; + case 11: + if (!getVpnTunnel().equals(other.getVpnTunnel())) return false; + break; + case 12: + if (!getDeliver().equals(other.getDeliver())) return false; + break; + case 13: + if (!getForward().equals(other.getForward())) return false; + break; + case 14: + if (!getAbort().equals(other.getAbort())) return false; + break; + case 15: + if (!getDrop().equals(other.getDrop())) return false; + break; + case 16: + if (!getLoadBalancer().equals(other.getLoadBalancer())) return false; + break; + case 17: + if (!getNetwork().equals(other.getNetwork())) return false; + break; + case 18: + if (!getGkeMaster().equals(other.getGkeMaster())) return false; + break; + case 19: + if (!getCloudSqlInstance().equals(other.getCloudSqlInstance())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + CAUSES_DROP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCausesDrop()); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + switch (stepInfoCase_) { + case 5: + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + break; + case 6: + hash = (37 * hash) + FIREWALL_FIELD_NUMBER; + hash = (53 * hash) + getFirewall().hashCode(); + break; + case 7: + hash = (37 * hash) + ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getRoute().hashCode(); + break; + case 8: + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + break; + case 9: + hash = (37 * hash) + FORWARDING_RULE_FIELD_NUMBER; + hash = (53 * hash) + getForwardingRule().hashCode(); + break; + case 10: + hash = (37 * hash) + VPN_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getVpnGateway().hashCode(); + break; + case 11: + hash = (37 * hash) + VPN_TUNNEL_FIELD_NUMBER; + hash = (53 * hash) + getVpnTunnel().hashCode(); + break; + case 12: + hash = (37 * hash) + DELIVER_FIELD_NUMBER; + hash = (53 * hash) + getDeliver().hashCode(); + break; + case 13: + hash = (37 * hash) + FORWARD_FIELD_NUMBER; + hash = (53 * hash) + getForward().hashCode(); + break; + case 14: + hash = (37 * hash) + ABORT_FIELD_NUMBER; + hash = (53 * hash) + getAbort().hashCode(); + break; + case 15: + hash = (37 * hash) + DROP_FIELD_NUMBER; + hash = (53 * hash) + getDrop().hashCode(); + break; + case 16: + hash = (37 * hash) + LOAD_BALANCER_FIELD_NUMBER; + hash = (53 * hash) + getLoadBalancer().hashCode(); + break; + case 17: + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + break; + case 18: + hash = (37 * hash) + GKE_MASTER_FIELD_NUMBER; + hash = (53 * hash) + getGkeMaster().hashCode(); + break; + case 19: + hash = (37 * hash) + CLOUD_SQL_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstance().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.Step parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.Step 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.networkmanagement.v1beta1.Step parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.Step 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.networkmanagement.v1beta1.Step parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.Step parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.Step parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.Step 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.networkmanagement.v1beta1.Step parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.Step 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.networkmanagement.v1beta1.Step parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.Step 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.networkmanagement.v1beta1.Step 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 simulated forwarding path is composed of multiple steps.
+   * Each step has a well-defined state and an associated configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.Step} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.Step) + com.google.cloud.networkmanagement.v1beta1.StepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.Step.class, + com.google.cloud.networkmanagement.v1beta1.Step.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.Step.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + description_ = ""; + + state_ = 0; + + causesDrop_ = false; + + projectId_ = ""; + + stepInfoCase_ = 0; + stepInfo_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Step_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Step getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.Step.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Step build() { + com.google.cloud.networkmanagement.v1beta1.Step result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Step buildPartial() { + com.google.cloud.networkmanagement.v1beta1.Step result = + new com.google.cloud.networkmanagement.v1beta1.Step(this); + result.description_ = description_; + result.state_ = state_; + result.causesDrop_ = causesDrop_; + result.projectId_ = projectId_; + if (stepInfoCase_ == 5) { + if (instanceBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = instanceBuilder_.build(); + } + } + if (stepInfoCase_ == 6) { + if (firewallBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = firewallBuilder_.build(); + } + } + if (stepInfoCase_ == 7) { + if (routeBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = routeBuilder_.build(); + } + } + if (stepInfoCase_ == 8) { + if (endpointBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = endpointBuilder_.build(); + } + } + if (stepInfoCase_ == 9) { + if (forwardingRuleBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = forwardingRuleBuilder_.build(); + } + } + if (stepInfoCase_ == 10) { + if (vpnGatewayBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = vpnGatewayBuilder_.build(); + } + } + if (stepInfoCase_ == 11) { + if (vpnTunnelBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = vpnTunnelBuilder_.build(); + } + } + if (stepInfoCase_ == 12) { + if (deliverBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = deliverBuilder_.build(); + } + } + if (stepInfoCase_ == 13) { + if (forwardBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = forwardBuilder_.build(); + } + } + if (stepInfoCase_ == 14) { + if (abortBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = abortBuilder_.build(); + } + } + if (stepInfoCase_ == 15) { + if (dropBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = dropBuilder_.build(); + } + } + if (stepInfoCase_ == 16) { + if (loadBalancerBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = loadBalancerBuilder_.build(); + } + } + if (stepInfoCase_ == 17) { + if (networkBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = networkBuilder_.build(); + } + } + if (stepInfoCase_ == 18) { + if (gkeMasterBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = gkeMasterBuilder_.build(); + } + } + if (stepInfoCase_ == 19) { + if (cloudSqlInstanceBuilder_ == null) { + result.stepInfo_ = stepInfo_; + } else { + result.stepInfo_ = cloudSqlInstanceBuilder_.build(); + } + } + result.stepInfoCase_ = stepInfoCase_; + 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.networkmanagement.v1beta1.Step) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.Step) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.Step other) { + if (other == com.google.cloud.networkmanagement.v1beta1.Step.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getCausesDrop() != false) { + setCausesDrop(other.getCausesDrop()); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + switch (other.getStepInfoCase()) { + case INSTANCE: + { + mergeInstance(other.getInstance()); + break; + } + case FIREWALL: + { + mergeFirewall(other.getFirewall()); + break; + } + case ROUTE: + { + mergeRoute(other.getRoute()); + break; + } + case ENDPOINT: + { + mergeEndpoint(other.getEndpoint()); + break; + } + case FORWARDING_RULE: + { + mergeForwardingRule(other.getForwardingRule()); + break; + } + case VPN_GATEWAY: + { + mergeVpnGateway(other.getVpnGateway()); + break; + } + case VPN_TUNNEL: + { + mergeVpnTunnel(other.getVpnTunnel()); + break; + } + case DELIVER: + { + mergeDeliver(other.getDeliver()); + break; + } + case FORWARD: + { + mergeForward(other.getForward()); + break; + } + case ABORT: + { + mergeAbort(other.getAbort()); + break; + } + case DROP: + { + mergeDrop(other.getDrop()); + break; + } + case LOAD_BALANCER: + { + mergeLoadBalancer(other.getLoadBalancer()); + break; + } + case NETWORK: + { + mergeNetwork(other.getNetwork()); + break; + } + case GKE_MASTER: + { + mergeGkeMaster(other.getGkeMaster()); + break; + } + case CLOUD_SQL_INSTANCE: + { + mergeCloudSqlInstance(other.getCloudSqlInstance()); + break; + } + case STEPINFO_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.Step parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.networkmanagement.v1beta1.Step) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int stepInfoCase_ = 0; + private java.lang.Object stepInfo_; + + public StepInfoCase getStepInfoCase() { + return StepInfoCase.forNumber(stepInfoCase_); + } + + public Builder clearStepInfo() { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @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; + } + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @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; + } + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the step. Usually this is a summary of the state.
+     * 
+ * + * string description = 1; + * + * @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; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Step.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Step.State state = 2; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Step.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Step.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.Step.State result = + com.google.cloud.networkmanagement.v1beta1.Step.State.valueOf(state_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.Step.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Step.State state = 2; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkmanagement.v1beta1.Step.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Each step is in one of the pre-defined states.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.Step.State state = 2; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private boolean causesDrop_; + /** + * + * + *
+     * This is a step that leads to the final state Drop.
+     * 
+ * + * bool causes_drop = 3; + * + * @return The causesDrop. + */ + @java.lang.Override + public boolean getCausesDrop() { + return causesDrop_; + } + /** + * + * + *
+     * This is a step that leads to the final state Drop.
+     * 
+ * + * bool causes_drop = 3; + * + * @param value The causesDrop to set. + * @return This builder for chaining. + */ + public Builder setCausesDrop(boolean value) { + + causesDrop_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This is a step that leads to the final state Drop.
+     * 
+ * + * bool causes_drop = 3; + * + * @return This builder for chaining. + */ + public Builder clearCausesDrop() { + + causesDrop_ = false; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID that contains the configuration this step is validating.
+     * 
+ * + * string project_id = 4; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.InstanceInfo, + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.InstanceInfoOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return stepInfoCase_ == 5; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.InstanceInfo getInstance() { + if (instanceBuilder_ == null) { + if (stepInfoCase_ == 5) { + return (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 5) { + return instanceBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + */ + public Builder setInstance(com.google.cloud.networkmanagement.v1beta1.InstanceInfo value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + stepInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + */ + public Builder setInstance( + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.Builder builderForValue) { + if (instanceBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + */ + public Builder mergeInstance(com.google.cloud.networkmanagement.v1beta1.InstanceInfo value) { + if (instanceBuilder_ == null) { + if (stepInfoCase_ == 5 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 5) { + instanceBuilder_.mergeFrom(value); + } + instanceBuilder_.setMessage(value); + } + stepInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + if (stepInfoCase_ == 5) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 5) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + instanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + */ + public com.google.cloud.networkmanagement.v1beta1.InstanceInfo.Builder getInstanceBuilder() { + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.InstanceInfoOrBuilder getInstanceOrBuilder() { + if ((stepInfoCase_ == 5) && (instanceBuilder_ != null)) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 5) { + return (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.InstanceInfo, + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.InstanceInfoOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + if (!(stepInfoCase_ == 5)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance(); + } + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.InstanceInfo, + com.google.cloud.networkmanagement.v1beta1.InstanceInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.InstanceInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 5; + onChanged(); + ; + return instanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.FirewallInfo, + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.FirewallInfoOrBuilder> + firewallBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + * + * @return Whether the firewall field is set. + */ + @java.lang.Override + public boolean hasFirewall() { + return stepInfoCase_ == 6; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + * + * @return The firewall. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.FirewallInfo getFirewall() { + if (firewallBuilder_ == null) { + if (stepInfoCase_ == 6) { + return (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.FirewallInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 6) { + return firewallBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.FirewallInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + */ + public Builder setFirewall(com.google.cloud.networkmanagement.v1beta1.FirewallInfo value) { + if (firewallBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + firewallBuilder_.setMessage(value); + } + stepInfoCase_ = 6; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + */ + public Builder setFirewall( + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.Builder builderForValue) { + if (firewallBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + firewallBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 6; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + */ + public Builder mergeFirewall(com.google.cloud.networkmanagement.v1beta1.FirewallInfo value) { + if (firewallBuilder_ == null) { + if (stepInfoCase_ == 6 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.FirewallInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 6) { + firewallBuilder_.mergeFrom(value); + } + firewallBuilder_.setMessage(value); + } + stepInfoCase_ = 6; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + */ + public Builder clearFirewall() { + if (firewallBuilder_ == null) { + if (stepInfoCase_ == 6) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 6) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + firewallBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + */ + public com.google.cloud.networkmanagement.v1beta1.FirewallInfo.Builder getFirewallBuilder() { + return getFirewallFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.FirewallInfoOrBuilder getFirewallOrBuilder() { + if ((stepInfoCase_ == 6) && (firewallBuilder_ != null)) { + return firewallBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 6) { + return (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.FirewallInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine firewall rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.FirewallInfo, + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.FirewallInfoOrBuilder> + getFirewallFieldBuilder() { + if (firewallBuilder_ == null) { + if (!(stepInfoCase_ == 6)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.FirewallInfo.getDefaultInstance(); + } + firewallBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.FirewallInfo, + com.google.cloud.networkmanagement.v1beta1.FirewallInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.FirewallInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.FirewallInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 6; + onChanged(); + ; + return firewallBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.RouteInfo, + com.google.cloud.networkmanagement.v1beta1.RouteInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.RouteInfoOrBuilder> + routeBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + * + * @return Whether the route field is set. + */ + @java.lang.Override + public boolean hasRoute() { + return stepInfoCase_ == 7; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + * + * @return The route. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfo getRoute() { + if (routeBuilder_ == null) { + if (stepInfoCase_ == 7) { + return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 7) { + return routeBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + */ + public Builder setRoute(com.google.cloud.networkmanagement.v1beta1.RouteInfo value) { + if (routeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + routeBuilder_.setMessage(value); + } + stepInfoCase_ = 7; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + */ + public Builder setRoute( + com.google.cloud.networkmanagement.v1beta1.RouteInfo.Builder builderForValue) { + if (routeBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + routeBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 7; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + */ + public Builder mergeRoute(com.google.cloud.networkmanagement.v1beta1.RouteInfo value) { + if (routeBuilder_ == null) { + if (stepInfoCase_ == 7 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.RouteInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 7) { + routeBuilder_.mergeFrom(value); + } + routeBuilder_.setMessage(value); + } + stepInfoCase_ = 7; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + */ + public Builder clearRoute() { + if (routeBuilder_ == null) { + if (stepInfoCase_ == 7) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 7) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + routeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + */ + public com.google.cloud.networkmanagement.v1beta1.RouteInfo.Builder getRouteBuilder() { + return getRouteFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.RouteInfoOrBuilder getRouteOrBuilder() { + if ((stepInfoCase_ == 7) && (routeBuilder_ != null)) { + return routeBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 7) { + return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine route.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.RouteInfo, + com.google.cloud.networkmanagement.v1beta1.RouteInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.RouteInfoOrBuilder> + getRouteFieldBuilder() { + if (routeBuilder_ == null) { + if (!(stepInfoCase_ == 7)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance(); + } + routeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.RouteInfo, + com.google.cloud.networkmanagement.v1beta1.RouteInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.RouteInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 7; + onChanged(); + ; + return routeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.EndpointInfo, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder> + endpointBuilder_; + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + * + * @return Whether the endpoint field is set. + */ + @java.lang.Override + public boolean hasEndpoint() { + return stepInfoCase_ == 8; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + * + * @return The endpoint. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo getEndpoint() { + if (endpointBuilder_ == null) { + if (stepInfoCase_ == 8) { + return (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 8) { + return endpointBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + */ + public Builder setEndpoint(com.google.cloud.networkmanagement.v1beta1.EndpointInfo value) { + if (endpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + endpointBuilder_.setMessage(value); + } + stepInfoCase_ = 8; + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + */ + public Builder setEndpoint( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder builderForValue) { + if (endpointBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + endpointBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 8; + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + */ + public Builder mergeEndpoint(com.google.cloud.networkmanagement.v1beta1.EndpointInfo value) { + if (endpointBuilder_ == null) { + if (stepInfoCase_ == 8 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 8) { + endpointBuilder_.mergeFrom(value); + } + endpointBuilder_.setMessage(value); + } + stepInfoCase_ = 8; + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + */ + public Builder clearEndpoint() { + if (endpointBuilder_ == null) { + if (stepInfoCase_ == 8) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 8) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + endpointBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + */ + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder getEndpointBuilder() { + return getEndpointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder getEndpointOrBuilder() { + if ((stepInfoCase_ == 8) && (endpointBuilder_ != null)) { + return endpointBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 8) { + return (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the source and destination under analysis.
+     * The endpoint information in an intermediate state may differ with the
+     * initial input, as it might be modified by state like NAT,
+     * or Connection Proxy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.EndpointInfo, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder> + getEndpointFieldBuilder() { + if (endpointBuilder_ == null) { + if (!(stepInfoCase_ == 8)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance(); + } + endpointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.EndpointInfo, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.EndpointInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 8; + onChanged(); + ; + return endpointBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo, + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfoOrBuilder> + forwardingRuleBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return Whether the forwardingRule field is set. + */ + @java.lang.Override + public boolean hasForwardingRule() { + return stepInfoCase_ == 9; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return The forwardingRule. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo getForwardingRule() { + if (forwardingRuleBuilder_ == null) { + if (stepInfoCase_ == 9) { + return (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 9) { + return forwardingRuleBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + */ + public Builder setForwardingRule( + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo value) { + if (forwardingRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + forwardingRuleBuilder_.setMessage(value); + } + stepInfoCase_ = 9; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + */ + public Builder setForwardingRule( + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.Builder builderForValue) { + if (forwardingRuleBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + forwardingRuleBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 9; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + */ + public Builder mergeForwardingRule( + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo value) { + if (forwardingRuleBuilder_ == null) { + if (stepInfoCase_ == 9 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 9) { + forwardingRuleBuilder_.mergeFrom(value); + } + forwardingRuleBuilder_.setMessage(value); + } + stepInfoCase_ = 9; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + */ + public Builder clearForwardingRule() { + if (forwardingRuleBuilder_ == null) { + if (stepInfoCase_ == 9) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 9) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + forwardingRuleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + */ + public com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.Builder + getForwardingRuleBuilder() { + return getForwardingRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfoOrBuilder + getForwardingRuleOrBuilder() { + if ((stepInfoCase_ == 9) && (forwardingRuleBuilder_ != null)) { + return forwardingRuleBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 9) { + return (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine forwarding rule.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo, + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfoOrBuilder> + getForwardingRuleFieldBuilder() { + if (forwardingRuleBuilder_ == null) { + if (!(stepInfoCase_ == 9)) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.getDefaultInstance(); + } + forwardingRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo, + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 9; + onChanged(); + ; + return forwardingRuleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo, + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfoOrBuilder> + vpnGatewayBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + * + * @return Whether the vpnGateway field is set. + */ + @java.lang.Override + public boolean hasVpnGateway() { + return stepInfoCase_ == 10; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + * + * @return The vpnGateway. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo getVpnGateway() { + if (vpnGatewayBuilder_ == null) { + if (stepInfoCase_ == 10) { + return (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 10) { + return vpnGatewayBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder setVpnGateway(com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo value) { + if (vpnGatewayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + vpnGatewayBuilder_.setMessage(value); + } + stepInfoCase_ = 10; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder setVpnGateway( + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.Builder builderForValue) { + if (vpnGatewayBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + vpnGatewayBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 10; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder mergeVpnGateway( + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo value) { + if (vpnGatewayBuilder_ == null) { + if (stepInfoCase_ == 10 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 10) { + vpnGatewayBuilder_.mergeFrom(value); + } + vpnGatewayBuilder_.setMessage(value); + } + stepInfoCase_ = 10; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + */ + public Builder clearVpnGateway() { + if (vpnGatewayBuilder_ == null) { + if (stepInfoCase_ == 10) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 10) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + vpnGatewayBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + */ + public com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.Builder + getVpnGatewayBuilder() { + return getVpnGatewayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfoOrBuilder + getVpnGatewayOrBuilder() { + if ((stepInfoCase_ == 10) && (vpnGatewayBuilder_ != null)) { + return vpnGatewayBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 10) { + return (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN gateway.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo, + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfoOrBuilder> + getVpnGatewayFieldBuilder() { + if (vpnGatewayBuilder_ == null) { + if (!(stepInfoCase_ == 10)) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.getDefaultInstance(); + } + vpnGatewayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo, + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 10; + onChanged(); + ; + return vpnGatewayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo, + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfoOrBuilder> + vpnTunnelBuilder_; + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return Whether the vpnTunnel field is set. + */ + @java.lang.Override + public boolean hasVpnTunnel() { + return stepInfoCase_ == 11; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return The vpnTunnel. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo getVpnTunnel() { + if (vpnTunnelBuilder_ == null) { + if (stepInfoCase_ == 11) { + return (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 11) { + return vpnTunnelBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder setVpnTunnel(com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo value) { + if (vpnTunnelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + vpnTunnelBuilder_.setMessage(value); + } + stepInfoCase_ = 11; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder setVpnTunnel( + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.Builder builderForValue) { + if (vpnTunnelBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + vpnTunnelBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 11; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder mergeVpnTunnel(com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo value) { + if (vpnTunnelBuilder_ == null) { + if (stepInfoCase_ == 11 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 11) { + vpnTunnelBuilder_.mergeFrom(value); + } + vpnTunnelBuilder_.setMessage(value); + } + stepInfoCase_ = 11; + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + */ + public Builder clearVpnTunnel() { + if (vpnTunnelBuilder_ == null) { + if (stepInfoCase_ == 11) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 11) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + vpnTunnelBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + */ + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.Builder getVpnTunnelBuilder() { + return getVpnTunnelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfoOrBuilder + getVpnTunnelOrBuilder() { + if ((stepInfoCase_ == 11) && (vpnTunnelBuilder_ != null)) { + return vpnTunnelBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 11) { + return (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Compute Engine VPN tunnel.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo, + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfoOrBuilder> + getVpnTunnelFieldBuilder() { + if (vpnTunnelBuilder_ == null) { + if (!(stepInfoCase_ == 11)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.getDefaultInstance(); + } + vpnTunnelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo, + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 11; + onChanged(); + ; + return vpnTunnelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.DeliverInfo, + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder> + deliverBuilder_; + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + * + * @return Whether the deliver field is set. + */ + @java.lang.Override + public boolean hasDeliver() { + return stepInfoCase_ == 12; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + * + * @return The deliver. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDeliver() { + if (deliverBuilder_ == null) { + if (stepInfoCase_ == 12) { + return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 12) { + return deliverBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + */ + public Builder setDeliver(com.google.cloud.networkmanagement.v1beta1.DeliverInfo value) { + if (deliverBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + deliverBuilder_.setMessage(value); + } + stepInfoCase_ = 12; + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + */ + public Builder setDeliver( + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Builder builderForValue) { + if (deliverBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + deliverBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 12; + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + */ + public Builder mergeDeliver(com.google.cloud.networkmanagement.v1beta1.DeliverInfo value) { + if (deliverBuilder_ == null) { + if (stepInfoCase_ == 12 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 12) { + deliverBuilder_.mergeFrom(value); + } + deliverBuilder_.setMessage(value); + } + stepInfoCase_ = 12; + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + */ + public Builder clearDeliver() { + if (deliverBuilder_ == null) { + if (stepInfoCase_ == 12) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 12) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + deliverBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + */ + public com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Builder getDeliverBuilder() { + return getDeliverFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder getDeliverOrBuilder() { + if ((stepInfoCase_ == 12) && (deliverBuilder_ != null)) { + return deliverBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 12) { + return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "deliver" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.DeliverInfo, + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder> + getDeliverFieldBuilder() { + if (deliverBuilder_ == null) { + if (!(stepInfoCase_ == 12)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance(); + } + deliverBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.DeliverInfo, + com.google.cloud.networkmanagement.v1beta1.DeliverInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 12; + onChanged(); + ; + return deliverBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ForwardInfo, + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder> + forwardBuilder_; + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + * + * @return Whether the forward field is set. + */ + @java.lang.Override + public boolean hasForward() { + return stepInfoCase_ == 13; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + * + * @return The forward. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardInfo getForward() { + if (forwardBuilder_ == null) { + if (stepInfoCase_ == 13) { + return (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 13) { + return forwardBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + */ + public Builder setForward(com.google.cloud.networkmanagement.v1beta1.ForwardInfo value) { + if (forwardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + forwardBuilder_.setMessage(value); + } + stepInfoCase_ = 13; + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + */ + public Builder setForward( + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder builderForValue) { + if (forwardBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + forwardBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 13; + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + */ + public Builder mergeForward(com.google.cloud.networkmanagement.v1beta1.ForwardInfo value) { + if (forwardBuilder_ == null) { + if (stepInfoCase_ == 13 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 13) { + forwardBuilder_.mergeFrom(value); + } + forwardBuilder_.setMessage(value); + } + stepInfoCase_ = 13; + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + */ + public Builder clearForward() { + if (forwardBuilder_ == null) { + if (stepInfoCase_ == 13) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 13) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + forwardBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + */ + public com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder getForwardBuilder() { + return getForwardFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder getForwardOrBuilder() { + if ((stepInfoCase_ == 13) && (forwardBuilder_ != null)) { + return forwardBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 13) { + return (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "forward" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ForwardInfo, + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder> + getForwardFieldBuilder() { + if (forwardBuilder_ == null) { + if (!(stepInfoCase_ == 13)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance(); + } + forwardBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ForwardInfo, + com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 13; + onChanged(); + ; + return forwardBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.AbortInfo, + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.AbortInfoOrBuilder> + abortBuilder_; + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + * + * @return Whether the abort field is set. + */ + @java.lang.Override + public boolean hasAbort() { + return stepInfoCase_ == 14; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + * + * @return The abort. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.AbortInfo getAbort() { + if (abortBuilder_ == null) { + if (stepInfoCase_ == 14) { + return (com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.AbortInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 14) { + return abortBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.AbortInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + */ + public Builder setAbort(com.google.cloud.networkmanagement.v1beta1.AbortInfo value) { + if (abortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + abortBuilder_.setMessage(value); + } + stepInfoCase_ = 14; + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + */ + public Builder setAbort( + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Builder builderForValue) { + if (abortBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + abortBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 14; + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + */ + public Builder mergeAbort(com.google.cloud.networkmanagement.v1beta1.AbortInfo value) { + if (abortBuilder_ == null) { + if (stepInfoCase_ == 14 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.AbortInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.AbortInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 14) { + abortBuilder_.mergeFrom(value); + } + abortBuilder_.setMessage(value); + } + stepInfoCase_ = 14; + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + */ + public Builder clearAbort() { + if (abortBuilder_ == null) { + if (stepInfoCase_ == 14) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 14) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + abortBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + */ + public com.google.cloud.networkmanagement.v1beta1.AbortInfo.Builder getAbortBuilder() { + return getAbortFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.AbortInfoOrBuilder getAbortOrBuilder() { + if ((stepInfoCase_ == 14) && (abortBuilder_ != null)) { + return abortBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 14) { + return (com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.AbortInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "abort" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.AbortInfo, + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.AbortInfoOrBuilder> + getAbortFieldBuilder() { + if (abortBuilder_ == null) { + if (!(stepInfoCase_ == 14)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.AbortInfo.getDefaultInstance(); + } + abortBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.AbortInfo, + com.google.cloud.networkmanagement.v1beta1.AbortInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.AbortInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.AbortInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 14; + onChanged(); + ; + return abortBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.DropInfo, + com.google.cloud.networkmanagement.v1beta1.DropInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.DropInfoOrBuilder> + dropBuilder_; + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + * + * @return Whether the drop field is set. + */ + @java.lang.Override + public boolean hasDrop() { + return stepInfoCase_ == 15; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + * + * @return The drop. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DropInfo getDrop() { + if (dropBuilder_ == null) { + if (stepInfoCase_ == 15) { + return (com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.DropInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 15) { + return dropBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.DropInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + */ + public Builder setDrop(com.google.cloud.networkmanagement.v1beta1.DropInfo value) { + if (dropBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + dropBuilder_.setMessage(value); + } + stepInfoCase_ = 15; + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + */ + public Builder setDrop( + com.google.cloud.networkmanagement.v1beta1.DropInfo.Builder builderForValue) { + if (dropBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + dropBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 15; + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + */ + public Builder mergeDrop(com.google.cloud.networkmanagement.v1beta1.DropInfo value) { + if (dropBuilder_ == null) { + if (stepInfoCase_ == 15 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.DropInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.DropInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 15) { + dropBuilder_.mergeFrom(value); + } + dropBuilder_.setMessage(value); + } + stepInfoCase_ = 15; + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + */ + public Builder clearDrop() { + if (dropBuilder_ == null) { + if (stepInfoCase_ == 15) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 15) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + dropBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + */ + public com.google.cloud.networkmanagement.v1beta1.DropInfo.Builder getDropBuilder() { + return getDropFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.DropInfoOrBuilder getDropOrBuilder() { + if ((stepInfoCase_ == 15) && (dropBuilder_ != null)) { + return dropBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 15) { + return (com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.DropInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the final state "drop" and reason.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.DropInfo, + com.google.cloud.networkmanagement.v1beta1.DropInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.DropInfoOrBuilder> + getDropFieldBuilder() { + if (dropBuilder_ == null) { + if (!(stepInfoCase_ == 15)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.DropInfo.getDefaultInstance(); + } + dropBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.DropInfo, + com.google.cloud.networkmanagement.v1beta1.DropInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.DropInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.DropInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 15; + onChanged(); + ; + return dropBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfoOrBuilder> + loadBalancerBuilder_; + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + * + * @return Whether the loadBalancer field is set. + */ + @java.lang.Override + public boolean hasLoadBalancer() { + return stepInfoCase_ == 16; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + * + * @return The loadBalancer. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo getLoadBalancer() { + if (loadBalancerBuilder_ == null) { + if (stepInfoCase_ == 16) { + return (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 16) { + return loadBalancerBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + */ + public Builder setLoadBalancer( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo value) { + if (loadBalancerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + loadBalancerBuilder_.setMessage(value); + } + stepInfoCase_ = 16; + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + */ + public Builder setLoadBalancer( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.Builder builderForValue) { + if (loadBalancerBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + loadBalancerBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 16; + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + */ + public Builder mergeLoadBalancer( + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo value) { + if (loadBalancerBuilder_ == null) { + if (stepInfoCase_ == 16 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 16) { + loadBalancerBuilder_.mergeFrom(value); + } + loadBalancerBuilder_.setMessage(value); + } + stepInfoCase_ = 16; + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + */ + public Builder clearLoadBalancer() { + if (loadBalancerBuilder_ == null) { + if (stepInfoCase_ == 16) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 16) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + loadBalancerBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + */ + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.Builder + getLoadBalancerBuilder() { + return getLoadBalancerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfoOrBuilder + getLoadBalancerOrBuilder() { + if ((stepInfoCase_ == 16) && (loadBalancerBuilder_ != null)) { + return loadBalancerBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 16) { + return (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of the load balancers.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfoOrBuilder> + getLoadBalancerFieldBuilder() { + if (loadBalancerBuilder_ == null) { + if (!(stepInfoCase_ == 16)) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.getDefaultInstance(); + } + loadBalancerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 16; + onChanged(); + ; + return loadBalancerBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.NetworkInfo, + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return stepInfoCase_ == 17; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.NetworkInfo getNetwork() { + if (networkBuilder_ == null) { + if (stepInfoCase_ == 17) { + return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 17) { + return networkBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + */ + public Builder setNetwork(com.google.cloud.networkmanagement.v1beta1.NetworkInfo value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + networkBuilder_.setMessage(value); + } + stepInfoCase_ = 17; + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + */ + public Builder setNetwork( + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.Builder builderForValue) { + if (networkBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 17; + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + */ + public Builder mergeNetwork(com.google.cloud.networkmanagement.v1beta1.NetworkInfo value) { + if (networkBuilder_ == null) { + if (stepInfoCase_ == 17 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 17) { + networkBuilder_.mergeFrom(value); + } + networkBuilder_.setMessage(value); + } + stepInfoCase_ = 17; + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + */ + public Builder clearNetwork() { + if (networkBuilder_ == null) { + if (stepInfoCase_ == 17) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 17) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + networkBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + */ + public com.google.cloud.networkmanagement.v1beta1.NetworkInfo.Builder getNetworkBuilder() { + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder getNetworkOrBuilder() { + if ((stepInfoCase_ == 17) && (networkBuilder_ != null)) { + return networkBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 17) { + return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Cloud network.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.NetworkInfo, + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + if (!(stepInfoCase_ == 17)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance(); + } + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.NetworkInfo, + com.google.cloud.networkmanagement.v1beta1.NetworkInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 17; + onChanged(); + ; + return networkBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo, + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfoOrBuilder> + gkeMasterBuilder_; + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + * + * @return Whether the gkeMaster field is set. + */ + @java.lang.Override + public boolean hasGkeMaster() { + return stepInfoCase_ == 18; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + * + * @return The gkeMaster. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo getGkeMaster() { + if (gkeMasterBuilder_ == null) { + if (stepInfoCase_ == 18) { + return (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 18) { + return gkeMasterBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + */ + public Builder setGkeMaster(com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo value) { + if (gkeMasterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + gkeMasterBuilder_.setMessage(value); + } + stepInfoCase_ = 18; + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + */ + public Builder setGkeMaster( + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.Builder builderForValue) { + if (gkeMasterBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + gkeMasterBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 18; + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + */ + public Builder mergeGkeMaster(com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo value) { + if (gkeMasterBuilder_ == null) { + if (stepInfoCase_ == 18 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 18) { + gkeMasterBuilder_.mergeFrom(value); + } + gkeMasterBuilder_.setMessage(value); + } + stepInfoCase_ = 18; + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + */ + public Builder clearGkeMaster() { + if (gkeMasterBuilder_ == null) { + if (stepInfoCase_ == 18) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 18) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + gkeMasterBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + */ + public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.Builder getGkeMasterBuilder() { + return getGkeMasterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfoOrBuilder + getGkeMasterOrBuilder() { + if ((stepInfoCase_ == 18) && (gkeMasterBuilder_ != null)) { + return gkeMasterBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 18) { + return (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Google Kubernetes Engine cluster master.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo, + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfoOrBuilder> + getGkeMasterFieldBuilder() { + if (gkeMasterBuilder_ == null) { + if (!(stepInfoCase_ == 18)) { + stepInfo_ = com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance(); + } + gkeMasterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo, + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 18; + onChanged(); + ; + return gkeMasterBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo, + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfoOrBuilder> + cloudSqlInstanceBuilder_; + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return Whether the cloudSqlInstance field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstance() { + return stepInfoCase_ == 19; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return The cloudSqlInstance. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo getCloudSqlInstance() { + if (cloudSqlInstanceBuilder_ == null) { + if (stepInfoCase_ == 19) { + return (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.getDefaultInstance(); + } else { + if (stepInfoCase_ == 19) { + return cloudSqlInstanceBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public Builder setCloudSqlInstance( + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo value) { + if (cloudSqlInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + cloudSqlInstanceBuilder_.setMessage(value); + } + stepInfoCase_ = 19; + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public Builder setCloudSqlInstance( + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.Builder builderForValue) { + if (cloudSqlInstanceBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + cloudSqlInstanceBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 19; + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public Builder mergeCloudSqlInstance( + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo value) { + if (cloudSqlInstanceBuilder_ == null) { + if (stepInfoCase_ == 19 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 19) { + cloudSqlInstanceBuilder_.mergeFrom(value); + } + cloudSqlInstanceBuilder_.setMessage(value); + } + stepInfoCase_ = 19; + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public Builder clearCloudSqlInstance() { + if (cloudSqlInstanceBuilder_ == null) { + if (stepInfoCase_ == 19) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 19) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + cloudSqlInstanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + public com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.Builder + getCloudSqlInstanceBuilder() { + return getCloudSqlInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfoOrBuilder + getCloudSqlInstanceOrBuilder() { + if ((stepInfoCase_ == 19) && (cloudSqlInstanceBuilder_ != null)) { + return cloudSqlInstanceBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 19) { + return (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Display information of a Cloud SQL instance.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo, + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfoOrBuilder> + getCloudSqlInstanceFieldBuilder() { + if (cloudSqlInstanceBuilder_ == null) { + if (!(stepInfoCase_ == 19)) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.getDefaultInstance(); + } + cloudSqlInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo, + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 19; + onChanged(); + ; + return cloudSqlInstanceBuilder_; + } + + @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.networkmanagement.v1beta1.Step) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.Step) + private static final com.google.cloud.networkmanagement.v1beta1.Step DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.Step(); + } + + public static com.google.cloud.networkmanagement.v1beta1.Step getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Step parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Step(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.Step getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/StepOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/StepOrBuilder.java new file mode 100644 index 00000000..e03b51a4 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/StepOrBuilder.java @@ -0,0 +1,654 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface StepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.Step) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of the step. Usually this is a summary of the state.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.Step.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Each step is in one of the pre-defined states.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.Step.State state = 2; + * + * @return The state. + */ + com.google.cloud.networkmanagement.v1beta1.Step.State getState(); + + /** + * + * + *
+   * This is a step that leads to the final state Drop.
+   * 
+ * + * bool causes_drop = 3; + * + * @return The causesDrop. + */ + boolean getCausesDrop(); + + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Project ID that contains the configuration this step is validating.
+   * 
+ * + * string project_id = 4; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + * + * @return The instance. + */ + com.google.cloud.networkmanagement.v1beta1.InstanceInfo getInstance(); + /** + * + * + *
+   * Display information of a Compute Engine instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; + */ + com.google.cloud.networkmanagement.v1beta1.InstanceInfoOrBuilder getInstanceOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + * + * @return Whether the firewall field is set. + */ + boolean hasFirewall(); + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + * + * @return The firewall. + */ + com.google.cloud.networkmanagement.v1beta1.FirewallInfo getFirewall(); + /** + * + * + *
+   * Display information of a Compute Engine firewall rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.FirewallInfo firewall = 6; + */ + com.google.cloud.networkmanagement.v1beta1.FirewallInfoOrBuilder getFirewallOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + * + * @return Whether the route field is set. + */ + boolean hasRoute(); + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + * + * @return The route. + */ + com.google.cloud.networkmanagement.v1beta1.RouteInfo getRoute(); + /** + * + * + *
+   * Display information of a Compute Engine route.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.RouteInfo route = 7; + */ + com.google.cloud.networkmanagement.v1beta1.RouteInfoOrBuilder getRouteOrBuilder(); + + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + * + * @return Whether the endpoint field is set. + */ + boolean hasEndpoint(); + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + * + * @return The endpoint. + */ + com.google.cloud.networkmanagement.v1beta1.EndpointInfo getEndpoint(); + /** + * + * + *
+   * Display information of the source and destination under analysis.
+   * The endpoint information in an intermediate state may differ with the
+   * initial input, as it might be modified by state like NAT,
+   * or Connection Proxy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint = 8; + */ + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder getEndpointOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return Whether the forwardingRule field is set. + */ + boolean hasForwardingRule(); + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + * + * @return The forwardingRule. + */ + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo getForwardingRule(); + /** + * + * + *
+   * Display information of a Compute Engine forwarding rule.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo forwarding_rule = 9; + */ + com.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfoOrBuilder + getForwardingRuleOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + * + * @return Whether the vpnGateway field is set. + */ + boolean hasVpnGateway(); + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + * + * @return The vpnGateway. + */ + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo getVpnGateway(); + /** + * + * + *
+   * Display information of a Compute Engine VPN gateway.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnGatewayInfo vpn_gateway = 10; + */ + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfoOrBuilder getVpnGatewayOrBuilder(); + + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return Whether the vpnTunnel field is set. + */ + boolean hasVpnTunnel(); + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + * + * @return The vpnTunnel. + */ + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo getVpnTunnel(); + /** + * + * + *
+   * Display information of a Compute Engine VPN tunnel.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo vpn_tunnel = 11; + */ + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfoOrBuilder getVpnTunnelOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + * + * @return Whether the deliver field is set. + */ + boolean hasDeliver(); + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + * + * @return The deliver. + */ + com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDeliver(); + /** + * + * + *
+   * Display information of the final state "deliver" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DeliverInfo deliver = 12; + */ + com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder getDeliverOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + * + * @return Whether the forward field is set. + */ + boolean hasForward(); + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + * + * @return The forward. + */ + com.google.cloud.networkmanagement.v1beta1.ForwardInfo getForward(); + /** + * + * + *
+   * Display information of the final state "forward" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.ForwardInfo forward = 13; + */ + com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder getForwardOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + * + * @return Whether the abort field is set. + */ + boolean hasAbort(); + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + * + * @return The abort. + */ + com.google.cloud.networkmanagement.v1beta1.AbortInfo getAbort(); + /** + * + * + *
+   * Display information of the final state "abort" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.AbortInfo abort = 14; + */ + com.google.cloud.networkmanagement.v1beta1.AbortInfoOrBuilder getAbortOrBuilder(); + + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + * + * @return Whether the drop field is set. + */ + boolean hasDrop(); + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + * + * @return The drop. + */ + com.google.cloud.networkmanagement.v1beta1.DropInfo getDrop(); + /** + * + * + *
+   * Display information of the final state "drop" and reason.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.DropInfo drop = 15; + */ + com.google.cloud.networkmanagement.v1beta1.DropInfoOrBuilder getDropOrBuilder(); + + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + * + * @return Whether the loadBalancer field is set. + */ + boolean hasLoadBalancer(); + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + * + * @return The loadBalancer. + */ + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo getLoadBalancer(); + /** + * + * + *
+   * Display information of the load balancers.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.LoadBalancerInfo load_balancer = 16; + */ + com.google.cloud.networkmanagement.v1beta1.LoadBalancerInfoOrBuilder getLoadBalancerOrBuilder(); + + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + * + * @return The network. + */ + com.google.cloud.networkmanagement.v1beta1.NetworkInfo getNetwork(); + /** + * + * + *
+   * Display information of a Google Cloud network.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.NetworkInfo network = 17; + */ + com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + * + * @return Whether the gkeMaster field is set. + */ + boolean hasGkeMaster(); + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + * + * @return The gkeMaster. + */ + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo getGkeMaster(); + /** + * + * + *
+   * Display information of a Google Kubernetes Engine cluster master.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.GKEMasterInfo gke_master = 18; + */ + com.google.cloud.networkmanagement.v1beta1.GKEMasterInfoOrBuilder getGkeMasterOrBuilder(); + + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return Whether the cloudSqlInstance field is set. + */ + boolean hasCloudSqlInstance(); + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + * + * @return The cloudSqlInstance. + */ + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo getCloudSqlInstance(); + /** + * + * + *
+   * Display information of a Cloud SQL instance.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * + */ + com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfoOrBuilder + getCloudSqlInstanceOrBuilder(); + + public com.google.cloud.networkmanagement.v1beta1.Step.StepInfoCase getStepInfoCase(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TestOuterClass.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TestOuterClass.java new file mode 100644 index 00000000..ebf2d97b --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TestOuterClass.java @@ -0,0 +1,253 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/connectivity_test.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public final class TestOuterClass { + private TestOuterClass() {} + + 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_networkmanagement_v1beta1_ConnectivityTest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_ConnectivityTest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_ConnectivityTest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_ConnectivityTest_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_Endpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_Endpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_ReachabilityDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_ReachabilityDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_LatencyPercentile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_LatencyPercentile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_LatencyDistribution_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_LatencyDistribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_ProbingDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_ProbingDetails_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/networkmanagement/v1beta1" + + "/connectivity_test.proto\022&google.cloud.n" + + "etworkmanagement.v1beta1\032\037google/api/fie" + + "ld_behavior.proto\032\031google/api/resource.p" + + "roto\0322google/cloud/networkmanagement/v1b" + + "eta1/trace.proto\032\037google/protobuf/timest" + + "amp.proto\032\027google/rpc/status.proto\032\034goog" + + "le/api/annotations.proto\"\261\006\n\020Connectivit" + + "yTest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\013description\030" + + "\002 \001(\t\022E\n\006source\030\003 \001(\01320.google.cloud.net" + + "workmanagement.v1beta1.EndpointB\003\340A\002\022J\n\013" + + "destination\030\004 \001(\01320.google.cloud.network" + + "management.v1beta1.EndpointB\003\340A\002\022\020\n\010prot" + + "ocol\030\005 \001(\t\022\030\n\020related_projects\030\006 \003(\t\022\031\n\014" + + "display_name\030\007 \001(\tB\003\340A\003\022T\n\006labels\030\010 \003(\0132" + + "D.google.cloud.networkmanagement.v1beta1" + + ".ConnectivityTest.LabelsEntry\0224\n\013create_" + + "time\030\n \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\0224\n\013update_time\030\013 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\022^\n\024reachability_detail" + + "s\030\014 \001(\0132;.google.cloud.networkmanagement" + + ".v1beta1.ReachabilityDetailsB\003\340A\003\022T\n\017pro" + + "bing_details\030\016 \001(\01326.google.cloud.networ" + + "kmanagement.v1beta1.ProbingDetailsB\003\340A\003\032" + + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001:t\352Aq\n1networkmanagement.googleapi" + + "s.com/ConnectivityTest\022 + * Trace represents one simulated packet forwarding path. + * * Each trace contains multiple ordered steps. + * * Each step is in a particular state with associated configuration. + * * State is categorized as final or non-final states. + * * Each final state has a reason associated. + * * Each trace must end with a final state (the last step). + * ``` + * |---------------------Trace----------------------| + * Step1(State) Step2(State) --- StepN(State(final)) + * ``` + * + * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.Trace} + */ +public final class Trace extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.Trace) + TraceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Trace.newBuilder() to construct. + private Trace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Trace() { + steps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Trace(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Trace( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder subBuilder = null; + if (endpointInfo_ != null) { + subBuilder = endpointInfo_.toBuilder(); + } + endpointInfo_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endpointInfo_); + endpointInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + steps_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + steps_.add( + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.Step.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Trace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Trace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.Trace.class, + com.google.cloud.networkmanagement.v1beta1.Trace.Builder.class); + } + + public static final int ENDPOINT_INFO_FIELD_NUMBER = 1; + private com.google.cloud.networkmanagement.v1beta1.EndpointInfo endpointInfo_; + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + * + * @return Whether the endpointInfo field is set. + */ + @java.lang.Override + public boolean hasEndpointInfo() { + return endpointInfo_ != null; + } + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + * + * @return The endpointInfo. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo getEndpointInfo() { + return endpointInfo_ == null + ? com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder + getEndpointInfoOrBuilder() { + return getEndpointInfo(); + } + + public static final int STEPS_FIELD_NUMBER = 2; + private java.util.List steps_; + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + @java.lang.Override + public java.util.List getStepsList() { + return steps_; + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + @java.lang.Override + public java.util.List + getStepsOrBuilderList() { + return steps_; + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Step getSteps(int index) { + return steps_.get(index); + } + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.StepOrBuilder getStepsOrBuilder(int index) { + return steps_.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 (endpointInfo_ != null) { + output.writeMessage(1, getEndpointInfo()); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(2, steps_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (endpointInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointInfo()); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, steps_.get(i)); + } + size += unknownFields.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.networkmanagement.v1beta1.Trace)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.Trace other = + (com.google.cloud.networkmanagement.v1beta1.Trace) obj; + + if (hasEndpointInfo() != other.hasEndpointInfo()) return false; + if (hasEndpointInfo()) { + if (!getEndpointInfo().equals(other.getEndpointInfo())) return false; + } + if (!getStepsList().equals(other.getStepsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointInfo()) { + hash = (37 * hash) + ENDPOINT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getEndpointInfo().hashCode(); + } + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.Trace parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.Trace 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.networkmanagement.v1beta1.Trace parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.Trace 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.networkmanagement.v1beta1.Trace parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.Trace parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.Trace parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.Trace 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.networkmanagement.v1beta1.Trace parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.Trace 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.networkmanagement.v1beta1.Trace parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.Trace 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.networkmanagement.v1beta1.Trace 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; + } + /** + * + * + *
+   * Trace represents one simulated packet forwarding path.
+   *   * Each trace contains multiple ordered steps.
+   *   * Each step is in a particular state with associated configuration.
+   *   * State is categorized as final or non-final states.
+   *   * Each final state has a reason associated.
+   *   * Each trace must end with a final state (the last step).
+   * ```
+   *   |---------------------Trace----------------------|
+   *   Step1(State) Step2(State) ---  StepN(State(final))
+   * ```
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.Trace} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.Trace) + com.google.cloud.networkmanagement.v1beta1.TraceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Trace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Trace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.Trace.class, + com.google.cloud.networkmanagement.v1beta1.Trace.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.Trace.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStepsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (endpointInfoBuilder_ == null) { + endpointInfo_ = null; + } else { + endpointInfo_ = null; + endpointInfoBuilder_ = null; + } + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + stepsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_Trace_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Trace getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.Trace.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Trace build() { + com.google.cloud.networkmanagement.v1beta1.Trace result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.Trace buildPartial() { + com.google.cloud.networkmanagement.v1beta1.Trace result = + new com.google.cloud.networkmanagement.v1beta1.Trace(this); + int from_bitField0_ = bitField0_; + if (endpointInfoBuilder_ == null) { + result.endpointInfo_ = endpointInfo_; + } else { + result.endpointInfo_ = endpointInfoBuilder_.build(); + } + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + 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.networkmanagement.v1beta1.Trace) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.Trace) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.Trace other) { + if (other == com.google.cloud.networkmanagement.v1beta1.Trace.getDefaultInstance()) + return this; + if (other.hasEndpointInfo()) { + mergeEndpointInfo(other.getEndpointInfo()); + } + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000001); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.Trace parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.networkmanagement.v1beta1.Trace) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.networkmanagement.v1beta1.EndpointInfo endpointInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.EndpointInfo, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder> + endpointInfoBuilder_; + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + * + * @return Whether the endpointInfo field is set. + */ + public boolean hasEndpointInfo() { + return endpointInfoBuilder_ != null || endpointInfo_ != null; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + * + * @return The endpointInfo. + */ + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo getEndpointInfo() { + if (endpointInfoBuilder_ == null) { + return endpointInfo_ == null + ? com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } else { + return endpointInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + */ + public Builder setEndpointInfo(com.google.cloud.networkmanagement.v1beta1.EndpointInfo value) { + if (endpointInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointInfo_ = value; + onChanged(); + } else { + endpointInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + */ + public Builder setEndpointInfo( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder builderForValue) { + if (endpointInfoBuilder_ == null) { + endpointInfo_ = builderForValue.build(); + onChanged(); + } else { + endpointInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + */ + public Builder mergeEndpointInfo( + com.google.cloud.networkmanagement.v1beta1.EndpointInfo value) { + if (endpointInfoBuilder_ == null) { + if (endpointInfo_ != null) { + endpointInfo_ = + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.newBuilder(endpointInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + endpointInfo_ = value; + } + onChanged(); + } else { + endpointInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + */ + public Builder clearEndpointInfo() { + if (endpointInfoBuilder_ == null) { + endpointInfo_ = null; + onChanged(); + } else { + endpointInfo_ = null; + endpointInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + */ + public com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder + getEndpointInfoBuilder() { + + onChanged(); + return getEndpointInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + */ + public com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder + getEndpointInfoOrBuilder() { + if (endpointInfoBuilder_ != null) { + return endpointInfoBuilder_.getMessageOrBuilder(); + } else { + return endpointInfo_ == null + ? com.google.cloud.networkmanagement.v1beta1.EndpointInfo.getDefaultInstance() + : endpointInfo_; + } + } + /** + * + * + *
+     * Derived from the source and destination endpoints definition specified by
+     * user request, and validated by the data plane model.
+     * If there are multiple traces starting from different source locations, then
+     * the endpoint_info may be different between traces.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.EndpointInfo, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder> + getEndpointInfoFieldBuilder() { + if (endpointInfoBuilder_ == null) { + endpointInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.EndpointInfo, + com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder>( + getEndpointInfo(), getParentForChildren(), isClean()); + endpointInfo_ = null; + } + return endpointInfoBuilder_; + } + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + steps_ = new java.util.ArrayList(steps_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Step, + com.google.cloud.networkmanagement.v1beta1.Step.Builder, + com.google.cloud.networkmanagement.v1beta1.StepOrBuilder> + stepsBuilder_; + + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public java.util.List getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1beta1.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public Builder setSteps(int index, com.google.cloud.networkmanagement.v1beta1.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.cloud.networkmanagement.v1beta1.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public Builder addSteps(com.google.cloud.networkmanagement.v1beta1.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public Builder addSteps(int index, com.google.cloud.networkmanagement.v1beta1.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public Builder addSteps( + com.google.cloud.networkmanagement.v1beta1.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.cloud.networkmanagement.v1beta1.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public Builder addAllSteps( + java.lang.Iterable values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1beta1.Step.Builder getStepsBuilder(int index) { + return getStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1beta1.StepOrBuilder getStepsOrBuilder(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public java.util.List + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1beta1.Step.Builder addStepsBuilder() { + return getStepsFieldBuilder() + .addBuilder(com.google.cloud.networkmanagement.v1beta1.Step.getDefaultInstance()); + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public com.google.cloud.networkmanagement.v1beta1.Step.Builder addStepsBuilder(int index) { + return getStepsFieldBuilder() + .addBuilder(index, com.google.cloud.networkmanagement.v1beta1.Step.getDefaultInstance()); + } + /** + * + * + *
+     * A trace of a test contains multiple steps from the initial state to the
+     * final state (delivered, dropped, forwarded, or aborted).
+     * The steps are ordered by the processing sequence within the simulated
+     * network state machine. It is critical to preserve the order of the steps
+     * and avoid reordering or sorting them.
+     * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + public java.util.List + getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Step, + com.google.cloud.networkmanagement.v1beta1.Step.Builder, + com.google.cloud.networkmanagement.v1beta1.StepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.Step, + com.google.cloud.networkmanagement.v1beta1.Step.Builder, + com.google.cloud.networkmanagement.v1beta1.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + @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.networkmanagement.v1beta1.Trace) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.Trace) + private static final com.google.cloud.networkmanagement.v1beta1.Trace DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.Trace(); + } + + public static com.google.cloud.networkmanagement.v1beta1.Trace getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Trace parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Trace(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.Trace getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TraceOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TraceOrBuilder.java new file mode 100644 index 00000000..95166890 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TraceOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface TraceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.Trace) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + * + * @return Whether the endpointInfo field is set. + */ + boolean hasEndpointInfo(); + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + * + * @return The endpointInfo. + */ + com.google.cloud.networkmanagement.v1beta1.EndpointInfo getEndpointInfo(); + /** + * + * + *
+   * Derived from the source and destination endpoints definition specified by
+   * user request, and validated by the data plane model.
+   * If there are multiple traces starting from different source locations, then
+   * the endpoint_info may be different between traces.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.EndpointInfo endpoint_info = 1; + */ + com.google.cloud.networkmanagement.v1beta1.EndpointInfoOrBuilder getEndpointInfoOrBuilder(); + + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + java.util.List getStepsList(); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + com.google.cloud.networkmanagement.v1beta1.Step getSteps(int index); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + int getStepsCount(); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + java.util.List + getStepsOrBuilderList(); + /** + * + * + *
+   * A trace of a test contains multiple steps from the initial state to the
+   * final state (delivered, dropped, forwarded, or aborted).
+   * The steps are ordered by the processing sequence within the simulated
+   * network state machine. It is critical to preserve the order of the steps
+   * and avoid reordering or sorting them.
+   * 
+ * + * repeated .google.cloud.networkmanagement.v1beta1.Step steps = 2; + */ + com.google.cloud.networkmanagement.v1beta1.StepOrBuilder getStepsOrBuilder(int index); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TraceProto.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TraceProto.java new file mode 100644 index 00000000..1e6b7ce7 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TraceProto.java @@ -0,0 +1,526 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public final class TraceProto { + private TraceProto() {} + + 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_networkmanagement_v1beta1_Trace_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_Trace_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_Step_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_Step_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/networkmanagement/v1beta1" + + "/trace.proto\022&google.cloud.networkmanage" + + "ment.v1beta1\032\034google/api/annotations.pro" + + "to\"\221\001\n\005Trace\022K\n\rendpoint_info\030\001 \001(\01324.go" + + "ogle.cloud.networkmanagement.v1beta1.End" + + "pointInfo\022;\n\005steps\030\002 \003(\0132,.google.cloud." + + "networkmanagement.v1beta1.Step\"\276\016\n\004Step\022" + + "\023\n\013description\030\001 \001(\t\022A\n\005state\030\002 \001(\01622.go" + + "ogle.cloud.networkmanagement.v1beta1.Ste" + + "p.State\022\023\n\013causes_drop\030\003 \001(\010\022\022\n\nproject_" + + "id\030\004 \001(\t\022H\n\010instance\030\005 \001(\01324.google.clou" + + "d.networkmanagement.v1beta1.InstanceInfo" + + "H\000\022H\n\010firewall\030\006 \001(\01324.google.cloud.netw" + + "orkmanagement.v1beta1.FirewallInfoH\000\022B\n\005" + + "route\030\007 \001(\01321.google.cloud.networkmanage" + + "ment.v1beta1.RouteInfoH\000\022H\n\010endpoint\030\010 \001" + + "(\01324.google.cloud.networkmanagement.v1be" + + "ta1.EndpointInfoH\000\022U\n\017forwarding_rule\030\t " + + "\001(\0132:.google.cloud.networkmanagement.v1b" + + "eta1.ForwardingRuleInfoH\000\022M\n\013vpn_gateway" + + "\030\n \001(\01326.google.cloud.networkmanagement." + + "v1beta1.VpnGatewayInfoH\000\022K\n\nvpn_tunnel\030\013" + + " \001(\01325.google.cloud.networkmanagement.v1" + + "beta1.VpnTunnelInfoH\000\022F\n\007deliver\030\014 \001(\01323" + + ".google.cloud.networkmanagement.v1beta1." + + "DeliverInfoH\000\022F\n\007forward\030\r \001(\01323.google." + + "cloud.networkmanagement.v1beta1.ForwardI" + + "nfoH\000\022B\n\005abort\030\016 \001(\01321.google.cloud.netw" + + "orkmanagement.v1beta1.AbortInfoH\000\022@\n\004dro" + + "p\030\017 \001(\01320.google.cloud.networkmanagement" + + ".v1beta1.DropInfoH\000\022Q\n\rload_balancer\030\020 \001" + + "(\01328.google.cloud.networkmanagement.v1be" + + "ta1.LoadBalancerInfoH\000\022F\n\007network\030\021 \001(\0132" + + "3.google.cloud.networkmanagement.v1beta1" + + ".NetworkInfoH\000\022K\n\ngke_master\030\022 \001(\01325.goo" + + "gle.cloud.networkmanagement.v1beta1.GKEM" + + "asterInfoH\000\022Z\n\022cloud_sql_instance\030\023 \001(\0132" + + "<.google.cloud.networkmanagement.v1beta1" + + ".CloudSQLInstanceInfoH\000\"\270\004\n\005State\022\025\n\021STA" + + "TE_UNSPECIFIED\020\000\022\027\n\023START_FROM_INSTANCE\020" + + "\001\022\027\n\023START_FROM_INTERNET\020\002\022\036\n\032START_FROM" + + "_PRIVATE_NETWORK\020\003\022\031\n\025START_FROM_GKE_MAS" + + "TER\020\025\022!\n\035START_FROM_CLOUD_SQL_INSTANCE\020\026" + + "\022\037\n\033APPLY_INGRESS_FIREWALL_RULE\020\004\022\036\n\032APP" + + "LY_EGRESS_FIREWALL_RULE\020\005\022\017\n\013APPLY_ROUTE" + + "\020\006\022\031\n\025APPLY_FORWARDING_RULE\020\007\022\025\n\021SPOOFIN" + + "G_APPROVED\020\010\022\026\n\022ARRIVE_AT_INSTANCE\020\t\022$\n " + + "ARRIVE_AT_INTERNAL_LOAD_BALANCER\020\n\022$\n AR" + + "RIVE_AT_EXTERNAL_LOAD_BALANCER\020\013\022\031\n\025ARRI" + + "VE_AT_VPN_GATEWAY\020\014\022\030\n\024ARRIVE_AT_VPN_TUN" + + "NEL\020\r\022\007\n\003NAT\020\016\022\024\n\020PROXY_CONNECTION\020\017\022\013\n\007" + + "DELIVER\020\020\022\010\n\004DROP\020\021\022\013\n\007FORWARD\020\022\022\t\n\005ABOR" + + "T\020\023\022\035\n\031VIEWER_PERMISSION_MISSING\020\024B\013\n\tst" + + "ep_info\"\266\001\n\014InstanceInfo\022\024\n\014display_name" + + "\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\021\n\tinterface\030\003 \001(\t\022\023" + + "\n\013network_uri\030\004 \001(\t\022\023\n\013internal_ip\030\005 \001(\t" + + "\022\023\n\013external_ip\030\006 \001(\t\022\024\n\014network_tags\030\007 " + + "\003(\t\022\033\n\017service_account\030\010 \001(\tB\002\030\001\"J\n\013Netw" + + "orkInfo\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001" + + "(\t\022\030\n\020matched_ip_range\030\004 \001(\t\"\272\003\n\014Firewal" + + "lInfo\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t" + + "\022\021\n\tdirection\030\003 \001(\t\022\016\n\006action\030\004 \001(\t\022\020\n\010p" + + "riority\030\005 \001(\005\022\023\n\013network_uri\030\006 \001(\t\022\023\n\013ta" + + "rget_tags\030\007 \003(\t\022\037\n\027target_service_accoun" + + "ts\030\010 \003(\t\022\016\n\006policy\030\t \001(\t\022a\n\022firewall_rul" + + "e_type\030\n \001(\0162E.google.cloud.networkmanag" + + "ement.v1beta1.FirewallInfo.FirewallRuleT" + + "ype\"\223\001\n\020FirewallRuleType\022\"\n\036FIREWALL_RUL" + + "E_TYPE_UNSPECIFIED\020\000\022%\n!HIERARCHICAL_FIR" + + "EWALL_POLICY_RULE\020\001\022\025\n\021VPC_FIREWALL_RULE" + + "\020\002\022\035\n\031IMPLIED_VPC_FIREWALL_RULE\020\003\"\342\005\n\tRo" + + "uteInfo\022O\n\nroute_type\030\010 \001(\0162;.google.clo" + + "ud.networkmanagement.v1beta1.RouteInfo.R" + + "outeType\022T\n\rnext_hop_type\030\t \001(\0162=.google" + + ".cloud.networkmanagement.v1beta1.RouteIn" + + "fo.NextHopType\022\024\n\014display_name\030\001 \001(\t\022\013\n\003" + + "uri\030\002 \001(\t\022\025\n\rdest_ip_range\030\003 \001(\t\022\020\n\010next" + + "_hop\030\004 \001(\t\022\023\n\013network_uri\030\005 \001(\t\022\020\n\010prior" + + "ity\030\006 \001(\005\022\025\n\rinstance_tags\030\007 \003(\t\"\211\001\n\tRou" + + "teType\022\032\n\026ROUTE_TYPE_UNSPECIFIED\020\000\022\n\n\006SU" + + "BNET\020\001\022\n\n\006STATIC\020\002\022\013\n\007DYNAMIC\020\003\022\022\n\016PEERI" + + "NG_SUBNET\020\004\022\022\n\016PEERING_STATIC\020\005\022\023\n\017PEERI" + + "NG_DYNAMIC\020\006\"\227\002\n\013NextHopType\022\035\n\031NEXT_HOP" + + "_TYPE_UNSPECIFIED\020\000\022\017\n\013NEXT_HOP_IP\020\001\022\025\n\021" + + "NEXT_HOP_INSTANCE\020\002\022\024\n\020NEXT_HOP_NETWORK\020" + + "\003\022\024\n\020NEXT_HOP_PEERING\020\004\022\031\n\025NEXT_HOP_INTE" + + "RCONNECT\020\005\022\027\n\023NEXT_HOP_VPN_TUNNEL\020\006\022\030\n\024N" + + "EXT_HOP_VPN_GATEWAY\020\007\022\035\n\031NEXT_HOP_INTERN" + + "ET_GATEWAY\020\010\022\026\n\022NEXT_HOP_BLACKHOLE\020\t\022\020\n\014" + + "NEXT_HOP_ILB\020\n\"\237\001\n\022ForwardingRuleInfo\022\024\n" + + "\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\030\n\020matc" + + "hed_protocol\030\003 \001(\t\022\032\n\022matched_port_range" + + "\030\006 \001(\t\022\013\n\003vip\030\004 \001(\t\022\016\n\006target\030\005 \001(\t\022\023\n\013n" + + "etwork_uri\030\007 \001(\t\"\270\004\n\020LoadBalancerInfo\022e\n" + + "\022load_balancer_type\030\001 \001(\0162I.google.cloud" + + ".networkmanagement.v1beta1.LoadBalancerI" + + "nfo.LoadBalancerType\022\030\n\020health_check_uri" + + "\030\002 \001(\t\022M\n\010backends\030\003 \003(\0132;.google.cloud." + + "networkmanagement.v1beta1.LoadBalancerBa" + + "ckend\022Z\n\014backend_type\030\004 \001(\0162D.google.clo" + + "ud.networkmanagement.v1beta1.LoadBalance" + + "rInfo.BackendType\022\023\n\013backend_uri\030\005 \001(\t\"\217" + + "\001\n\020LoadBalancerType\022\"\n\036LOAD_BALANCER_TYP" + + "E_UNSPECIFIED\020\000\022\024\n\020INTERNAL_TCP_UDP\020\001\022\023\n" + + "\017NETWORK_TCP_UDP\020\002\022\016\n\nHTTP_PROXY\020\003\022\r\n\tTC" + + "P_PROXY\020\004\022\r\n\tSSL_PROXY\020\005\"Q\n\013BackendType\022" + + "\034\n\030BACKEND_TYPE_UNSPECIFIED\020\000\022\023\n\017BACKEND" + + "_SERVICE\020\001\022\017\n\013TARGET_POOL\020\002\"\373\002\n\023LoadBala" + + "ncerBackend\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri" + + "\030\002 \001(\t\022y\n\033health_check_firewall_state\030\003 " + + "\001(\0162T.google.cloud.networkmanagement.v1b" + + "eta1.LoadBalancerBackend.HealthCheckFire" + + "wallState\022,\n$health_check_allowing_firew" + + "all_rules\030\004 \003(\t\022,\n$health_check_blocking" + + "_firewall_rules\030\005 \003(\t\"j\n\030HealthCheckFire" + + "wallState\022+\n\'HEALTH_CHECK_FIREWALL_STATE" + + "_UNSPECIFIED\020\000\022\016\n\nCONFIGURED\020\001\022\021\n\rMISCON" + + "FIGURED\020\002\"\204\001\n\016VpnGatewayInfo\022\024\n\014display_" + + "name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\023\n\013network_uri\030\003" + + " \001(\t\022\022\n\nip_address\030\004 \001(\t\022\026\n\016vpn_tunnel_u" + + "ri\030\005 \001(\t\022\016\n\006region\030\006 \001(\t\"\363\002\n\rVpnTunnelIn" + + "fo\022\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\026\n" + + "\016source_gateway\030\003 \001(\t\022\026\n\016remote_gateway\030" + + "\004 \001(\t\022\031\n\021remote_gateway_ip\030\005 \001(\t\022\031\n\021sour" + + "ce_gateway_ip\030\006 \001(\t\022\023\n\013network_uri\030\007 \001(\t" + + "\022\016\n\006region\030\010 \001(\t\022W\n\014routing_type\030\t \001(\0162A" + + ".google.cloud.networkmanagement.v1beta1." + + "VpnTunnelInfo.RoutingType\"[\n\013RoutingType" + + "\022\034\n\030ROUTING_TYPE_UNSPECIFIED\020\000\022\017\n\013ROUTE_" + + "BASED\020\001\022\020\n\014POLICY_BASED\020\002\022\013\n\007DYNAMIC\020\003\"\267" + + "\001\n\014EndpointInfo\022\021\n\tsource_ip\030\001 \001(\t\022\026\n\016de" + + "stination_ip\030\002 \001(\t\022\020\n\010protocol\030\003 \001(\t\022\023\n\013" + + "source_port\030\004 \001(\005\022\030\n\020destination_port\030\005 " + + "\001(\005\022\032\n\022source_network_uri\030\006 \001(\t\022\037\n\027desti" + + "nation_network_uri\030\007 \001(\t\"\345\001\n\013DeliverInfo" + + "\022J\n\006target\030\001 \001(\0162:.google.cloud.networkm" + + "anagement.v1beta1.DeliverInfo.Target\022\024\n\014" + + "resource_uri\030\002 \001(\t\"t\n\006Target\022\026\n\022TARGET_U" + + "NSPECIFIED\020\000\022\014\n\010INSTANCE\020\001\022\014\n\010INTERNET\020\002" + + "\022\016\n\nGOOGLE_API\020\003\022\016\n\nGKE_MASTER\020\004\022\026\n\022CLOU" + + "D_SQL_INSTANCE\020\005\"\222\002\n\013ForwardInfo\022J\n\006targ" + + "et\030\001 \001(\0162:.google.cloud.networkmanagemen" + + "t.v1beta1.ForwardInfo.Target\022\024\n\014resource" + + "_uri\030\002 \001(\t\"\240\001\n\006Target\022\026\n\022TARGET_UNSPECIF" + + "IED\020\000\022\017\n\013PEERING_VPC\020\001\022\017\n\013VPN_GATEWAY\020\002\022" + + "\020\n\014INTERCONNECT\020\003\022\016\n\nGKE_MASTER\020\004\022\"\n\036IMP" + + "ORTED_CUSTOM_ROUTE_NEXT_HOP\020\005\022\026\n\022CLOUD_S" + + "QL_INSTANCE\020\006\"\347\003\n\tAbortInfo\022F\n\005cause\030\001 \001" + + "(\01627.google.cloud.networkmanagement.v1be" + + "ta1.AbortInfo.Cause\022\024\n\014resource_uri\030\002 \001(" + + "\t\"\373\002\n\005Cause\022\025\n\021CAUSE_UNSPECIFIED\020\000\022\023\n\017UN" + + "KNOWN_NETWORK\020\001\022\016\n\nUNKNOWN_IP\020\002\022\023\n\017UNKNO" + + "WN_PROJECT\020\003\022\025\n\021PERMISSION_DENIED\020\004\022\026\n\022N" + + "O_SOURCE_LOCATION\020\005\022\024\n\020INVALID_ARGUMENT\020" + + "\006\022\022\n\016NO_EXTERNAL_IP\020\007\022\032\n\026UNINTENDED_DEST" + + "INATION\020\010\022\022\n\016TRACE_TOO_LONG\020\t\022\022\n\016INTERNA" + + "L_ERROR\020\n\022\035\n\031SOURCE_ENDPOINT_NOT_FOUND\020\013" + + "\022\035\n\031MISMATCHED_SOURCE_NETWORK\020\014\022\"\n\036DESTI" + + "NATION_ENDPOINT_NOT_FOUND\020\r\022\"\n\036MISMATCHE" + + "D_DESTINATION_NETWORK\020\016\"\237\006\n\010DropInfo\022E\n\005" + + "cause\030\001 \001(\01626.google.cloud.networkmanage" + + "ment.v1beta1.DropInfo.Cause\022\024\n\014resource_" + + "uri\030\002 \001(\t\"\265\005\n\005Cause\022\025\n\021CAUSE_UNSPECIFIED" + + "\020\000\022\034\n\030UNKNOWN_EXTERNAL_ADDRESS\020\001\022\031\n\025FORE" + + "IGN_IP_DISALLOWED\020\002\022\021\n\rFIREWALL_RULE\020\003\022\014" + + "\n\010NO_ROUTE\020\004\022\023\n\017ROUTE_BLACKHOLE\020\005\022\027\n\023ROU" + + "TE_WRONG_NETWORK\020\006\022\037\n\033PRIVATE_TRAFFIC_TO" + + "_INTERNET\020\007\022$\n PRIVATE_GOOGLE_ACCESS_DIS" + + "ALLOWED\020\010\022\027\n\023NO_EXTERNAL_ADDRESS\020\t\022\034\n\030UN" + + "KNOWN_INTERNAL_ADDRESS\020\n\022\034\n\030FORWARDING_R" + + "ULE_MISMATCH\020\013\022 \n\034FORWARDING_RULE_NO_INS" + + "TANCES\020\014\0228\n4FIREWALL_BLOCKING_LOAD_BALAN" + + "CER_BACKEND_HEALTH_CHECK\020\r\022\030\n\024INSTANCE_N" + + "OT_RUNNING\020\016\022\030\n\024TRAFFIC_TYPE_BLOCKED\020\017\022\"" + + "\n\036GKE_MASTER_UNAUTHORIZED_ACCESS\020\020\022*\n&CL" + + "OUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS\020\021\022\036" + + "\n\032DROPPED_INSIDE_GKE_SERVICE\020\022\022$\n DROPPE" + + "D_INSIDE_CLOUD_SQL_SERVICE\020\023\022%\n!GOOGLE_M" + + "ANAGED_SERVICE_NO_PEERING\020\024\022$\n CLOUD_SQL" + + "_INSTANCE_NO_IP_ADDRESS\020\025\"k\n\rGKEMasterIn" + + "fo\022\023\n\013cluster_uri\030\002 \001(\t\022\033\n\023cluster_netwo" + + "rk_uri\030\004 \001(\t\022\023\n\013internal_ip\030\005 \001(\t\022\023\n\013ext" + + "ernal_ip\030\006 \001(\t\"\210\001\n\024CloudSQLInstanceInfo\022" + + "\024\n\014display_name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022\023\n\013ne" + + "twork_uri\030\004 \001(\t\022\023\n\013internal_ip\030\005 \001(\t\022\023\n\013" + + "external_ip\030\006 \001(\t\022\016\n\006region\030\007 \001(\tB\221\002\n*co" + + "m.google.cloud.networkmanagement.v1beta1" + + "B\nTraceProtoP\001ZWgoogle.golang.org/genpro" + + "to/googleapis/cloud/networkmanagement/v1" + + "beta1;networkmanagement\252\002&Google.Cloud.N" + + "etworkManagement.V1Beta1\312\002&Google\\Cloud\\" + + "NetworkManagement\\V1beta1\352\002)Google::Clou" + + "d::NetworkManagement::V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_networkmanagement_v1beta1_Trace_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_networkmanagement_v1beta1_Trace_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_Trace_descriptor, + new java.lang.String[] { + "EndpointInfo", "Steps", + }); + internal_static_google_cloud_networkmanagement_v1beta1_Step_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_networkmanagement_v1beta1_Step_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_Step_descriptor, + new java.lang.String[] { + "Description", + "State", + "CausesDrop", + "ProjectId", + "Instance", + "Firewall", + "Route", + "Endpoint", + "ForwardingRule", + "VpnGateway", + "VpnTunnel", + "Deliver", + "Forward", + "Abort", + "Drop", + "LoadBalancer", + "Network", + "GkeMaster", + "CloudSqlInstance", + "StepInfo", + }); + internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "Interface", + "NetworkUri", + "InternalIp", + "ExternalIp", + "NetworkTags", + "ServiceAccount", + }); + internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_NetworkInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "MatchedIpRange", + }); + internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_FirewallInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "Direction", + "Action", + "Priority", + "NetworkUri", + "TargetTags", + "TargetServiceAccounts", + "Policy", + "FirewallRuleType", + }); + internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_RouteInfo_descriptor, + new java.lang.String[] { + "RouteType", + "NextHopType", + "DisplayName", + "Uri", + "DestIpRange", + "NextHop", + "NetworkUri", + "Priority", + "InstanceTags", + }); + internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_ForwardingRuleInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "MatchedProtocol", + "MatchedPortRange", + "Vip", + "Target", + "NetworkUri", + }); + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerInfo_descriptor, + new java.lang.String[] { + "LoadBalancerType", "HealthCheckUri", "Backends", "BackendType", "BackendUri", + }); + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_LoadBalancerBackend_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "HealthCheckFirewallState", + "HealthCheckAllowingFirewallRules", + "HealthCheckBlockingFirewallRules", + }); + internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "NetworkUri", "IpAddress", "VpnTunnelUri", "Region", + }); + internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_descriptor, + new java.lang.String[] { + "DisplayName", + "Uri", + "SourceGateway", + "RemoteGateway", + "RemoteGatewayIp", + "SourceGatewayIp", + "NetworkUri", + "Region", + "RoutingType", + }); + internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_EndpointInfo_descriptor, + new java.lang.String[] { + "SourceIp", + "DestinationIp", + "Protocol", + "SourcePort", + "DestinationPort", + "SourceNetworkUri", + "DestinationNetworkUri", + }); + internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_DeliverInfo_descriptor, + new java.lang.String[] { + "Target", "ResourceUri", + }); + internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_ForwardInfo_descriptor, + new java.lang.String[] { + "Target", "ResourceUri", + }); + internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_AbortInfo_descriptor, + new java.lang.String[] { + "Cause", "ResourceUri", + }); + internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_DropInfo_descriptor, + new java.lang.String[] { + "Cause", "ResourceUri", + }); + internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_GKEMasterInfo_descriptor, + new java.lang.String[] { + "ClusterUri", "ClusterNetworkUri", "InternalIp", "ExternalIp", + }); + internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_CloudSQLInstanceInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Uri", "NetworkUri", "InternalIp", "ExternalIp", "Region", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/UpdateConnectivityTestRequest.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/UpdateConnectivityTestRequest.java new file mode 100644 index 00000000..fad09f7c --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/UpdateConnectivityTestRequest.java @@ -0,0 +1,1076 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * Request for the `UpdateConnectivityTest` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} + */ +public final class UpdateConnectivityTestRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) + UpdateConnectivityTestRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateConnectivityTestRequest.newBuilder() to construct. + private UpdateConnectivityTestRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateConnectivityTestRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateConnectivityTestRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateConnectivityTestRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = + input.readMessage( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .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. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .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. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + private com.google.cloud.networkmanagement.v1beta1.ConnectivityTest resource_; + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getResource() { + return resource_ == null + ? com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance() + : resource_; + } + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder + getResourceOrBuilder() { + return getResource(); + } + + 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 (resource_ != null) { + output.writeMessage(2, getResource()); + } + unknownFields.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 (resource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResource()); + } + size += unknownFields.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.networkmanagement.v1beta1.UpdateConnectivityTestRequest)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest other = + (com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource().equals(other.getResource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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 (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest 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.networkmanagement.v1beta1.UpdateConnectivityTestRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest 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.networkmanagement.v1beta1.UpdateConnectivityTestRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest 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.networkmanagement.v1beta1.UpdateConnectivityTestRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + 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.networkmanagement.v1beta1.UpdateConnectivityTestRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest 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.networkmanagement.v1beta1.UpdateConnectivityTestRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `UpdateConnectivityTest` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.class, + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + if (resourceBuilder_ == null) { + resource_ = null; + } else { + resource_ = null; + resourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.ReachabilityServiceProto + .internal_static_google_cloud_networkmanagement_v1beta1_UpdateConnectivityTestRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest build() { + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest buildPartial() { + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest result = + new com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(this); + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + if (resourceBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = resourceBuilder_.build(); + } + 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.networkmanagement.v1beta1.UpdateConnectivityTestRequest) { + return mergeFrom( + (com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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. Mask of fields to update. At least one path must be supplied in
+     * this field.
+     * 
+ * + * .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.networkmanagement.v1beta1.ConnectivityTest resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder> + resourceBuilder_; + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceBuilder_ != null || resource_ != null; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getResource() { + if (resourceBuilder_ == null) { + return resource_ == null + ? com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance() + : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource(com.google.cloud.networkmanagement.v1beta1.ConnectivityTest value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeResource( + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest value) { + if (resourceBuilder_ == null) { + if (resource_ != null) { + resource_ = + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.newBuilder(resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + resourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + resource_ = null; + onChanged(); + } else { + resource_ = null; + resourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder + getResourceBuilder() { + + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder + getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null + ? com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.getDefaultInstance() + : resource_; + } + } + /** + * + * + *
+     * Required. Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest.Builder, + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder>( + getResource(), getParentForChildren(), isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + @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.networkmanagement.v1beta1.UpdateConnectivityTestRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) + private static final com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(); + } + + public static com.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateConnectivityTestRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateConnectivityTestRequest(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.UpdateConnectivityTestRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/UpdateConnectivityTestRequestOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/UpdateConnectivityTestRequestOrBuilder.java new file mode 100644 index 00000000..2cdc9d85 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/UpdateConnectivityTestRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/reachability.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface UpdateConnectivityTestRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + com.google.cloud.networkmanagement.v1beta1.ConnectivityTest getResource(); + /** + * + * + *
+   * Required. Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.networkmanagement.v1beta1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkmanagement.v1beta1.ConnectivityTestOrBuilder getResourceOrBuilder(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnGatewayInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnGatewayInfo.java new file mode 100644 index 00000000..aa7ec29b --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnGatewayInfo.java @@ -0,0 +1,1546 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine VPN gateway.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} + */ +public final class VpnGatewayInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) + VpnGatewayInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use VpnGatewayInfo.newBuilder() to construct. + private VpnGatewayInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpnGatewayInfo() { + displayName_ = ""; + uri_ = ""; + networkUri_ = ""; + ipAddress_ = ""; + vpnTunnelUri_ = ""; + region_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpnGatewayInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VpnGatewayInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + ipAddress_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + vpnTunnelUri_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + region_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.class, + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 4; + private volatile java.lang.Object ipAddress_; + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @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 VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @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 VPN_TUNNEL_URI_FIELD_NUMBER = 5; + private volatile java.lang.Object vpnTunnelUri_; + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The vpnTunnelUri. + */ + @java.lang.Override + public java.lang.String getVpnTunnelUri() { + java.lang.Object ref = vpnTunnelUri_; + 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(); + vpnTunnelUri_ = s; + return s; + } + } + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The bytes for vpnTunnelUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpnTunnelUriBytes() { + java.lang.Object ref = vpnTunnelUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpnTunnelUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 6; + private volatile java.lang.Object region_; + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + 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(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = 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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, networkUri_); + } + if (!getIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ipAddress_); + } + if (!getVpnTunnelUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, vpnTunnelUri_); + } + if (!getRegionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, region_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, networkUri_); + } + if (!getIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ipAddress_); + } + if (!getVpnTunnelUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, vpnTunnelUri_); + } + if (!getRegionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, region_); + } + size += unknownFields.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.networkmanagement.v1beta1.VpnGatewayInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo other = + (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getVpnTunnelUri().equals(other.getVpnTunnelUri())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + VPN_TUNNEL_URI_FIELD_NUMBER; + hash = (53 * hash) + getVpnTunnelUri().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo 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.networkmanagement.v1beta1.VpnGatewayInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo 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.networkmanagement.v1beta1.VpnGatewayInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo 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.networkmanagement.v1beta1.VpnGatewayInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo 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.networkmanagement.v1beta1.VpnGatewayInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo 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.networkmanagement.v1beta1.VpnGatewayInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine VPN gateway.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.class, + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + networkUri_ = ""; + + ipAddress_ = ""; + + vpnTunnelUri_ = ""; + + region_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnGatewayInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo build() { + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo result = + new com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.networkUri_ = networkUri_; + result.ipAddress_ = ipAddress_; + result.vpnTunnelUri_ = vpnTunnelUri_; + result.region_ = region_; + 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.networkmanagement.v1beta1.VpnGatewayInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (!other.getVpnTunnelUri().isEmpty()) { + vpnTunnelUri_ = other.vpnTunnelUri_; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN gateway.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN gateway is configured.
+     * 
+ * + * string network_uri = 3; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @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 VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @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 VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * IP address of the VPN gateway.
+     * 
+ * + * string ip_address = 4; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object vpnTunnelUri_ = ""; + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The vpnTunnelUri. + */ + public java.lang.String getVpnTunnelUri() { + java.lang.Object ref = vpnTunnelUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpnTunnelUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The bytes for vpnTunnelUri. + */ + public com.google.protobuf.ByteString getVpnTunnelUriBytes() { + java.lang.Object ref = vpnTunnelUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpnTunnelUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @param value The vpnTunnelUri to set. + * @return This builder for chaining. + */ + public Builder setVpnTunnelUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vpnTunnelUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearVpnTunnelUri() { + + vpnTunnelUri_ = getDefaultInstance().getVpnTunnelUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * A VPN tunnel that is associated with this VPN gateway.
+     * There may be multiple VPN tunnels configured on a VPN gateway, and only
+     * the one relevant to the test is displayed.
+     * 
+ * + * string vpn_tunnel_uri = 5; + * + * @param value The bytes for vpnTunnelUri to set. + * @return This builder for chaining. + */ + public Builder setVpnTunnelUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vpnTunnelUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + region_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + + region_ = getDefaultInstance().getRegion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN gateway is configured.
+     * 
+ * + * string region = 6; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + region_ = value; + 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.networkmanagement.v1beta1.VpnGatewayInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) + private static final com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpnGatewayInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VpnGatewayInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.VpnGatewayInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnGatewayInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnGatewayInfoOrBuilder.java new file mode 100644 index 00000000..cc59fc09 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnGatewayInfoOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface VpnGatewayInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a VPN gateway.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a VPN gateway.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network where the VPN gateway is configured.
+   * 
+ * + * string network_uri = 3; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+   * IP address of the VPN gateway.
+   * 
+ * + * string ip_address = 4; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The vpnTunnelUri. + */ + java.lang.String getVpnTunnelUri(); + /** + * + * + *
+   * A VPN tunnel that is associated with this VPN gateway.
+   * There may be multiple VPN tunnels configured on a VPN gateway, and only
+   * the one relevant to the test is displayed.
+   * 
+ * + * string vpn_tunnel_uri = 5; + * + * @return The bytes for vpnTunnelUri. + */ + com.google.protobuf.ByteString getVpnTunnelUriBytes(); + + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The region. + */ + java.lang.String getRegion(); + /** + * + * + *
+   * Name of a Google Cloud region where this VPN gateway is configured.
+   * 
+ * + * string region = 6; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnTunnelInfo.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnTunnelInfo.java new file mode 100644 index 00000000..af4ad282 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnTunnelInfo.java @@ -0,0 +1,2241 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
+ * For display only. Metadata associated with a Compute Engine VPN tunnel.
+ * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} + */ +public final class VpnTunnelInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) + VpnTunnelInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use VpnTunnelInfo.newBuilder() to construct. + private VpnTunnelInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpnTunnelInfo() { + displayName_ = ""; + uri_ = ""; + sourceGateway_ = ""; + remoteGateway_ = ""; + remoteGatewayIp_ = ""; + sourceGatewayIp_ = ""; + networkUri_ = ""; + region_ = ""; + routingType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpnTunnelInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VpnTunnelInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceGateway_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + remoteGateway_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + remoteGatewayIp_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceGatewayIp_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkUri_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + region_ = s; + break; + } + case 72: + { + int rawValue = input.readEnum(); + + routingType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.class, + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.Builder.class); + } + + /** + * + * + *
+   * Types of VPN routing policy. For details, refer to [Networks and Tunnel
+   * routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/).
+   * 
+ * + * Protobuf enum {@code google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType} + */ + public enum RoutingType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTING_TYPE_UNSPECIFIED = 0; + */ + ROUTING_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Route based VPN.
+     * 
+ * + * ROUTE_BASED = 1; + */ + ROUTE_BASED(1), + /** + * + * + *
+     * Policy based routing.
+     * 
+ * + * POLICY_BASED = 2; + */ + POLICY_BASED(2), + /** + * + * + *
+     * Dynamic (BGP) routing.
+     * 
+ * + * DYNAMIC = 3; + */ + DYNAMIC(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Default value.
+     * 
+ * + * ROUTING_TYPE_UNSPECIFIED = 0; + */ + public static final int ROUTING_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Route based VPN.
+     * 
+ * + * ROUTE_BASED = 1; + */ + public static final int ROUTE_BASED_VALUE = 1; + /** + * + * + *
+     * Policy based routing.
+     * 
+ * + * POLICY_BASED = 2; + */ + public static final int POLICY_BASED_VALUE = 2; + /** + * + * + *
+     * Dynamic (BGP) routing.
+     * 
+ * + * DYNAMIC = 3; + */ + public static final int DYNAMIC_VALUE = 3; + + 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 RoutingType 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 RoutingType forNumber(int value) { + switch (value) { + case 0: + return ROUTING_TYPE_UNSPECIFIED; + case 1: + return ROUTE_BASED; + case 2: + return POLICY_BASED; + case 3: + return DYNAMIC; + 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 RoutingType findValueByNumber(int number) { + return RoutingType.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.networkmanagement.v1beta1.VpnTunnelInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RoutingType[] VALUES = values(); + + public static RoutingType 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 RoutingType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType) + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_GATEWAY_FIELD_NUMBER = 3; + private volatile java.lang.Object sourceGateway_; + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The sourceGateway. + */ + @java.lang.Override + public java.lang.String getSourceGateway() { + java.lang.Object ref = sourceGateway_; + 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(); + sourceGateway_ = s; + return s; + } + } + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The bytes for sourceGateway. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceGatewayBytes() { + java.lang.Object ref = sourceGateway_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_GATEWAY_FIELD_NUMBER = 4; + private volatile java.lang.Object remoteGateway_; + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The remoteGateway. + */ + @java.lang.Override + public java.lang.String getRemoteGateway() { + java.lang.Object ref = remoteGateway_; + 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(); + remoteGateway_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The bytes for remoteGateway. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemoteGatewayBytes() { + java.lang.Object ref = remoteGateway_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_GATEWAY_IP_FIELD_NUMBER = 5; + private volatile java.lang.Object remoteGatewayIp_; + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The remoteGatewayIp. + */ + @java.lang.Override + public java.lang.String getRemoteGatewayIp() { + java.lang.Object ref = remoteGatewayIp_; + 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(); + remoteGatewayIp_ = s; + return s; + } + } + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The bytes for remoteGatewayIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemoteGatewayIpBytes() { + java.lang.Object ref = remoteGatewayIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_GATEWAY_IP_FIELD_NUMBER = 6; + private volatile java.lang.Object sourceGatewayIp_; + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The sourceGatewayIp. + */ + @java.lang.Override + public java.lang.String getSourceGatewayIp() { + java.lang.Object ref = sourceGatewayIp_; + 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(); + sourceGatewayIp_ = s; + return s; + } + } + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The bytes for sourceGatewayIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceGatewayIpBytes() { + java.lang.Object ref = sourceGatewayIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_URI_FIELD_NUMBER = 7; + private volatile java.lang.Object networkUri_; + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + @java.lang.Override + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + 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(); + networkUri_ = s; + return s; + } + } + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 8; + private volatile java.lang.Object region_; + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + 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(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROUTING_TYPE_FIELD_NUMBER = 9; + private int routingType_; + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The enum numeric value on the wire for routingType. + */ + @java.lang.Override + public int getRoutingTypeValue() { + return routingType_; + } + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The routingType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType getRoutingType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType result = + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType.valueOf(routingType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType.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 (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getSourceGatewayBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceGateway_); + } + if (!getRemoteGatewayBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, remoteGateway_); + } + if (!getRemoteGatewayIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remoteGatewayIp_); + } + if (!getSourceGatewayIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourceGatewayIp_); + } + if (!getNetworkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkUri_); + } + if (!getRegionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, region_); + } + if (routingType_ + != com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType + .ROUTING_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, routingType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getSourceGatewayBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceGateway_); + } + if (!getRemoteGatewayBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, remoteGateway_); + } + if (!getRemoteGatewayIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remoteGatewayIp_); + } + if (!getSourceGatewayIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sourceGatewayIp_); + } + if (!getNetworkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, networkUri_); + } + if (!getRegionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, region_); + } + if (routingType_ + != com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType + .ROUTING_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, routingType_); + } + size += unknownFields.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.networkmanagement.v1beta1.VpnTunnelInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo other = + (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getSourceGateway().equals(other.getSourceGateway())) return false; + if (!getRemoteGateway().equals(other.getRemoteGateway())) return false; + if (!getRemoteGatewayIp().equals(other.getRemoteGatewayIp())) return false; + if (!getSourceGatewayIp().equals(other.getSourceGatewayIp())) return false; + if (!getNetworkUri().equals(other.getNetworkUri())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (routingType_ != other.routingType_) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + SOURCE_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getSourceGateway().hashCode(); + hash = (37 * hash) + REMOTE_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getRemoteGateway().hashCode(); + hash = (37 * hash) + REMOTE_GATEWAY_IP_FIELD_NUMBER; + hash = (53 * hash) + getRemoteGatewayIp().hashCode(); + hash = (37 * hash) + SOURCE_GATEWAY_IP_FIELD_NUMBER; + hash = (53 * hash) + getSourceGatewayIp().hashCode(); + hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUri().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (37 * hash) + ROUTING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + routingType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo 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.networkmanagement.v1beta1.VpnTunnelInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo 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.networkmanagement.v1beta1.VpnTunnelInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo 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.networkmanagement.v1beta1.VpnTunnelInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo 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.networkmanagement.v1beta1.VpnTunnelInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo 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.networkmanagement.v1beta1.VpnTunnelInfo 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; + } + /** + * + * + *
+   * For display only. Metadata associated with a Compute Engine VPN tunnel.
+   * 
+ * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.class, + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + uri_ = ""; + + sourceGateway_ = ""; + + remoteGateway_ = ""; + + remoteGatewayIp_ = ""; + + sourceGatewayIp_ = ""; + + networkUri_ = ""; + + region_ = ""; + + routingType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_VpnTunnelInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo build() { + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo result = + new com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(this); + result.displayName_ = displayName_; + result.uri_ = uri_; + result.sourceGateway_ = sourceGateway_; + result.remoteGateway_ = remoteGateway_; + result.remoteGatewayIp_ = remoteGatewayIp_; + result.sourceGatewayIp_ = sourceGatewayIp_; + result.networkUri_ = networkUri_; + result.region_ = region_; + result.routingType_ = routingType_; + 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.networkmanagement.v1beta1.VpnTunnelInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo other) { + if (other == com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getSourceGateway().isEmpty()) { + sourceGateway_ = other.sourceGateway_; + onChanged(); + } + if (!other.getRemoteGateway().isEmpty()) { + remoteGateway_ = other.remoteGateway_; + onChanged(); + } + if (!other.getRemoteGatewayIp().isEmpty()) { + remoteGatewayIp_ = other.remoteGatewayIp_; + onChanged(); + } + if (!other.getSourceGatewayIp().isEmpty()) { + sourceGatewayIp_ = other.sourceGatewayIp_; + onChanged(); + } + if (!other.getNetworkUri().isEmpty()) { + networkUri_ = other.networkUri_; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + onChanged(); + } + if (other.routingType_ != 0) { + setRoutingTypeValue(other.getRoutingTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a VPN tunnel.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN tunnel.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceGateway_ = ""; + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @return The sourceGateway. + */ + public java.lang.String getSourceGateway() { + java.lang.Object ref = sourceGateway_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGateway_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @return The bytes for sourceGateway. + */ + public com.google.protobuf.ByteString getSourceGatewayBytes() { + java.lang.Object ref = sourceGateway_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @param value The sourceGateway to set. + * @return This builder for chaining. + */ + public Builder setSourceGateway(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceGateway_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @return This builder for chaining. + */ + public Builder clearSourceGateway() { + + sourceGateway_ = getDefaultInstance().getSourceGateway(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of the VPN gateway at local end of the tunnel.
+     * 
+ * + * string source_gateway = 3; + * + * @param value The bytes for sourceGateway to set. + * @return This builder for chaining. + */ + public Builder setSourceGatewayBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceGateway_ = value; + onChanged(); + return this; + } + + private java.lang.Object remoteGateway_ = ""; + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @return The remoteGateway. + */ + public java.lang.String getRemoteGateway() { + java.lang.Object ref = remoteGateway_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteGateway_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @return The bytes for remoteGateway. + */ + public com.google.protobuf.ByteString getRemoteGatewayBytes() { + java.lang.Object ref = remoteGateway_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGateway_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @param value The remoteGateway to set. + * @return This builder for chaining. + */ + public Builder setRemoteGateway(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + remoteGateway_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @return This builder for chaining. + */ + public Builder clearRemoteGateway() { + + remoteGateway_ = getDefaultInstance().getRemoteGateway(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a VPN gateway at remote end of the tunnel.
+     * 
+ * + * string remote_gateway = 4; + * + * @param value The bytes for remoteGateway to set. + * @return This builder for chaining. + */ + public Builder setRemoteGatewayBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + remoteGateway_ = value; + onChanged(); + return this; + } + + private java.lang.Object remoteGatewayIp_ = ""; + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @return The remoteGatewayIp. + */ + public java.lang.String getRemoteGatewayIp() { + java.lang.Object ref = remoteGatewayIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteGatewayIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @return The bytes for remoteGatewayIp. + */ + public com.google.protobuf.ByteString getRemoteGatewayIpBytes() { + java.lang.Object ref = remoteGatewayIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @param value The remoteGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setRemoteGatewayIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + remoteGatewayIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @return This builder for chaining. + */ + public Builder clearRemoteGatewayIp() { + + remoteGatewayIp_ = getDefaultInstance().getRemoteGatewayIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Remote VPN gateway's IP address.
+     * 
+ * + * string remote_gateway_ip = 5; + * + * @param value The bytes for remoteGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setRemoteGatewayIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + remoteGatewayIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceGatewayIp_ = ""; + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @return The sourceGatewayIp. + */ + public java.lang.String getSourceGatewayIp() { + java.lang.Object ref = sourceGatewayIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGatewayIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @return The bytes for sourceGatewayIp. + */ + public com.google.protobuf.ByteString getSourceGatewayIpBytes() { + java.lang.Object ref = sourceGatewayIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGatewayIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @param value The sourceGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setSourceGatewayIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceGatewayIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @return This builder for chaining. + */ + public Builder clearSourceGatewayIp() { + + sourceGatewayIp_ = getDefaultInstance().getSourceGatewayIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Local VPN gateway's IP address.
+     * 
+ * + * string source_gateway_ip = 6; + * + * @param value The bytes for sourceGatewayIp to set. + * @return This builder for chaining. + */ + public Builder setSourceGatewayIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceGatewayIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object networkUri_ = ""; + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + public java.lang.String getNetworkUri() { + java.lang.Object ref = networkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + public com.google.protobuf.ByteString getNetworkUriBytes() { + java.lang.Object ref = networkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @param value The networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearNetworkUri() { + + networkUri_ = getDefaultInstance().getNetworkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI of a Compute Engine network where the VPN tunnel is configured.
+     * 
+ * + * string network_uri = 7; + * + * @param value The bytes for networkUri to set. + * @return This builder for chaining. + */ + public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + region_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + + region_ = getDefaultInstance().getRegion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of a Google Cloud region where this VPN tunnel is configured.
+     * 
+ * + * string region = 8; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + region_ = value; + onChanged(); + return this; + } + + private int routingType_ = 0; + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The enum numeric value on the wire for routingType. + */ + @java.lang.Override + public int getRoutingTypeValue() { + return routingType_; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @param value The enum numeric value on the wire for routingType to set. + * @return This builder for chaining. + */ + public Builder setRoutingTypeValue(int value) { + + routingType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The routingType. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType getRoutingType() { + @SuppressWarnings("deprecation") + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType result = + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType.valueOf( + routingType_); + return result == null + ? com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @param value The routingType to set. + * @return This builder for chaining. + */ + public Builder setRoutingType( + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType value) { + if (value == null) { + throw new NullPointerException(); + } + + routingType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the routing policy.
+     * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return This builder for chaining. + */ + public Builder clearRoutingType() { + + routingType_ = 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.networkmanagement.v1beta1.VpnTunnelInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) + private static final com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpnTunnelInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VpnTunnelInfo(input, extensionRegistry); + } + }; + + 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.networkmanagement.v1beta1.VpnTunnelInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnTunnelInfoOrBuilder.java b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnTunnelInfoOrBuilder.java new file mode 100644 index 00000000..5420220f --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/VpnTunnelInfoOrBuilder.java @@ -0,0 +1,252 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/networkmanagement/v1beta1/trace.proto + +package com.google.cloud.networkmanagement.v1beta1; + +public interface VpnTunnelInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name of a VPN tunnel.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * URI of a VPN tunnel.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The sourceGateway. + */ + java.lang.String getSourceGateway(); + /** + * + * + *
+   * URI of the VPN gateway at local end of the tunnel.
+   * 
+ * + * string source_gateway = 3; + * + * @return The bytes for sourceGateway. + */ + com.google.protobuf.ByteString getSourceGatewayBytes(); + + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The remoteGateway. + */ + java.lang.String getRemoteGateway(); + /** + * + * + *
+   * URI of a VPN gateway at remote end of the tunnel.
+   * 
+ * + * string remote_gateway = 4; + * + * @return The bytes for remoteGateway. + */ + com.google.protobuf.ByteString getRemoteGatewayBytes(); + + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The remoteGatewayIp. + */ + java.lang.String getRemoteGatewayIp(); + /** + * + * + *
+   * Remote VPN gateway's IP address.
+   * 
+ * + * string remote_gateway_ip = 5; + * + * @return The bytes for remoteGatewayIp. + */ + com.google.protobuf.ByteString getRemoteGatewayIpBytes(); + + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The sourceGatewayIp. + */ + java.lang.String getSourceGatewayIp(); + /** + * + * + *
+   * Local VPN gateway's IP address.
+   * 
+ * + * string source_gateway_ip = 6; + * + * @return The bytes for sourceGatewayIp. + */ + com.google.protobuf.ByteString getSourceGatewayIpBytes(); + + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The networkUri. + */ + java.lang.String getNetworkUri(); + /** + * + * + *
+   * URI of a Compute Engine network where the VPN tunnel is configured.
+   * 
+ * + * string network_uri = 7; + * + * @return The bytes for networkUri. + */ + com.google.protobuf.ByteString getNetworkUriBytes(); + + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The region. + */ + java.lang.String getRegion(); + /** + * + * + *
+   * Name of a Google Cloud region where this VPN tunnel is configured.
+   * 
+ * + * string region = 8; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); + + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The enum numeric value on the wire for routingType. + */ + int getRoutingTypeValue(); + /** + * + * + *
+   * Type of the routing policy.
+   * 
+ * + * .google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType routing_type = 9; + * + * + * @return The routingType. + */ + com.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType getRoutingType(); +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/connectivity_test.proto new file mode 100644 index 00000000..a81027d4 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/connectivity_test.proto @@ -0,0 +1,313 @@ +// 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 +// +// 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.networkmanagement.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1beta1/trace.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/networkmanagement/v1beta1;networkmanagement"; +option java_multiple_files = true; +option java_outer_classname = "TestOuterClass"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// A Connectivity Test for a network reachability analysis. +message ConnectivityTest { + option (google.api.resource) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + pattern: "projects/{project}/locations/global/connectivityTests/{test}" + }; + + // Required. Unique name of the resource using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The user-supplied description of the Connectivity Test. + // Maximum of 512 characters. + string description = 2; + + // Required. Source specification of the Connectivity Test. + // + // You can use a combination of source IP address, virtual machine + // (VM) instance, or Compute Engine network to uniquely identify + // the source location. + // + // Examples: + // If the source IP address is an internal IP address within a Google Cloud + // Virtual Private Cloud (VPC) network, then you must also specify the VPC + // network. Otherwise, specify the VM instance, which already contains its + // internal IP address and VPC network information. + // + // If the source of the test is within an on-premises network, then you must + // provide the destination VPC network. + // + // If the source endpoint is a Compute Engine VM instance with multiple + // network interfaces, the instance itself is not sufficient to identify the + // endpoint. So, you must also specify the source IP address or VPC network. + // + // A reachability analysis proceeds even if the source location is + // ambiguous. However, the test result may include endpoints that you don't + // intend to test. + Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Destination specification of the Connectivity Test. + // + // You can use a combination of destination IP address, Compute Engine + // VM instance, or VPC network to uniquely identify the destination + // location. + // + // Even if the destination IP address is not unique, the source IP + // location is unique. Usually, the analysis can infer the destination + // endpoint from route information. + // + // If the destination you specify is a VM instance and the instance has + // multiple network interfaces, then you must also specify either + // a destination IP address or VPC network to identify the destination + // interface. + // + // A reachability analysis proceeds even if the destination location is + // ambiguous. However, the result can include endpoints that you don't + // intend to test. + Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; + + // IP Protocol of the test. When not provided, "TCP" is assumed. + string protocol = 5; + + // Other projects that may be relevant for reachability analysis. + // This is applicable to scenarios where a test can cross project boundaries. + repeated string related_projects = 6; + + // Output only. The display name of a Connectivity Test. + string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user-provided metadata. + map labels = 8; + + // Output only. The time the test was created. + google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the test's configuration was updated. + google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reachability details of this test from the latest run. + // The details are updated when creating a new test, updating an + // existing test, or triggering a one-time rerun of an existing test. + ReachabilityDetails reachability_details = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The probing details of this test from the latest run, present for + // applicable tests only. The details are updated when creating a new test, + // updating an existing test, or triggering a one-time rerun of an existing + // test. + ProbingDetails probing_details = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Source or destination of the Connectivity Test. +message Endpoint { + // The type definition of an endpoint's network. Use one of the + // following choices: + enum NetworkType { + // Default type if unspecified. + NETWORK_TYPE_UNSPECIFIED = 0; + + // A network hosted within Google Cloud Platform. + // To receive more detailed output, specify the URI for the source or + // destination network. + GCP_NETWORK = 1; + + // A network hosted outside of Google Cloud Platform. + // This can be an on-premises network, or a network hosted by another cloud + // provider. + NON_GCP_NETWORK = 2; + } + + // The IP address of the endpoint, which can be an external or internal IP. + // An IPv6 address is only allowed when the test's destination is a + // [global load balancer + // VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). + string ip_address = 1; + + // The IP protocol port of the endpoint. + // Only applicable when protocol is TCP or UDP. + int32 port = 2; + + // A Compute Engine instance URI. + string instance = 3; + + // A cluster URI for [Google Kubernetes Engine + // master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + string gke_master_cluster = 7; + + // A [Cloud SQL](https://cloud.google.com/sql) instance URI. + string cloud_sql_instance = 8; + + // A Compute Engine network URI. + string network = 4; + + // Type of the network where the endpoint is located. + // Applicable only to source endpoint, as destination network type can be + // inferred from the source. + NetworkType network_type = 5; + + // Project ID where the endpoint is located. + // The Project ID can be derived from the URI if you provide a VM instance or + // network URI. + // The following are two cases where you must provide the project ID: + // 1. Only the IP address is specified, and the IP address is within a GCP + // project. + // 2. When you are using Shared VPC and the IP address that you provide is + // from the service project. In this case, the network that the IP address + // resides in is defined in the host project. + string project_id = 6; +} + +// Results of the configuration analysis from the last run of the test. +message ReachabilityDetails { + // The overall result of the test's configuration analysis. + enum Result { + // No result was specified. + RESULT_UNSPECIFIED = 0; + + // Possible scenarios are: + // + // * The configuration analysis determined that a packet originating from + // the source is expected to reach the destination. + // * The analysis didn't complete because the user lacks permission for + // some of the resources in the trace. However, at the time the user's + // permission became insufficient, the trace had been successful so far. + REACHABLE = 1; + + // A packet originating from the source is expected to be dropped before + // reaching the destination. + UNREACHABLE = 2; + + // The source and destination endpoints do not uniquely identify + // the test location in the network, and the reachability result contains + // multiple traces. For some traces, a packet could be delivered, and for + // others, it would not be. + AMBIGUOUS = 4; + + // The configuration analysis did not complete. Possible reasons are: + // + // * A permissions error occurred--for example, the user might not have + // read permission for all of the resources named in the test. + // * An internal error occurred. + // * The analyzer received an invalid or unsupported argument or was unable + // to identify a known endpoint. + UNDETERMINED = 5; + } + + // The overall result of the test's configuration analysis. + Result result = 1; + + // The time of the configuration analysis. + google.protobuf.Timestamp verify_time = 2; + + // The details of a failure or a cancellation of reachability analysis. + google.rpc.Status error = 3; + + // Result may contain a list of traces if a test has multiple possible + // paths in the network, such as when destination endpoint is a load balancer + // with multiple backends. + repeated Trace traces = 5; +} + +// Latency percentile rank and value. +message LatencyPercentile { + // Percentage of samples this data point applies to. + int32 percent = 1; + + // percent-th percentile of latency observed, in microseconds. + // Fraction of percent/100 of samples have latency lower or + // equal to the value of this field. + int64 latency_micros = 2; +} + +// Describes measured latency distribution. +message LatencyDistribution { + // Representative latency percentiles. + repeated LatencyPercentile latency_percentiles = 1; +} + +// Results of active probing from the last run of the test. +message ProbingDetails { + // Overall probing result of the test. + enum ProbingResult { + // No result was specified. + PROBING_RESULT_UNSPECIFIED = 0; + + // At least 95% of packets reached the destination. + REACHABLE = 1; + + // No packets reached the destination. + UNREACHABLE = 2; + + // Less than 95% of packets reached the destination. + REACHABILITY_INCONSISTENT = 3; + + // Reachability could not be determined. Possible reasons are: + // * The user lacks permission to access some of the network resources + // required to run the test. + // * No valid source endpoint could be derived from the request. + // * An internal error occurred. + UNDETERMINED = 4; + } + + // Abort cause types. + enum ProbingAbortCause { + // No reason was specified. + PROBING_ABORT_CAUSE_UNSPECIFIED = 0; + + // The user lacks permission to access some of the + // network resources required to run the test. + PERMISSION_DENIED = 1; + + // No valid source endpoint could be derived from the request. + NO_SOURCE_LOCATION = 2; + } + + // The overall result of active probing. + ProbingResult result = 1; + + // The time that reachability was assessed through active probing. + google.protobuf.Timestamp verify_time = 2; + + // Details about an internal failure or the cancellation of active probing. + google.rpc.Status error = 3; + + // The reason probing was aborted. + ProbingAbortCause abort_cause = 4; + + // Number of probes sent. + int32 sent_probe_count = 5; + + // Number of probes that reached the destination. + int32 successful_probe_count = 6; + + // The source and destination endpoints derived from the test input and used + // for active probing. + EndpointInfo endpoint_info = 7; + + // Latency as measured by active probing in one direction: + // from the source to the destination endpoint. + LatencyDistribution probing_latency = 8; +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/reachability.proto b/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/reachability.proto new file mode 100644 index 00000000..83f19aa0 --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/reachability.proto @@ -0,0 +1,270 @@ +// 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 +// +// 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.networkmanagement.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1beta1/connectivity_test.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/networkmanagement/v1beta1;networkmanagement"; +option java_multiple_files = true; +option java_outer_classname = "ReachabilityServiceProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// The Reachability service in Google Cloud Network Management API + +// The Reachability service in the Google Cloud Network Management API provides +// services that analyze the reachability within a single Google Virtual Private +// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises +// networks, or between VPC networks and internet hosts. A reachability analysis +// is based on Google Cloud network configurations. +// +// You can use the analysis results to verify these configurations and +// to troubleshoot connectivity issues. +service ReachabilityService { + option (google.api.default_host) = "networkmanagement.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all Connectivity Tests owned by a project. + rpc ListConnectivityTests(ListConnectivityTestsRequest) returns (ListConnectivityTestsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + }; + } + + // Gets the details of a specific Connectivity Test. + rpc GetConnectivityTest(GetConnectivityTestRequest) returns (ConnectivityTest) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + }; + } + + // Creates a new Connectivity Test. + // After you create a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, containing non-existent resources in the network, or you + // don't have read permissions to the network configurations of listed + // projects), then the reachability result returns a value of `UNKNOWN`. + // + // If the endpoint specifications in `ConnectivityTest` are + // incomplete, the reachability result returns a value of + // AMBIGUOUS. For more information, + // see the Connectivity Test documentation. + rpc CreateConnectivityTest(CreateConnectivityTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + body: "resource" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Updates the configuration of an existing `ConnectivityTest`. + // After you update a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // The Reachability state in the test resource is updated with the new result. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, they contain non-existent resources in the network, or the + // user does not have read permissions to the network configurations of + // listed projects), then the reachability result returns a value of + // UNKNOWN. + // + // If the endpoint specifications in `ConnectivityTest` are incomplete, the + // reachability result returns a value of `AMBIGUOUS`. See the documentation + // in `ConnectivityTest` for for more details. + rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}" + body: "resource" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Rerun an existing `ConnectivityTest`. + // After the user triggers the rerun, the reachability analysis is performed + // as part of the long running operation, which completes when the analysis + // completes. + // + // Even though the test configuration remains the same, the reachability + // result may change due to underlying network configuration changes. + // + // If the endpoint specifications in `ConnectivityTest` become invalid (for + // example, specified resources are deleted in the network, or you lost + // read permissions to the network configurations of listed projects), then + // the reachability result returns a value of `UNKNOWN`. + rpc RerunConnectivityTest(RerunConnectivityTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a specific `ConnectivityTest`. + rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Request for the `ListConnectivityTests` method. +message ListConnectivityTestsRequest { + // Required. The parent resource of the Connectivity Tests: + // `projects/{project_id}/locations/global` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Number of `ConnectivityTests` to return. + int32 page_size = 2; + + // Page token from an earlier query, as returned in `next_page_token`. + string page_token = 3; + + // Lists the `ConnectivityTests` that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form ` ` where operators: `<`, `>`, + // `<=`, + // `>=`, + // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + // roughly synonymous with equality). can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/proj-1/locations/global/connectivityTests/test-1 + // + // - Filter by labels: + // - Resources that have a key called `foo` + // labels.foo:* + // - Resources that have a key called `foo` whose value is `bar` + // labels.foo = bar + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// Response for the `ListConnectivityTests` method. +message ListConnectivityTestsResponse { + // List of Connectivity Tests. + repeated ConnectivityTest resources = 1; + + // Page token to fetch the next set of Connectivity Tests. + string next_page_token = 2; + + // Locations that could not be reached (when querying all locations with `-`). + repeated string unreachable = 3; +} + +// Request for the `GetConnectivityTest` method. +message GetConnectivityTestRequest { + // Required. `ConnectivityTest` resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `CreateConnectivityTest` method. +message CreateConnectivityTestRequest { + // Required. The parent resource of the Connectivity Test to create: + // `projects/{project_id}/locations/global` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The logical name of the Connectivity Test in your project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-40 characters. + // * Must end with a number or a letter. + // * Must be unique within the customer project + string test_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A `ConnectivityTest` resource + ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateConnectivityTest` method. +message UpdateConnectivityTestRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in update_mask are updated. + ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteConnectivityTest` method. +message DeleteConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `RerunConnectivityTest` method. +message RerunConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata describing an [Operation][google.longrunning.Operation] +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Target of the operation - for example + // projects/project-1/locations/global/connectivityTests/test-1 + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_detail = 5; + + // Specifies if cancellation was requested for the operation. + bool cancel_requested = 6; + + // API version. + string api_version = 7; +} diff --git a/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto b/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto new file mode 100644 index 00000000..535a910d --- /dev/null +++ b/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto @@ -0,0 +1,891 @@ +// 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 +// +// 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.networkmanagement.v1beta1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/networkmanagement/v1beta1;networkmanagement"; +option java_multiple_files = true; +option java_outer_classname = "TraceProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// Trace represents one simulated packet forwarding path. +// +// * Each trace contains multiple ordered steps. +// * Each step is in a particular state with associated configuration. +// * State is categorized as final or non-final states. +// * Each final state has a reason associated. +// * Each trace must end with a final state (the last step). +// ``` +// |---------------------Trace----------------------| +// Step1(State) Step2(State) --- StepN(State(final)) +// ``` +message Trace { + // Derived from the source and destination endpoints definition specified by + // user request, and validated by the data plane model. + // If there are multiple traces starting from different source locations, then + // the endpoint_info may be different between traces. + EndpointInfo endpoint_info = 1; + + // A trace of a test contains multiple steps from the initial state to the + // final state (delivered, dropped, forwarded, or aborted). + // + // The steps are ordered by the processing sequence within the simulated + // network state machine. It is critical to preserve the order of the steps + // and avoid reordering or sorting them. + repeated Step steps = 2; +} + +// A simulated forwarding path is composed of multiple steps. +// Each step has a well-defined state and an associated configuration. +message Step { + // Type of states that are defined in the network state machine. + // Each step in the packet trace is in a specific state. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Initial state: packet originating from a Compute Engine instance. + // An InstanceInfo is populated with starting instance information. + START_FROM_INSTANCE = 1; + + // Initial state: packet originating from the internet. + // The endpoint information is populated. + START_FROM_INTERNET = 2; + + // Initial state: packet originating from a VPC or on-premises network + // with internal source IP. + // If the source is a VPC network visible to the user, a NetworkInfo + // is populated with details of the network. + START_FROM_PRIVATE_NETWORK = 3; + + // Initial state: packet originating from a Google Kubernetes Engine cluster + // master. A GKEMasterInfo is populated with starting instance information. + START_FROM_GKE_MASTER = 21; + + // Initial state: packet originating from a Cloud SQL instance. + // A CloudSQLInstanceInfo is populated with starting instance information. + START_FROM_CLOUD_SQL_INSTANCE = 22; + + // Config checking state: verify ingress firewall rule. + APPLY_INGRESS_FIREWALL_RULE = 4; + + // Config checking state: verify egress firewall rule. + APPLY_EGRESS_FIREWALL_RULE = 5; + + // Config checking state: verify route. + APPLY_ROUTE = 6; + + // Config checking state: match forwarding rule. + APPLY_FORWARDING_RULE = 7; + + // Config checking state: packet sent or received under foreign IP + // address and allowed. + SPOOFING_APPROVED = 8; + + // Forwarding state: arriving at a Compute Engine instance. + ARRIVE_AT_INSTANCE = 9; + + // Forwarding state: arriving at a Compute Engine internal load balancer. + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + + // Forwarding state: arriving at a Compute Engine external load balancer. + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + + // Forwarding state: arriving at a Cloud VPN gateway. + ARRIVE_AT_VPN_GATEWAY = 12; + + // Forwarding state: arriving at a Cloud VPN tunnel. + ARRIVE_AT_VPN_TUNNEL = 13; + + // Transition state: packet header translated. + NAT = 14; + + // Transition state: original connection is terminated and a new proxied + // connection is initiated. + PROXY_CONNECTION = 15; + + // Final state: packet could be delivered. + DELIVER = 16; + + // Final state: packet could be dropped. + DROP = 17; + + // Final state: packet could be forwarded to a network with an unknown + // configuration. + FORWARD = 18; + + // Final state: analysis is aborted. + ABORT = 19; + + // Special state: viewer of the test result does not have permission to + // see the configuration in this step. + VIEWER_PERMISSION_MISSING = 20; + } + + // A description of the step. Usually this is a summary of the state. + string description = 1; + + // Each step is in one of the pre-defined states. + State state = 2; + + // This is a step that leads to the final state Drop. + bool causes_drop = 3; + + // Project ID that contains the configuration this step is validating. + string project_id = 4; + + // Configuration or metadata associated with each step. + // The configuration is filtered based on viewer's permission. If a viewer + // has no permission to view the configuration in this step, for non-final + // states a special state is populated (VIEWER_PERMISSION_MISSING), and for + // final state the configuration is cleared. + oneof step_info { + // Display information of a Compute Engine instance. + InstanceInfo instance = 5; + + // Display information of a Compute Engine firewall rule. + FirewallInfo firewall = 6; + + // Display information of a Compute Engine route. + RouteInfo route = 7; + + // Display information of the source and destination under analysis. + // The endpoint information in an intermediate state may differ with the + // initial input, as it might be modified by state like NAT, + // or Connection Proxy. + EndpointInfo endpoint = 8; + + // Display information of a Compute Engine forwarding rule. + ForwardingRuleInfo forwarding_rule = 9; + + // Display information of a Compute Engine VPN gateway. + VpnGatewayInfo vpn_gateway = 10; + + // Display information of a Compute Engine VPN tunnel. + VpnTunnelInfo vpn_tunnel = 11; + + // Display information of the final state "deliver" and reason. + DeliverInfo deliver = 12; + + // Display information of the final state "forward" and reason. + ForwardInfo forward = 13; + + // Display information of the final state "abort" and reason. + AbortInfo abort = 14; + + // Display information of the final state "drop" and reason. + DropInfo drop = 15; + + // Display information of the load balancers. + LoadBalancerInfo load_balancer = 16; + + // Display information of a Google Cloud network. + NetworkInfo network = 17; + + // Display information of a Google Kubernetes Engine cluster master. + GKEMasterInfo gke_master = 18; + + // Display information of a Cloud SQL instance. + CloudSQLInstanceInfo cloud_sql_instance = 19; + } +} + +// For display only. Metadata associated with a Compute Engine instance. +message InstanceInfo { + // Name of a Compute Engine instance. + string display_name = 1; + + // URI of a Compute Engine instance. + string uri = 2; + + // Name of the network interface of a Compute Engine instance. + string interface = 3; + + // URI of a Compute Engine network. + string network_uri = 4; + + // Internal IP address of the network interface. + string internal_ip = 5; + + // External IP address of the network interface. + string external_ip = 6; + + // Network tags configured on the instance. + repeated string network_tags = 7; + + // Service account authorized for the instance. + string service_account = 8 [deprecated = true]; +} + +// For display only. Metadata associated with a Compute Engine network. +message NetworkInfo { + // Name of a Compute Engine network. + string display_name = 1; + + // URI of a Compute Engine network. + string uri = 2; + + // The IP range that matches the test. + string matched_ip_range = 4; +} + +// For display only. Metadata associated with a VPC firewall rule, an implied +// VPC firewall rule, or a hierarchical firewall policy rule. +message FirewallInfo { + // The firewall rule's type. + enum FirewallRuleType { + // Unspecified type. + FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + + // Hierarchical firewall policy rule. For details, see + // [Hierarchical firewall policies + // overview](https://cloud.google.com/vpc/docs/firewall-policies). + HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + + // VPC firewall rule. For details, see + // [VPC firewall rules + // overview](https://cloud.google.com/vpc/docs/firewalls). + VPC_FIREWALL_RULE = 2; + + // Implied VPC firewall rule. For details, see + // [Implied + // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). + IMPLIED_VPC_FIREWALL_RULE = 3; + } + + // The display name of the VPC firewall rule. This field is not applicable + // to hierarchical firewall policy rules. + string display_name = 1; + + // The URI of the VPC firewall rule. This field is not applicable to + // implied firewall rules or hierarchical firewall policy rules. + string uri = 2; + + // Possible values: INGRESS, EGRESS + string direction = 3; + + // Possible values: ALLOW, DENY + string action = 4; + + // The priority of the firewall rule. + int32 priority = 5; + + // The URI of the VPC network that the firewall rule is associated with. + // This field is not applicable to hierarchical firewall policy rules. + string network_uri = 6; + + // The target tags defined by the VPC firewall rule. This field is not + // applicable to hierarchical firewall policy rules. + repeated string target_tags = 7; + + // The target service accounts specified by the firewall rule. + repeated string target_service_accounts = 8; + + // The hierarchical firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules. + string policy = 9; + + // The firewall rule's type. + FirewallRuleType firewall_rule_type = 10; +} + +// For display only. Metadata associated with a Compute Engine route. +message RouteInfo { + // Type of route: + enum RouteType { + // Unspecified type. Default value. + ROUTE_TYPE_UNSPECIFIED = 0; + + // Route is a subnet route automatically created by the system. + SUBNET = 1; + + // Static route created by the user, including the default route to the + // internet. + STATIC = 2; + + // Dynamic route exchanged between BGP peers. + DYNAMIC = 3; + + // A subnet route received from peering network. + PEERING_SUBNET = 4; + + // A static route received from peering network. + PEERING_STATIC = 5; + + // A dynamic route received from peering network. + PEERING_DYNAMIC = 6; + } + + // Type of next hop: + enum NextHopType { + // Unspecified type. Default value. + NEXT_HOP_TYPE_UNSPECIFIED = 0; + + // Next hop is an IP address. + NEXT_HOP_IP = 1; + + // Next hop is a Compute Engine instance. + NEXT_HOP_INSTANCE = 2; + + // Next hop is a VPC network gateway. + NEXT_HOP_NETWORK = 3; + + // Next hop is a peering VPC. + NEXT_HOP_PEERING = 4; + + // Next hop is an interconnect. + NEXT_HOP_INTERCONNECT = 5; + + // Next hop is a VPN tunnel. + NEXT_HOP_VPN_TUNNEL = 6; + + // Next hop is a VPN gateway. This scenario only happens when tracing + // connectivity from an on-premises network to Google Cloud through a VPN. + // The analysis simulates a packet departing from the on-premises network + // through a VPN tunnel and arriving at a Cloud VPN gateway. + NEXT_HOP_VPN_GATEWAY = 7; + + // Next hop is an internet gateway. + NEXT_HOP_INTERNET_GATEWAY = 8; + + // Next hop is blackhole; that is, the next hop either does not exist or is + // not running. + NEXT_HOP_BLACKHOLE = 9; + + // Next hop is the forwarding rule of an Internal Load Balancer. + NEXT_HOP_ILB = 10; + } + + // Type of route. + RouteType route_type = 8; + + // Type of next hop. + NextHopType next_hop_type = 9; + + // Name of a Compute Engine route. + string display_name = 1; + + // URI of a Compute Engine route. + // Dynamic route from cloud router does not have a URI. + // Advertised route from Google Cloud VPC to on-premises network also does + // not have a URI. + string uri = 2; + + // Destination IP range of the route. + string dest_ip_range = 3; + + // Next hop of the route. + string next_hop = 4; + + // URI of a Compute Engine network. + string network_uri = 5; + + // Priority of the route. + int32 priority = 6; + + // Instance tags of the route. + repeated string instance_tags = 7; +} + +// For display only. Metadata associated with a Compute Engine forwarding rule. +message ForwardingRuleInfo { + // Name of a Compute Engine forwarding rule. + string display_name = 1; + + // URI of a Compute Engine forwarding rule. + string uri = 2; + + // Protocol defined in the forwarding rule that matches the test. + string matched_protocol = 3; + + // Port range defined in the forwarding rule that matches the test. + string matched_port_range = 6; + + // VIP of the forwarding rule. + string vip = 4; + + // Target type of the forwarding rule. + string target = 5; + + // Network URI. Only valid for Internal Load Balancer. + string network_uri = 7; +} + +// For display only. Metadata associated with a load balancer. +message LoadBalancerInfo { + // The type definition for a load balancer: + enum LoadBalancerType { + // Type is unspecified. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Internal TCP/UDP load balancer. + INTERNAL_TCP_UDP = 1; + + // Network TCP/UDP load balancer. + NETWORK_TCP_UDP = 2; + + // HTTP(S) proxy load balancer. + HTTP_PROXY = 3; + + // TCP proxy load balancer. + TCP_PROXY = 4; + + // SSL proxy load balancer. + SSL_PROXY = 5; + } + + // The type definition for a load balancer backend configuration: + enum BackendType { + // Type is unspecified. + BACKEND_TYPE_UNSPECIFIED = 0; + + // Backend Service as the load balancer's backend. + BACKEND_SERVICE = 1; + + // Target Pool as the load balancer's backend. + TARGET_POOL = 2; + } + + // Type of the load balancer. + LoadBalancerType load_balancer_type = 1; + + // URI of the health check for the load balancer. + string health_check_uri = 2; + + // Information for the loadbalancer backends. + repeated LoadBalancerBackend backends = 3; + + // Type of load balancer's backend configuration. + BackendType backend_type = 4; + + // Backend configuration URI. + string backend_uri = 5; +} + +// For display only. Metadata associated with a specific load balancer backend. +message LoadBalancerBackend { + // State of a health check firewall configuration: + enum HealthCheckFirewallState { + // State is unspecified. Default state if not populated. + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + + // There are configured firewall rules to allow health check probes to the + // backend. + CONFIGURED = 1; + + // There are firewall rules configured to allow partial health check ranges + // or block all health check ranges. + // If a health check probe is sent from denied IP ranges, + // the health check to the backend will fail. Then, the backend will be + // marked unhealthy and will not receive traffic sent to the load balancer. + MISCONFIGURED = 2; + } + + // Name of a Compute Engine instance or network endpoint. + string display_name = 1; + + // URI of a Compute Engine instance or network endpoint. + string uri = 2; + + // State of the health check firewall configuration. + HealthCheckFirewallState health_check_firewall_state = 3; + + // A list of firewall rule URIs allowing probes from health check IP ranges. + repeated string health_check_allowing_firewall_rules = 4; + + // A list of firewall rule URIs blocking probes from health check IP ranges. + repeated string health_check_blocking_firewall_rules = 5; +} + +// For display only. Metadata associated with a Compute Engine VPN gateway. +message VpnGatewayInfo { + // Name of a VPN gateway. + string display_name = 1; + + // URI of a VPN gateway. + string uri = 2; + + // URI of a Compute Engine network where the VPN gateway is configured. + string network_uri = 3; + + // IP address of the VPN gateway. + string ip_address = 4; + + // A VPN tunnel that is associated with this VPN gateway. + // There may be multiple VPN tunnels configured on a VPN gateway, and only + // the one relevant to the test is displayed. + string vpn_tunnel_uri = 5; + + // Name of a Google Cloud region where this VPN gateway is configured. + string region = 6; +} + +// For display only. Metadata associated with a Compute Engine VPN tunnel. +message VpnTunnelInfo { + // Types of VPN routing policy. For details, refer to [Networks and Tunnel + // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). + enum RoutingType { + // Unspecified type. Default value. + ROUTING_TYPE_UNSPECIFIED = 0; + + // Route based VPN. + ROUTE_BASED = 1; + + // Policy based routing. + POLICY_BASED = 2; + + // Dynamic (BGP) routing. + DYNAMIC = 3; + } + + // Name of a VPN tunnel. + string display_name = 1; + + // URI of a VPN tunnel. + string uri = 2; + + // URI of the VPN gateway at local end of the tunnel. + string source_gateway = 3; + + // URI of a VPN gateway at remote end of the tunnel. + string remote_gateway = 4; + + // Remote VPN gateway's IP address. + string remote_gateway_ip = 5; + + // Local VPN gateway's IP address. + string source_gateway_ip = 6; + + // URI of a Compute Engine network where the VPN tunnel is configured. + string network_uri = 7; + + // Name of a Google Cloud region where this VPN tunnel is configured. + string region = 8; + + // Type of the routing policy. + RoutingType routing_type = 9; +} + +// For display only. The specification of the endpoints for the test. +// EndpointInfo is derived from source and destination Endpoint and validated +// by the backend data plane model. +message EndpointInfo { + // Source IP address. + string source_ip = 1; + + // Destination IP address. + string destination_ip = 2; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 3; + + // Source port. Only valid when protocol is TCP or UDP. + int32 source_port = 4; + + // Destination port. Only valid when protocol is TCP or UDP. + int32 destination_port = 5; + + // URI of the network where this packet originates from. + string source_network_uri = 6; + + // URI of the network where this packet is sent to. + string destination_network_uri = 7; +} + +// Details of the final state "deliver" and associated resource. +message DeliverInfo { + // Deliver target types: + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Target is a Compute Engine instance. + INSTANCE = 1; + + // Target is the internet. + INTERNET = 2; + + // Target is a Google API. + GOOGLE_API = 3; + + // Target is a Google Kubernetes Engine cluster master. + GKE_MASTER = 4; + + // Target is a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 5; + } + + // Target type where the packet is delivered to. + Target target = 1; + + // URI of the resource that the packet is delivered to. + string resource_uri = 2; +} + +// Details of the final state "forward" and associated resource. +message ForwardInfo { + // Forward target types. + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Forwarded to a VPC peering network. + PEERING_VPC = 1; + + // Forwarded to a Cloud VPN gateway. + VPN_GATEWAY = 2; + + // Forwarded to a Cloud Interconnect connection. + INTERCONNECT = 3; + + // Forwarded to a Google Kubernetes Engine Container cluster master. + GKE_MASTER = 4; + + // Forwarded to the next hop of a custom route imported from a peering VPC. + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + + // Forwarded to a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 6; + } + + // Target type where this packet is forwarded to. + Target target = 1; + + // URI of the resource that the packet is forwarded to. + string resource_uri = 2; +} + +// Details of the final state "abort" and associated resource. +message AbortInfo { + // Abort cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Aborted due to unknown network. + // The reachability analysis cannot proceed because the user does not have + // access to the host project's network configurations, including firewall + // rules and routes. This happens when the project is a service project and + // the endpoints being traced are in the host project's network. + UNKNOWN_NETWORK = 1; + + // Aborted because the IP address(es) are unknown. + UNKNOWN_IP = 2; + + // Aborted because no project information can be derived from the test + // input. + UNKNOWN_PROJECT = 3; + + // Aborted because the user lacks the permission to access all or part of + // the network configurations required to run the test. + PERMISSION_DENIED = 4; + + // Aborted because no valid source endpoint is derived from the input test + // request. + NO_SOURCE_LOCATION = 5; + + // Aborted because the source and/or destination endpoint specified in + // the test are invalid. The possible reasons that an endpoint is + // invalid include: malformed IP address; nonexistent instance or + // network URI; IP address not in the range of specified network URI; and + // instance not owning the network interface in the specified network. + INVALID_ARGUMENT = 6; + + // Aborted because traffic is sent from a public IP to an instance without + // an external IP. + NO_EXTERNAL_IP = 7; + + // Aborted because none of the traces matches destination information + // specified in the input test request. + UNINTENDED_DESTINATION = 8; + + // Aborted because the number of steps in the trace exceeding a certain + // limit which may be caused by routing loop. + TRACE_TOO_LONG = 9; + + // Aborted due to internal server error. + INTERNAL_ERROR = 10; + + // Aborted because the source endpoint could not be found. + SOURCE_ENDPOINT_NOT_FOUND = 11; + + // Aborted because the source network does not match the source endpoint. + MISMATCHED_SOURCE_NETWORK = 12; + + // Aborted because the destination endpoint could not be found. + DESTINATION_ENDPOINT_NOT_FOUND = 13; + + // Aborted because the destination network does not match the destination + // endpoint. + MISMATCHED_DESTINATION_NETWORK = 14; + } + + // Causes that the analysis is aborted. + Cause cause = 1; + + // URI of the resource that caused the abort. + string resource_uri = 2; +} + +// Details of the final state "drop" and associated resource. +message DropInfo { + // Drop cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Destination external address cannot be resolved to a known target. If + // the address is used in a Google Cloud project, provide the project ID + // as test input. + UNKNOWN_EXTERNAL_ADDRESS = 1; + + // a Compute Engine instance can only send or receive a packet with a + // foreign IP address if ip_forward is enabled. + FOREIGN_IP_DISALLOWED = 2; + + // Dropped due to a firewall rule, unless allowed due to connection + // tracking. + FIREWALL_RULE = 3; + + // Dropped due to no routes. + NO_ROUTE = 4; + + // Dropped due to invalid route. Route's next hop is a blackhole. + ROUTE_BLACKHOLE = 5; + + // Packet is sent to a wrong (unintended) network. Example: you trace a + // packet from VM1:Network1 to VM2:Network2, however, the route configured + // in Network1 sends the packet destined for VM2's IP addresss to Network3. + ROUTE_WRONG_NETWORK = 6; + + // Packet with internal destination address sent to the internet gateway. + PRIVATE_TRAFFIC_TO_INTERNET = 7; + + // Instance with only an internal IP address tries to access Google API and + // services, but private Google access is not enabled. + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + + // Instance with only an internal IP address tries to access external hosts, + // but Cloud NAT is not enabled in the subnet, unless special configurations + // on a VM allow this connection. For more details, see [Special + // configurations for VM + // instances](https://cloud.google.com/vpc/docs/special-configurations). + NO_EXTERNAL_ADDRESS = 9; + + // Destination internal address cannot be resolved to a known target. If + // this is a shared VPC scenario, verify if the service project ID is + // provided as test input. Otherwise, verify if the IP address is being + // used in the project. + UNKNOWN_INTERNAL_ADDRESS = 10; + + // Forwarding rule's protocol and ports do not match the packet header. + FORWARDING_RULE_MISMATCH = 11; + + // Forwarding rule does not have backends configured. + FORWARDING_RULE_NO_INSTANCES = 12; + + // Firewalls block the health check probes to the backends and cause + // the backends to be unavailable for traffic from the load balancer. + // For more details, see [Health check firewall + // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + + // Packet is sent from or to a Compute Engine instance that is not in a + // running state. + INSTANCE_NOT_RUNNING = 14; + + // The type of traffic is blocked and the user cannot configure a firewall + // rule to enable it. See [Always blocked + // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for + // more details. + TRAFFIC_TYPE_BLOCKED = 15; + + // Access to Google Kubernetes Engine cluster master's endpoint is not + // authorized. See [Access to the cluster + // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) + // for more details. + GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + + // Access to the Cloud SQL instance endpoint is not authorized. + // See [Authorizing with authorized + // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for + // more details. + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + + // Packet was dropped inside Google Kubernetes Engine Service. + DROPPED_INSIDE_GKE_SERVICE = 18; + + // Packet was dropped inside Cloud SQL Service. + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + + // Packet was dropped because there is no peering between the originating + // network and the Google Managed Services Network. + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + + // Packet was dropped because the Cloud SQL instance has neither a private + // nor a public IP address. + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + } + + // Cause that the packet is dropped. + Cause cause = 1; + + // URI of the resource that caused the drop. + string resource_uri = 2; +} + +// For display only. Metadata associated with a Google Kubernetes Engine (GKE) +// cluster master. +message GKEMasterInfo { + // URI of a GKE cluster. + string cluster_uri = 2; + + // URI of a GKE cluster network. + string cluster_network_uri = 4; + + // Internal IP address of a GKE cluster master. + string internal_ip = 5; + + // External IP address of a GKE cluster master. + string external_ip = 6; +} + +// For display only. Metadata associated with a Cloud SQL instance. +message CloudSQLInstanceInfo { + // Name of a Cloud SQL instance. + string display_name = 1; + + // URI of a Cloud SQL instance. + string uri = 2; + + // URI of a Cloud SQL instance network or empty string if the instance does + // not have one. + string network_uri = 4; + + // Internal IP address of a Cloud SQL instance. + string internal_ip = 5; + + // External IP address of a Cloud SQL instance. + string external_ip = 6; + + // Region in which the Cloud SQL instance is running. + string region = 7; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..e973c2cb --- /dev/null +++ b/renovate.json @@ -0,0 +1,73 @@ +{ + "extends": [ + ":separateMajorReleases", + ":combinePatchMinorReleases", + ":ignoreUnstable", + ":prImmediately", + ":updateNotScheduled", + ":automergeDisabled", + ":ignoreModulesAndTests", + ":maintainLockFilesDisabled", + ":autodetectPinVersions" + ], + "packageRules": [ + { + "packagePatterns": [ + "^com.google.guava:" + ], + "versionScheme": "docker" + }, + { + "packagePatterns": [ + "*" + ], + "semanticCommitType": "deps", + "semanticCommitScope": null + }, + { + "packagePatterns": [ + "^org.apache.maven", + "^org.jacoco:", + "^org.codehaus.mojo:", + "^org.sonatype.plugins:", + "^com.coveo:", + "^com.google.cloud:google-cloud-shared-config" + ], + "semanticCommitType": "build", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-network-management", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^junit:junit", + "^com.google.truth:truth", + "^org.mockito:mockito-core", + "^org.objenesis:objenesis" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" + } + ], + "semanticCommits": true, + "masterIssue": true +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 00000000..4743b84c --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + network-management-install-without-bom + jar + Google Network Management API Install Without Bom + https://github.com/googleapis/java-network-management + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-network-management + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 00000000..4cff2846 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-network-management-samples + 0.0.1-SNAPSHOT + pom + Google Network Management API Samples Parent + https://github.com/googleapis/java-network-management + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.18 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 00000000..86e98a5c --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + network-management-snapshot + jar + Google Network Management API Snapshot Samples + https://github.com/googleapis/java-network-management + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-network-management + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 00000000..7b64e87e --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + network-management-snippets + jar + Google Network Management API Snippets + https://github.com/googleapis/java-network-management + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-network-management + 0.0.0 + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/versions.txt b/versions.txt new file mode 100644 index 00000000..d2eee99b --- /dev/null +++ b/versions.txt @@ -0,0 +1,8 @@ +# Format: +# module:released-version:current-version + +google-cloud-network-management:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-network-management-v1beta1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-network-management-v1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-network-management-v1beta1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-network-management-v1:0.0.0:0.0.1-SNAPSHOT