From 9475b46ceccf0284d0a399a3f067b4594df31745 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 29 Mar 2021 17:24:29 -0700 Subject: [PATCH] feat: initial generation --- .github/.OwlBot.lock.yaml | 3 + .github/.OwlBot.yaml | 30 + .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 | 11 + .github/readme/synth.py | 19 + .github/release-please.yml | 2 + .github/snippet-bot.yml | 0 .github/trusted-contribution.yml | 2 + .github/workflows/approve-readme.yaml | 54 + .github/workflows/auto-release.yaml | 88 + .github/workflows/ci.yaml | 83 + .github/workflows/samples.yaml | 14 + .gitignore | 17 + .kokoro/build.bat | 3 + .kokoro/build.sh | 125 + .kokoro/coerce_logs.sh | 38 + .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 | 89 + .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 | 58 + .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 | 15 + CODE_OF_CONDUCT.md | 94 + CONTRIBUTING.md | 139 + LICENSE | 201 + README.md | 143 + codecov.yaml | 4 + google-cloud-appengine-admin-bom/pom.xml | 85 + google-cloud-appengine-admin/pom.xml | 111 + .../appengine/v1/ApplicationsClient.java | 503 + .../appengine/v1/ApplicationsSettings.java | 252 + .../v1/AuthorizedCertificatesClient.java | 607 + .../v1/AuthorizedCertificatesSettings.java | 249 + .../appengine/v1/AuthorizedDomainsClient.java | 373 + .../v1/AuthorizedDomainsSettings.java | 193 + .../appengine/v1/DomainMappingsClient.java | 648 + .../appengine/v1/DomainMappingsSettings.java | 274 + .../google/appengine/v1/FirewallClient.java | 603 + .../google/appengine/v1/FirewallSettings.java | 244 + .../google/appengine/v1/InstancesClient.java | 597 + .../appengine/v1/InstancesSettings.java | 243 + .../google/appengine/v1/ServicesClient.java | 542 + .../google/appengine/v1/ServicesSettings.java | 243 + .../google/appengine/v1/VersionsClient.java | 767 ++ .../google/appengine/v1/VersionsSettings.java | 265 + .../google/appengine/v1/gapic_metadata.json | 183 + .../com/google/appengine/v1/package-info.java | 162 + .../appengine/v1/stub/ApplicationsStub.java | 81 + .../v1/stub/ApplicationsStubSettings.java | 491 + .../v1/stub/AuthorizedCertificatesStub.java | 79 + .../AuthorizedCertificatesStubSettings.java | 493 + .../v1/stub/AuthorizedDomainsStub.java | 49 + .../stub/AuthorizedDomainsStubSettings.java | 359 + .../appengine/v1/stub/DomainMappingsStub.java | 96 + .../v1/stub/DomainMappingsStubSettings.java | 605 + .../appengine/v1/stub/FirewallStub.java | 77 + .../v1/stub/FirewallStubSettings.java | 472 + .../stub/GrpcApplicationsCallableFactory.java | 113 + .../v1/stub/GrpcApplicationsStub.java | 300 + ...AuthorizedCertificatesCallableFactory.java | 113 + .../stub/GrpcAuthorizedCertificatesStub.java | 352 + .../GrpcAuthorizedDomainsCallableFactory.java | 113 + .../v1/stub/GrpcAuthorizedDomainsStub.java | 183 + .../GrpcDomainMappingsCallableFactory.java | 113 + .../v1/stub/GrpcDomainMappingsStub.java | 367 + .../v1/stub/GrpcFirewallCallableFactory.java | 113 + .../appengine/v1/stub/GrpcFirewallStub.java | 356 + .../v1/stub/GrpcInstancesCallableFactory.java | 113 + .../appengine/v1/stub/GrpcInstancesStub.java | 302 + .../v1/stub/GrpcServicesCallableFactory.java | 113 + .../appengine/v1/stub/GrpcServicesStub.java | 298 + .../v1/stub/GrpcVersionsCallableFactory.java | 113 + .../appengine/v1/stub/GrpcVersionsStub.java | 346 + .../appengine/v1/stub/InstancesStub.java | 82 + .../v1/stub/InstancesStubSettings.java | 503 + .../appengine/v1/stub/ServicesStub.java | 81 + .../v1/stub/ServicesStubSettings.java | 502 + .../appengine/v1/stub/VersionsStub.java | 92 + .../v1/stub/VersionsStubSettings.java | 572 + .../appengine/v1/ApplicationsClientTest.java | 326 + .../v1/AuthorizedCertificatesClientTest.java | 354 + .../v1/AuthorizedDomainsClientTest.java | 137 + .../v1/DomainMappingsClientTest.java | 352 + .../appengine/v1/FirewallClientTest.java | 370 + .../appengine/v1/InstancesClientTest.java | 307 + .../google/appengine/v1/MockApplications.java | 59 + .../appengine/v1/MockApplicationsImpl.java | 145 + .../v1/MockAuthorizedCertificates.java | 59 + .../v1/MockAuthorizedCertificatesImpl.java | 170 + .../appengine/v1/MockAuthorizedDomains.java | 59 + .../v1/MockAuthorizedDomainsImpl.java | 82 + .../appengine/v1/MockDomainMappings.java | 59 + .../appengine/v1/MockDomainMappingsImpl.java | 167 + .../com/google/appengine/v1/MockFirewall.java | 59 + .../google/appengine/v1/MockFirewallImpl.java | 189 + .../google/appengine/v1/MockInstances.java | 59 + .../appengine/v1/MockInstancesImpl.java | 144 + .../com/google/appengine/v1/MockServices.java | 59 + .../google/appengine/v1/MockServicesImpl.java | 144 + .../com/google/appengine/v1/MockVersions.java | 59 + .../google/appengine/v1/MockVersionsImpl.java | 165 + .../appengine/v1/ServicesClientTest.java | 290 + .../appengine/v1/VersionsClientTest.java | 457 + grpc-google-cloud-appengine-admin-v1/pom.xml | 69 + .../google/appengine/v1/ApplicationsGrpc.java | 752 ++ .../v1/AuthorizedCertificatesGrpc.java | 893 ++ .../appengine/v1/AuthorizedDomainsGrpc.java | 377 + .../appengine/v1/DomainMappingsGrpc.java | 845 ++ .../com/google/appengine/v1/FirewallGrpc.java | 999 ++ .../google/appengine/v1/InstancesGrpc.java | 754 ++ .../com/google/appengine/v1/ServicesGrpc.java | 676 + .../com/google/appengine/v1/VersionsGrpc.java | 886 ++ java.header | 15 + license-checks.xml | 10 + pom.xml | 179 + .../clirr-ignored-differences.xml | 33 + proto-google-cloud-appengine-admin-v1/pom.xml | 46 + .../google/appengine/v1/ApiConfigHandler.java | 1280 ++ .../v1/ApiConfigHandlerOrBuilder.java | 154 + .../appengine/v1/ApiEndpointHandler.java | 634 + .../v1/ApiEndpointHandlerOrBuilder.java | 50 + .../com/google/appengine/v1/AppYamlProto.java | 293 + .../google/appengine/v1/AppengineProto.java | 892 ++ .../com/google/appengine/v1/Application.java | 5880 ++++++++ .../appengine/v1/ApplicationOrBuilder.java | 462 + .../google/appengine/v1/ApplicationProto.java | 149 + .../com/google/appengine/v1/AuditData.java | 1136 ++ .../appengine/v1/AuditDataOrBuilder.java | 97 + .../google/appengine/v1/AuditDataProto.java | 105 + .../google/appengine/v1/AuthFailAction.java | 180 + .../appengine/v1/AuthorizedCertificate.java | 2740 ++++ .../v1/AuthorizedCertificateOrBuilder.java | 395 + .../v1/AuthorizedCertificateView.java | 162 + .../google/appengine/v1/AuthorizedDomain.java | 837 ++ .../v1/AuthorizedDomainOrBuilder.java | 81 + .../google/appengine/v1/AutomaticScaling.java | 3241 +++++ .../v1/AutomaticScalingOrBuilder.java | 398 + .../com/google/appengine/v1/BasicScaling.java | 831 ++ .../appengine/v1/BasicScalingOrBuilder.java | 76 + .../v1/BatchUpdateIngressRulesRequest.java | 1142 ++ ...tchUpdateIngressRulesRequestOrBuilder.java | 104 + .../v1/BatchUpdateIngressRulesResponse.java | 956 ++ ...chUpdateIngressRulesResponseOrBuilder.java | 77 + .../google/appengine/v1/CertificateProto.java | 124 + .../appengine/v1/CertificateRawData.java | 911 ++ .../v1/CertificateRawDataOrBuilder.java | 103 + .../appengine/v1/CloudBuildOptions.java | 954 ++ .../v1/CloudBuildOptionsOrBuilder.java | 96 + .../google/appengine/v1/ContainerInfo.java | 650 + .../appengine/v1/ContainerInfoOrBuilder.java | 54 + .../google/appengine/v1/CpuUtilization.java | 829 ++ .../appengine/v1/CpuUtilizationOrBuilder.java | 74 + .../v1/CreateApplicationRequest.java | 732 + .../v1/CreateApplicationRequestOrBuilder.java | 60 + .../CreateAuthorizedCertificateRequest.java | 916 ++ ...AuthorizedCertificateRequestOrBuilder.java | 85 + .../v1/CreateDomainMappingRequest.java | 1074 ++ .../CreateDomainMappingRequestOrBuilder.java | 112 + .../v1/CreateIngressRuleRequest.java | 1003 ++ .../v1/CreateIngressRuleRequestOrBuilder.java | 108 + .../appengine/v1/CreateVersionMetadataV1.java | 644 + .../v1/CreateVersionMetadataV1OrBuilder.java | 52 + .../appengine/v1/CreateVersionMethod.java | 732 + .../v1/CreateVersionMethodOrBuilder.java | 60 + .../appengine/v1/CreateVersionRequest.java | 909 ++ .../v1/CreateVersionRequestOrBuilder.java | 87 + .../appengine/v1/DebugInstanceRequest.java | 848 ++ .../v1/DebugInstanceRequestOrBuilder.java | 85 + .../DeleteAuthorizedCertificateRequest.java | 645 + ...AuthorizedCertificateRequestOrBuilder.java | 52 + .../v1/DeleteDomainMappingRequest.java | 643 + .../DeleteDomainMappingRequestOrBuilder.java | 52 + .../v1/DeleteIngressRuleRequest.java | 642 + .../v1/DeleteIngressRuleRequestOrBuilder.java | 52 + .../appengine/v1/DeleteInstanceRequest.java | 641 + .../v1/DeleteInstanceRequestOrBuilder.java | 52 + .../appengine/v1/DeleteServiceRequest.java | 634 + .../v1/DeleteServiceRequestOrBuilder.java | 50 + .../appengine/v1/DeleteVersionRequest.java | 641 + .../v1/DeleteVersionRequestOrBuilder.java | 52 + .../com/google/appengine/v1/DeployProto.java | 147 + .../appengine/v1/DeployedFilesProto.java | 57 + .../com/google/appengine/v1/Deployment.java | 1678 +++ .../appengine/v1/DeploymentOrBuilder.java | 207 + .../google/appengine/v1/DiskUtilization.java | 816 ++ .../v1/DiskUtilizationOrBuilder.java | 77 + .../google/appengine/v1/DomainMapping.java | 1688 +++ .../appengine/v1/DomainMappingOrBuilder.java | 186 + .../appengine/v1/DomainMappingProto.java | 109 + .../appengine/v1/DomainOverrideStrategy.java | 189 + .../com/google/appengine/v1/DomainProto.java | 71 + .../appengine/v1/EndpointsApiService.java | 1314 ++ .../v1/EndpointsApiServiceOrBuilder.java | 136 + .../com/google/appengine/v1/Entrypoint.java | 761 ++ .../appengine/v1/EntrypointOrBuilder.java | 64 + .../com/google/appengine/v1/ErrorHandler.java | 1175 ++ .../appengine/v1/ErrorHandlerOrBuilder.java | 100 + .../com/google/appengine/v1/FileInfo.java | 1011 ++ .../appengine/v1/FileInfoOrBuilder.java | 106 + .../appengine/v1/GetApplicationRequest.java | 634 + .../v1/GetApplicationRequestOrBuilder.java | 50 + .../v1/GetAuthorizedCertificateRequest.java | 797 ++ ...AuthorizedCertificateRequestOrBuilder.java | 77 + .../appengine/v1/GetDomainMappingRequest.java | 642 + .../v1/GetDomainMappingRequestOrBuilder.java | 52 + .../appengine/v1/GetIngressRuleRequest.java | 641 + .../v1/GetIngressRuleRequestOrBuilder.java | 52 + .../appengine/v1/GetInstanceRequest.java | 641 + .../v1/GetInstanceRequestOrBuilder.java | 52 + .../appengine/v1/GetServiceRequest.java | 634 + .../v1/GetServiceRequestOrBuilder.java | 50 + .../appengine/v1/GetVersionRequest.java | 790 ++ .../v1/GetVersionRequestOrBuilder.java | 77 + .../com/google/appengine/v1/HealthCheck.java | 1558 +++ .../appengine/v1/HealthCheckOrBuilder.java | 177 + .../appengine/v1/InboundServiceType.java | 312 + .../com/google/appengine/v1/Instance.java | 3908 ++++++ .../com/google/appengine/v1/InstanceName.java | 257 + .../appengine/v1/InstanceOrBuilder.java | 419 + .../google/appengine/v1/InstanceProto.java | 131 + .../java/com/google/appengine/v1/Library.java | 808 ++ .../google/appengine/v1/LibraryOrBuilder.java | 75 + .../v1/ListAuthorizedCertificatesRequest.java | 1059 ++ ...uthorizedCertificatesRequestOrBuilder.java | 113 + .../ListAuthorizedCertificatesResponse.java | 1135 ++ ...thorizedCertificatesResponseOrBuilder.java | 102 + .../v1/ListAuthorizedDomainsRequest.java | 905 ++ ...ListAuthorizedDomainsRequestOrBuilder.java | 88 + .../v1/ListAuthorizedDomainsResponse.java | 1129 ++ ...istAuthorizedDomainsResponseOrBuilder.java | 102 + .../v1/ListDomainMappingsRequest.java | 905 ++ .../ListDomainMappingsRequestOrBuilder.java | 88 + .../v1/ListDomainMappingsResponse.java | 1133 ++ .../ListDomainMappingsResponseOrBuilder.java | 102 + .../appengine/v1/ListIngressRulesRequest.java | 1104 ++ .../v1/ListIngressRulesRequestOrBuilder.java | 119 + .../v1/ListIngressRulesResponse.java | 1132 ++ .../v1/ListIngressRulesResponseOrBuilder.java | 102 + .../appengine/v1/ListInstancesRequest.java | 910 ++ .../v1/ListInstancesRequestOrBuilder.java | 90 + .../appengine/v1/ListInstancesResponse.java | 1124 ++ .../v1/ListInstancesResponseOrBuilder.java | 101 + .../appengine/v1/ListServicesRequest.java | 903 ++ .../v1/ListServicesRequestOrBuilder.java | 88 + .../appengine/v1/ListServicesResponse.java | 1122 ++ .../v1/ListServicesResponseOrBuilder.java | 101 + .../appengine/v1/ListVersionsRequest.java | 1059 ++ .../v1/ListVersionsRequestOrBuilder.java | 115 + .../appengine/v1/ListVersionsResponse.java | 1122 ++ .../v1/ListVersionsResponseOrBuilder.java | 101 + .../google/appengine/v1/LivenessCheck.java | 1828 +++ .../appengine/v1/LivenessCheckOrBuilder.java | 210 + .../google/appengine/v1/LocationMetadata.java | 739 ++ .../v1/LocationMetadataOrBuilder.java | 67 + .../google/appengine/v1/LocationProto.java | 81 + .../google/appengine/v1/LoginRequirement.java | 208 + .../appengine/v1/ManagedCertificate.java | 933 ++ .../v1/ManagedCertificateOrBuilder.java | 98 + .../google/appengine/v1/ManagementStatus.java | 275 + .../google/appengine/v1/ManualScaling.java | 556 + .../appengine/v1/ManualScalingOrBuilder.java | 41 + .../java/com/google/appengine/v1/Network.java | 1508 +++ .../google/appengine/v1/NetworkOrBuilder.java | 207 + .../google/appengine/v1/NetworkSettings.java | 809 ++ .../v1/NetworkSettingsOrBuilder.java | 52 + .../appengine/v1/NetworkSettingsProto.java | 78 + .../appengine/v1/NetworkUtilization.java | 821 ++ .../v1/NetworkUtilizationOrBuilder.java | 77 + .../appengine/v1/OperationMetadataV1.java | 2368 ++++ .../v1/OperationMetadataV1OrBuilder.java | 285 + .../google/appengine/v1/OperationProto.java | 104 + .../google/appengine/v1/ReadinessCheck.java | 1853 +++ .../appengine/v1/ReadinessCheckOrBuilder.java | 216 + .../v1/RepairApplicationRequest.java | 635 + .../v1/RepairApplicationRequestOrBuilder.java | 50 + .../appengine/v1/RequestUtilization.java | 637 + .../v1/RequestUtilizationOrBuilder.java | 51 + .../google/appengine/v1/ResourceRecord.java | 1159 ++ .../appengine/v1/ResourceRecordOrBuilder.java | 104 + .../com/google/appengine/v1/Resources.java | 1406 ++ .../appengine/v1/ResourcesOrBuilder.java | 142 + .../google/appengine/v1/ScriptHandler.java | 632 + .../appengine/v1/ScriptHandlerOrBuilder.java | 50 + .../google/appengine/v1/SecurityLevel.java | 240 + .../java/com/google/appengine/v1/Service.java | 1409 ++ .../google/appengine/v1/ServiceOrBuilder.java | 156 + .../com/google/appengine/v1/ServiceProto.java | 107 + .../google/appengine/v1/ServingStatus.java | 182 + .../com/google/appengine/v1/SslSettings.java | 1249 ++ .../appengine/v1/SslSettingsOrBuilder.java | 132 + .../v1/StandardSchedulerSettings.java | 833 ++ .../StandardSchedulerSettingsOrBuilder.java | 79 + .../appengine/v1/StaticFilesHandler.java | 1848 +++ .../v1/StaticFilesHandlerOrBuilder.java | 233 + .../com/google/appengine/v1/TrafficSplit.java | 1209 ++ .../appengine/v1/TrafficSplitOrBuilder.java | 143 + .../v1/UpdateApplicationRequest.java | 1184 ++ .../v1/UpdateApplicationRequestOrBuilder.java | 120 + .../UpdateAuthorizedCertificateRequest.java | 1219 ++ ...AuthorizedCertificateRequestOrBuilder.java | 128 + .../v1/UpdateDomainMappingRequest.java | 1204 ++ .../UpdateDomainMappingRequestOrBuilder.java | 125 + .../v1/UpdateIngressRuleRequest.java | 1191 ++ .../v1/UpdateIngressRuleRequestOrBuilder.java | 122 + .../appengine/v1/UpdateServiceMethod.java | 732 + .../v1/UpdateServiceMethodOrBuilder.java | 60 + .../appengine/v1/UpdateServiceRequest.java | 1320 ++ .../v1/UpdateServiceRequestOrBuilder.java | 147 + .../appengine/v1/UpdateVersionRequest.java | 1193 ++ .../v1/UpdateVersionRequestOrBuilder.java | 125 + .../google/appengine/v1/UrlDispatchRule.java | 1040 ++ .../v1/UrlDispatchRuleOrBuilder.java | 114 + .../java/com/google/appengine/v1/UrlMap.java | 2516 ++++ .../google/appengine/v1/UrlMapOrBuilder.java | 277 + .../java/com/google/appengine/v1/Version.java | 11061 ++++++++++++++++ .../google/appengine/v1/VersionOrBuilder.java | 1523 +++ .../com/google/appengine/v1/VersionProto.java | 457 + .../com/google/appengine/v1/VersionView.java | 161 + .../java/com/google/appengine/v1/Volume.java | 903 ++ .../google/appengine/v1/VolumeOrBuilder.java | 88 + .../appengine/v1/VpcAccessConnector.java | 641 + .../v1/VpcAccessConnectorOrBuilder.java | 52 + .../java/com/google/appengine/v1/ZipInfo.java | 741 ++ .../google/appengine/v1/ZipInfoOrBuilder.java | 69 + .../appengine/v1/firewall/FirewallProto.java | 75 + .../appengine/v1/firewall/FirewallRule.java | 1281 ++ .../v1/firewall/FirewallRuleOrBuilder.java | 135 + .../proto/google/appengine/v1/app_yaml.proto | 349 + .../proto/google/appengine/v1/appengine.proto | 1006 ++ .../google/appengine/v1/application.proto | 194 + .../google/appengine/v1/audit_data.proto | 55 + .../google/appengine/v1/certificate.proto | 173 + .../proto/google/appengine/v1/deploy.proto | 108 + .../google/appengine/v1/deployed_files.proto | 27 + .../proto/google/appengine/v1/domain.proto | 42 + .../google/appengine/v1/domain_mapping.proto | 125 + .../proto/google/appengine/v1/firewall.proto | 70 + .../proto/google/appengine/v1/instance.proto | 144 + .../proto/google/appengine/v1/location.proto | 45 + .../appengine/v1/network_settings.proto | 49 + .../proto/google/appengine/v1/operation.proto | 81 + .../proto/google/appengine/v1/service.proto | 94 + .../proto/google/appengine/v1/version.proto | 574 + renovate.json | 73 + samples/install-without-bom/pom.xml | 84 + samples/pom.xml | 56 + samples/snapshot/pom.xml | 83 + samples/snippets/pom.xml | 47 + synth.metadata | 23 + synth.py | 17 + versions.txt | 6 + 395 files changed, 164675 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/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 README.md create mode 100644 codecov.yaml create mode 100644 google-cloud-appengine-admin-bom/pom.xml create mode 100644 google-cloud-appengine-admin/pom.xml create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsClient.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesClient.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsClient.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsClient.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallClient.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesClient.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesClient.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsClient.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/gapic_metadata.json create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/package-info.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStubSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStubSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStubSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStubSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStubSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcApplicationsCallableFactory.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcApplicationsStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedCertificatesCallableFactory.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedCertificatesStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedDomainsCallableFactory.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedDomainsStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcDomainMappingsCallableFactory.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcDomainMappingsStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcFirewallCallableFactory.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcFirewallStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcInstancesCallableFactory.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcInstancesStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcServicesCallableFactory.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcServicesStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcVersionsCallableFactory.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcVersionsStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/InstancesStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/InstancesStubSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ServicesStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ServicesStubSettings.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/VersionsStub.java create mode 100644 google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/VersionsStubSettings.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/ApplicationsClientTest.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/AuthorizedCertificatesClientTest.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/AuthorizedDomainsClientTest.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/DomainMappingsClientTest.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/FirewallClientTest.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/InstancesClientTest.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockApplications.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockApplicationsImpl.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedCertificates.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedCertificatesImpl.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedDomains.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedDomainsImpl.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockDomainMappings.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockDomainMappingsImpl.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockFirewall.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockFirewallImpl.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockInstances.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockInstancesImpl.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockServices.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockServicesImpl.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockVersions.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockVersionsImpl.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/ServicesClientTest.java create mode 100644 google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/VersionsClientTest.java create mode 100644 grpc-google-cloud-appengine-admin-v1/pom.xml create mode 100644 grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationsGrpc.java create mode 100644 grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificatesGrpc.java create mode 100644 grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomainsGrpc.java create mode 100644 grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingsGrpc.java create mode 100644 grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FirewallGrpc.java create mode 100644 grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstancesGrpc.java create mode 100644 grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServicesGrpc.java create mode 100644 grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionsGrpc.java create mode 100644 java.header create mode 100644 license-checks.xml create mode 100644 pom.xml create mode 100644 proto-google-cloud-appengine-admin-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-appengine-admin-v1/pom.xml create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiConfigHandler.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiConfigHandlerOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiEndpointHandler.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiEndpointHandlerOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AppYamlProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AppengineProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Application.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuditData.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuditDataOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuditDataProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthFailAction.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificate.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificateOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificateView.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomain.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomainOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AutomaticScaling.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AutomaticScalingOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BasicScaling.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BasicScalingOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesResponse.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesResponseOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CertificateProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CertificateRawData.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CertificateRawDataOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CloudBuildOptions.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CloudBuildOptionsOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ContainerInfo.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ContainerInfoOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CpuUtilization.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CpuUtilizationOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateApplicationRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateApplicationRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateAuthorizedCertificateRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateAuthorizedCertificateRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateDomainMappingRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateDomainMappingRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateIngressRuleRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateIngressRuleRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMetadataV1.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMetadataV1OrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMethod.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMethodOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DebugInstanceRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DebugInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteAuthorizedCertificateRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteAuthorizedCertificateRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteDomainMappingRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteDomainMappingRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteIngressRuleRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteIngressRuleRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteInstanceRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteServiceRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteServiceRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteVersionRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteVersionRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeployProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeployedFilesProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Deployment.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeploymentOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DiskUtilization.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DiskUtilizationOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMapping.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainOverrideStrategy.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/EndpointsApiService.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/EndpointsApiServiceOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Entrypoint.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/EntrypointOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ErrorHandler.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ErrorHandlerOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FileInfo.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FileInfoOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetApplicationRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetApplicationRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetAuthorizedCertificateRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetAuthorizedCertificateRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetDomainMappingRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetDomainMappingRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetIngressRuleRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetIngressRuleRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetInstanceRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetServiceRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetServiceRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetVersionRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetVersionRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/HealthCheck.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/HealthCheckOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InboundServiceType.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Instance.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceName.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Library.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LibraryOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesResponse.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesResponseOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsResponse.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsResponseOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsResponse.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsResponseOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesResponse.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesResponseOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesResponse.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesResponseOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesResponse.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesResponseOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsResponse.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsResponseOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LivenessCheck.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LivenessCheckOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationMetadata.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationMetadataOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LoginRequirement.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagedCertificate.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagedCertificateOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagementStatus.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManualScaling.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManualScalingOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Network.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettings.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettingsOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettingsProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkUtilization.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkUtilizationOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationMetadataV1.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationMetadataV1OrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ReadinessCheck.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ReadinessCheckOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RepairApplicationRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RepairApplicationRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RequestUtilization.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RequestUtilizationOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourceRecord.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourceRecordOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Resources.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourcesOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ScriptHandler.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ScriptHandlerOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SecurityLevel.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Service.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServiceOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServiceProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServingStatus.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SslSettings.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SslSettingsOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StandardSchedulerSettings.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StandardSchedulerSettingsOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StaticFilesHandler.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StaticFilesHandlerOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/TrafficSplit.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/TrafficSplitOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateApplicationRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateApplicationRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateAuthorizedCertificateRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateAuthorizedCertificateRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateDomainMappingRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateDomainMappingRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateIngressRuleRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateIngressRuleRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceMethod.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceMethodOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateVersionRequest.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateVersionRequestOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlDispatchRule.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlDispatchRuleOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlMap.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlMapOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Version.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionView.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Volume.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VolumeOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VpcAccessConnector.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VpcAccessConnectorOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ZipInfo.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ZipInfoOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/firewall/FirewallProto.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/firewall/FirewallRule.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/firewall/FirewallRuleOrBuilder.java create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/app_yaml.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/appengine.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/application.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/audit_data.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/certificate.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/deploy.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/deployed_files.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/domain.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/domain_mapping.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/firewall.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/instance.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/location.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/network_settings.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/operation.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/service.proto create mode 100644 proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/version.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 synth.metadata create mode 100644 synth.py create mode 100644 versions.txt diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 00000000..1466070c --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:e6e396f777c119e6bf89f1215dae153be0666af49c8398fb307a38080f6c0a4d + 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..05d88a1a --- /dev/null +++ b/.github/.OwlBot.yaml @@ -0,0 +1,30 @@ +# 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-copy-regex: +- source: "/google/appengine/(v.*)/.*-java/proto-google-.*/src" + dest: "/proto-google-cloud-appengine-admin-$1/src" +- source: "/google/appengine/(v.*)/.*-java/grpc-google-.*/src" + dest: "/grpc-google-cloud-appengine-admin-$1/src" +- source: "/google/appengine/v.*/.*-java/gapic-google-.*/src" + dest: "/google-cloud-appengine-admin/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..0c2c377c --- /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-appengine-admin/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. appengine-admin 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..15aa5255 --- /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-appengine-admin/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..47c2ba13 --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,11 @@ +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]' 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..dce2c845 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,2 @@ +releaseType: java-yoshi +bumpMinorPreMajor: true \ No newline at end of file diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 00000000..e69de29b 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..def8b3a2 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,83 @@ +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 + - name: coverage + uses: codecov/codecov-action@v1 + with: + name: actions ${{matrix.java}} + 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 \ No newline at end of file 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..0d7891cf --- /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 Java version +java -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_CREDIENTIALS 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-appengine-admin +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..5cf7ba49 --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,38 @@ +#!/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 + echo "processing ${xml}" + 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..eb20a337 --- /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-appengine-admin/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-appengine-admin/.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..26dde9d8 --- /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-appengine-admin/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-appengine-admin/.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..b12c97be --- /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-appengine-admin/.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..0fb8c843 --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,89 @@ +#!/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 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 \ + -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/\\s--\\smodule.*// >.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 $(find -name ".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..26dde9d8 --- /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-appengine-admin/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-appengine-admin/.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..bee034d9 --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-appengine-admin/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 00000000..880f6773 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-appengine-admin/.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..9f79ad14 --- /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-appengine-admin/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-appengine-admin/.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..c8120046 --- /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-appengine-admin/.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..bee034d9 --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-appengine-admin/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 00000000..880f6773 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-appengine-admin/.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..0bd1b900 --- /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-appengine-admin/.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..6114a6ec --- /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-appengine-admin + +# 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-appengine-admin \ + --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..49ac4304 --- /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-appengine-admin/.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-appengine-admin/.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..87adc18d --- /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-appengine-admin/.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..a93e523e --- /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-appengine-admin/.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..51e0f239 --- /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-appengine-admin/.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..f40fa2b4 --- /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-appengine-admin/.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..c38e2551 --- /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-appengine-admin +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..a82707e3 --- /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-appengine-admin/.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..fff55cda --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,58 @@ +#!/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-appengine-admin +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 + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --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..b9864a3c --- /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-appengine-admin/.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..098168a7 --- /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 install 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..ed53f1f3 --- /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-appengine-admin/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-appengine-admin/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-appengine-admin" + } +} + +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..16126d2e --- /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 install 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..a9c3a98d --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "appengine-admin", + "name_pretty": "App Engine Admin API", + "product_documentation": "https://cloud.google.com/appengine/docs/admin-api/", + "api_description": "you to manage your App Engine applications.", + "client_documentation": "https://googleapis.dev/java/google-cloud-appengine-admin/latest/index.html", + "release_level": "beta", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-appengine-admin", + "repo_short": "java-appengine-admin", + "distribution_name": "com.google.cloud:google-cloud-appengine-admin", + "api_id": "appengine.googleapis.com", + "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/README.md b/README.md new file mode 100644 index 00000000..5067049d --- /dev/null +++ b/README.md @@ -0,0 +1,143 @@ +# Google App Engine Admin API Client for Java + +Java idiomatic client for [App Engine Admin API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +## Quickstart + + +If you are using Maven, add this to your pom.xml file: + +```xml + + com.google.cloud + google-cloud-appengine-admin + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-appengine-admin:0.0.0' +``` + +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-appengine-admin" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the App Engine Admin API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google App Engine Admin API. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-appengine-admin` library. See the [Quickstart](#quickstart) section +to add `google-cloud-appengine-admin` as a dependency in your code. + +## About App Engine Admin API + + +[App Engine Admin API][product-docs] you to manage your App Engine applications. + +See the [App Engine Admin API client library docs][javadocs] to learn how to +use this App Engine Admin API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +App Engine Admin API uses gRPC for the transport layer. + +## Java Versions + +Java 7 or above is required for using this client. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/appengine/docs/admin-api/ +[javadocs]: https://googleapis.dev/java/google-cloud-appengine-admin/latest/index.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-appengine-admin/java11.html +[stability-image]: https://img.shields.io/badge/stability-beta-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-appengine-admin.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-appengine-admin&core=gav +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-sdk]: https://cloud.google.com/sdk/ +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-appengine-admin/blob/master/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-appengine-admin/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-appengine-admin/blob/master/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=appengine.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png 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-appengine-admin-bom/pom.xml b/google-cloud-appengine-admin-bom/pom.xml new file mode 100644 index 00000000..0875c2e5 --- /dev/null +++ b/google-cloud-appengine-admin-bom/pom.xml @@ -0,0 +1,85 @@ + + + 4.0.0 + com.google.cloud + google-cloud-appengine-admin-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 0.11.0 + + + Google App Engine Admin API BOM + https://github.com/googleapis/java-appengine-admin + + BOM for App Engine Admin API + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-appengine-admin.git + scm:git:git@github.com:googleapis/java-appengine-admin.git + https://github.com/googleapis/java-appengine-admin + + + + true + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.cloud + google-cloud-appengine-admin + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-appengine-admin-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-appengine-admin-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + diff --git a/google-cloud-appengine-admin/pom.xml b/google-cloud-appengine-admin/pom.xml new file mode 100644 index 00000000..02e1e48d --- /dev/null +++ b/google-cloud-appengine-admin/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + com.google.cloud + google-cloud-appengine-admin + 0.0.1-SNAPSHOT + jar + Google App Engine Admin API + https://github.com/googleapis/java-appengine-admin + App Engine Admin API you to manage your App Engine applications. + + com.google.cloud + google-cloud-appengine-admin-parent + 0.0.1-SNAPSHOT + + + google-cloud-appengine-admin + + + + 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-appengine-admin-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-appengine-admin-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-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsClient.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsClient.java new file mode 100644 index 00000000..5cba4559 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsClient.java @@ -0,0 +1,503 @@ +/* + * 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.appengine.v1; + +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.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.stub.ApplicationsStub; +import com.google.appengine.v1.stub.ApplicationsStubSettings; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Manages App Engine applications. + * + *

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 (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+ *   GetApplicationRequest request =
+ *       GetApplicationRequest.newBuilder().setName("name3373707").build();
+ *   Application response = applicationsClient.getApplication(request);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * ApplicationsSettings applicationsSettings =
+ *     ApplicationsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ApplicationsClient applicationsClient = ApplicationsClient.create(applicationsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ApplicationsSettings applicationsSettings =
+ *     ApplicationsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ApplicationsClient applicationsClient = ApplicationsClient.create(applicationsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ApplicationsClient implements BackgroundResource { + private final ApplicationsSettings settings; + private final ApplicationsStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of ApplicationsClient with default settings. */ + public static final ApplicationsClient create() throws IOException { + return create(ApplicationsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ApplicationsClient, 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 ApplicationsClient create(ApplicationsSettings settings) throws IOException { + return new ApplicationsClient(settings); + } + + /** + * Constructs an instance of ApplicationsClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ApplicationsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ApplicationsClient create(ApplicationsStub stub) { + return new ApplicationsClient(stub); + } + + /** + * Constructs an instance of ApplicationsClient, 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 ApplicationsClient(ApplicationsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ApplicationsStubSettings) 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 ApplicationsClient(ApplicationsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final ApplicationsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ApplicationsStub 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. + /** + * Gets information about an application. + * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   GetApplicationRequest request =
+   *       GetApplicationRequest.newBuilder().setName("name3373707").build();
+   *   Application response = applicationsClient.getApplication(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 Application getApplication(GetApplicationRequest request) { + return getApplicationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an application. + * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   GetApplicationRequest request =
+   *       GetApplicationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       applicationsClient.getApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Application response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getApplicationCallable() { + return stub.getApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an App Engine application for a Google Cloud Platform project. Required fields: + * + *
    + *
  • `id` - The ID of the target Cloud Platform project. + *
  • *location* - The [region](https://cloud.google.com/appengine/docs/locations) + * where you want the App Engine application located. + *
+ * + *

For more information about App Engine applications, see [Managing Projects, Applications, + * and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). + * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   CreateApplicationRequest request =
+   *       CreateApplicationRequest.newBuilder()
+   *           .setApplication(Application.newBuilder().build())
+   *           .build();
+   *   Application response = applicationsClient.createApplicationAsync(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 createApplicationAsync( + CreateApplicationRequest request) { + return createApplicationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an App Engine application for a Google Cloud Platform project. Required fields: + * + *
    + *
  • `id` - The ID of the target Cloud Platform project. + *
  • *location* - The [region](https://cloud.google.com/appengine/docs/locations) + * where you want the App Engine application located. + *
+ * + *

For more information about App Engine applications, see [Managing Projects, Applications, + * and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). + * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   CreateApplicationRequest request =
+   *       CreateApplicationRequest.newBuilder()
+   *           .setApplication(Application.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       applicationsClient.createApplicationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Application response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createApplicationOperationCallable() { + return stub.createApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an App Engine application for a Google Cloud Platform project. Required fields: + * + *
    + *
  • `id` - The ID of the target Cloud Platform project. + *
  • *location* - The [region](https://cloud.google.com/appengine/docs/locations) + * where you want the App Engine application located. + *
+ * + *

For more information about App Engine applications, see [Managing Projects, Applications, + * and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). + * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   CreateApplicationRequest request =
+   *       CreateApplicationRequest.newBuilder()
+   *           .setApplication(Application.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       applicationsClient.createApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createApplicationCallable() { + return stub.createApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Application resource. You can update the following fields: + * + *
    + *
  • `auth_domain` - Google authentication domain for controlling user access to the + * application. + *
  • `default_cookie_expiration` - Cookie expiration policy for the application. + *
+ * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   UpdateApplicationRequest request =
+   *       UpdateApplicationRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setApplication(Application.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Application response = applicationsClient.updateApplicationAsync(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 updateApplicationAsync( + UpdateApplicationRequest request) { + return updateApplicationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Application resource. You can update the following fields: + * + *
    + *
  • `auth_domain` - Google authentication domain for controlling user access to the + * application. + *
  • `default_cookie_expiration` - Cookie expiration policy for the application. + *
+ * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   UpdateApplicationRequest request =
+   *       UpdateApplicationRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setApplication(Application.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       applicationsClient.updateApplicationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Application response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateApplicationOperationCallable() { + return stub.updateApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Application resource. You can update the following fields: + * + *
    + *
  • `auth_domain` - Google authentication domain for controlling user access to the + * application. + *
  • `default_cookie_expiration` - Cookie expiration policy for the application. + *
+ * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   UpdateApplicationRequest request =
+   *       UpdateApplicationRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setApplication(Application.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       applicationsClient.updateApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateApplicationCallable() { + return stub.updateApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Recreates the required App Engine features for the specified App Engine application, for + * example a Cloud Storage bucket or App Engine service account. Use this method if you receive an + * error message about a missing feature, for example, *Error retrieving the App Engine + * service account*. If you have deleted your App Engine service account, this will not be + * able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at + * https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D + * . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log. + * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   RepairApplicationRequest request =
+   *       RepairApplicationRequest.newBuilder().setName("name3373707").build();
+   *   Application response = applicationsClient.repairApplicationAsync(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 repairApplicationAsync( + RepairApplicationRequest request) { + return repairApplicationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Recreates the required App Engine features for the specified App Engine application, for + * example a Cloud Storage bucket or App Engine service account. Use this method if you receive an + * error message about a missing feature, for example, *Error retrieving the App Engine + * service account*. If you have deleted your App Engine service account, this will not be + * able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at + * https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D + * . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log. + * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   RepairApplicationRequest request =
+   *       RepairApplicationRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       applicationsClient.repairApplicationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Application response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + repairApplicationOperationCallable() { + return stub.repairApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Recreates the required App Engine features for the specified App Engine application, for + * example a Cloud Storage bucket or App Engine service account. Use this method if you receive an + * error message about a missing feature, for example, *Error retrieving the App Engine + * service account*. If you have deleted your App Engine service account, this will not be + * able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at + * https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D + * . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log. + * + *

Sample code: + * + *

{@code
+   * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+   *   RepairApplicationRequest request =
+   *       RepairApplicationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       applicationsClient.repairApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable repairApplicationCallable() { + return stub.repairApplicationCallable(); + } + + @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); + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsSettings.java new file mode 100644 index 00000000..86e73b69 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsSettings.java @@ -0,0 +1,252 @@ +/* + * 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.appengine.v1; + +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.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.appengine.v1.stub.ApplicationsStubSettings; +import com.google.longrunning.Operation; +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 ApplicationsClient}. + * + *

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

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

{@code
+ * ApplicationsSettings.Builder applicationsSettingsBuilder = ApplicationsSettings.newBuilder();
+ * applicationsSettingsBuilder
+ *     .getApplicationSettings()
+ *     .setRetrySettings(
+ *         applicationsSettingsBuilder
+ *             .getApplicationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ApplicationsSettings applicationsSettings = applicationsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ApplicationsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getApplication. */ + public UnaryCallSettings getApplicationSettings() { + return ((ApplicationsStubSettings) getStubSettings()).getApplicationSettings(); + } + + /** Returns the object with the settings used for calls to createApplication. */ + public UnaryCallSettings createApplicationSettings() { + return ((ApplicationsStubSettings) getStubSettings()).createApplicationSettings(); + } + + /** Returns the object with the settings used for calls to createApplication. */ + public OperationCallSettings + createApplicationOperationSettings() { + return ((ApplicationsStubSettings) getStubSettings()).createApplicationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public UnaryCallSettings updateApplicationSettings() { + return ((ApplicationsStubSettings) getStubSettings()).updateApplicationSettings(); + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public OperationCallSettings + updateApplicationOperationSettings() { + return ((ApplicationsStubSettings) getStubSettings()).updateApplicationOperationSettings(); + } + + /** Returns the object with the settings used for calls to repairApplication. */ + public UnaryCallSettings repairApplicationSettings() { + return ((ApplicationsStubSettings) getStubSettings()).repairApplicationSettings(); + } + + /** Returns the object with the settings used for calls to repairApplication. */ + public OperationCallSettings + repairApplicationOperationSettings() { + return ((ApplicationsStubSettings) getStubSettings()).repairApplicationOperationSettings(); + } + + public static final ApplicationsSettings create(ApplicationsStubSettings stub) + throws IOException { + return new ApplicationsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ApplicationsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ApplicationsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ApplicationsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ApplicationsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ApplicationsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ApplicationsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApplicationsStubSettings.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 ApplicationsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ApplicationsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ApplicationsStubSettings.newBuilder(clientContext)); + } + + protected Builder(ApplicationsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ApplicationsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ApplicationsStubSettings.newBuilder()); + } + + public ApplicationsStubSettings.Builder getStubSettingsBuilder() { + return ((ApplicationsStubSettings.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 getApplication. */ + public UnaryCallSettings.Builder getApplicationSettings() { + return getStubSettingsBuilder().getApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to createApplication. */ + public UnaryCallSettings.Builder + createApplicationSettings() { + return getStubSettingsBuilder().createApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to createApplication. */ + public OperationCallSettings.Builder + createApplicationOperationSettings() { + return getStubSettingsBuilder().createApplicationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + public UnaryCallSettings.Builder + updateApplicationSettings() { + return getStubSettingsBuilder().updateApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + public OperationCallSettings.Builder + updateApplicationOperationSettings() { + return getStubSettingsBuilder().updateApplicationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to repairApplication. */ + public UnaryCallSettings.Builder + repairApplicationSettings() { + return getStubSettingsBuilder().repairApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to repairApplication. */ + public OperationCallSettings.Builder + repairApplicationOperationSettings() { + return getStubSettingsBuilder().repairApplicationOperationSettings(); + } + + @Override + public ApplicationsSettings build() throws IOException { + return new ApplicationsSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesClient.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesClient.java new file mode 100644 index 00000000..a29a93bd --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesClient.java @@ -0,0 +1,607 @@ +/* + * 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.appengine.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.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.stub.AuthorizedCertificatesStub; +import com.google.appengine.v1.stub.AuthorizedCertificatesStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +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: Manages SSL certificates a user is authorized to administer. A user can + * administer any SSL certificates applicable to their authorized domains. + * + *

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 (AuthorizedCertificatesClient authorizedCertificatesClient =
+ *     AuthorizedCertificatesClient.create()) {
+ *   GetAuthorizedCertificateRequest request =
+ *       GetAuthorizedCertificateRequest.newBuilder()
+ *           .setName("name3373707")
+ *           .setView(AuthorizedCertificateView.forNumber(0))
+ *           .build();
+ *   AuthorizedCertificate response =
+ *       authorizedCertificatesClient.getAuthorizedCertificate(request);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * AuthorizedCertificatesSettings authorizedCertificatesSettings =
+ *     AuthorizedCertificatesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AuthorizedCertificatesClient authorizedCertificatesClient =
+ *     AuthorizedCertificatesClient.create(authorizedCertificatesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * AuthorizedCertificatesSettings authorizedCertificatesSettings =
+ *     AuthorizedCertificatesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AuthorizedCertificatesClient authorizedCertificatesClient =
+ *     AuthorizedCertificatesClient.create(authorizedCertificatesSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   ListAuthorizedCertificatesRequest request =
+   *       ListAuthorizedCertificatesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setView(AuthorizedCertificateView.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AuthorizedCertificate element :
+   *       authorizedCertificatesClient.listAuthorizedCertificates(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 ListAuthorizedCertificatesPagedResponse listAuthorizedCertificates( + ListAuthorizedCertificatesRequest request) { + return listAuthorizedCertificatesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all SSL certificates the user is authorized to administer. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   ListAuthorizedCertificatesRequest request =
+   *       ListAuthorizedCertificatesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setView(AuthorizedCertificateView.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       authorizedCertificatesClient
+   *           .listAuthorizedCertificatesPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (AuthorizedCertificate element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListAuthorizedCertificatesRequest, ListAuthorizedCertificatesPagedResponse> + listAuthorizedCertificatesPagedCallable() { + return stub.listAuthorizedCertificatesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all SSL certificates the user is authorized to administer. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   ListAuthorizedCertificatesRequest request =
+   *       ListAuthorizedCertificatesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setView(AuthorizedCertificateView.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAuthorizedCertificatesResponse response =
+   *         authorizedCertificatesClient.listAuthorizedCertificatesCallable().call(request);
+   *     for (AuthorizedCertificate element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAuthorizedCertificatesCallable() { + return stub.listAuthorizedCertificatesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified SSL certificate. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   GetAuthorizedCertificateRequest request =
+   *       GetAuthorizedCertificateRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setView(AuthorizedCertificateView.forNumber(0))
+   *           .build();
+   *   AuthorizedCertificate response =
+   *       authorizedCertificatesClient.getAuthorizedCertificate(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 AuthorizedCertificate getAuthorizedCertificate( + GetAuthorizedCertificateRequest request) { + return getAuthorizedCertificateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified SSL certificate. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   GetAuthorizedCertificateRequest request =
+   *       GetAuthorizedCertificateRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setView(AuthorizedCertificateView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       authorizedCertificatesClient.getAuthorizedCertificateCallable().futureCall(request);
+   *   // Do something.
+   *   AuthorizedCertificate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getAuthorizedCertificateCallable() { + return stub.getAuthorizedCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Uploads the specified SSL certificate. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   CreateAuthorizedCertificateRequest request =
+   *       CreateAuthorizedCertificateRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setCertificate(AuthorizedCertificate.newBuilder().build())
+   *           .build();
+   *   AuthorizedCertificate response =
+   *       authorizedCertificatesClient.createAuthorizedCertificate(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 AuthorizedCertificate createAuthorizedCertificate( + CreateAuthorizedCertificateRequest request) { + return createAuthorizedCertificateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Uploads the specified SSL certificate. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   CreateAuthorizedCertificateRequest request =
+   *       CreateAuthorizedCertificateRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setCertificate(AuthorizedCertificate.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       authorizedCertificatesClient.createAuthorizedCertificateCallable().futureCall(request);
+   *   // Do something.
+   *   AuthorizedCertificate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createAuthorizedCertificateCallable() { + return stub.createAuthorizedCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified SSL certificate. To renew a certificate and maintain its existing domain + * mappings, update `certificate_data` with a new certificate. The new certificate must be + * applicable to the same domains as the original certificate. The certificate `display_name` may + * also be updated. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   UpdateAuthorizedCertificateRequest request =
+   *       UpdateAuthorizedCertificateRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setCertificate(AuthorizedCertificate.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AuthorizedCertificate response =
+   *       authorizedCertificatesClient.updateAuthorizedCertificate(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 AuthorizedCertificate updateAuthorizedCertificate( + UpdateAuthorizedCertificateRequest request) { + return updateAuthorizedCertificateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified SSL certificate. To renew a certificate and maintain its existing domain + * mappings, update `certificate_data` with a new certificate. The new certificate must be + * applicable to the same domains as the original certificate. The certificate `display_name` may + * also be updated. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   UpdateAuthorizedCertificateRequest request =
+   *       UpdateAuthorizedCertificateRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setCertificate(AuthorizedCertificate.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       authorizedCertificatesClient.updateAuthorizedCertificateCallable().futureCall(request);
+   *   // Do something.
+   *   AuthorizedCertificate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateAuthorizedCertificateCallable() { + return stub.updateAuthorizedCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified SSL certificate. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   DeleteAuthorizedCertificateRequest request =
+   *       DeleteAuthorizedCertificateRequest.newBuilder().setName("name3373707").build();
+   *   authorizedCertificatesClient.deleteAuthorizedCertificate(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 void deleteAuthorizedCertificate(DeleteAuthorizedCertificateRequest request) { + deleteAuthorizedCertificateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified SSL certificate. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+   *     AuthorizedCertificatesClient.create()) {
+   *   DeleteAuthorizedCertificateRequest request =
+   *       DeleteAuthorizedCertificateRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       authorizedCertificatesClient.deleteAuthorizedCertificateCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteAuthorizedCertificateCallable() { + return stub.deleteAuthorizedCertificateCallable(); + } + + @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 ListAuthorizedCertificatesPagedResponse + extends AbstractPagedListResponse< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate, + ListAuthorizedCertificatesPage, + ListAuthorizedCertificatesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAuthorizedCertificatesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListAuthorizedCertificatesPage, ListAuthorizedCertificatesPagedResponse>() { + @Override + public ListAuthorizedCertificatesPagedResponse apply( + ListAuthorizedCertificatesPage input) { + return new ListAuthorizedCertificatesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListAuthorizedCertificatesPagedResponse(ListAuthorizedCertificatesPage page) { + super(page, ListAuthorizedCertificatesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAuthorizedCertificatesPage + extends AbstractPage< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate, + ListAuthorizedCertificatesPage> { + + private ListAuthorizedCertificatesPage( + PageContext< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate> + context, + ListAuthorizedCertificatesResponse response) { + super(context, response); + } + + private static ListAuthorizedCertificatesPage createEmptyPage() { + return new ListAuthorizedCertificatesPage(null, null); + } + + @Override + protected ListAuthorizedCertificatesPage createPage( + PageContext< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate> + context, + ListAuthorizedCertificatesResponse response) { + return new ListAuthorizedCertificatesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAuthorizedCertificatesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate, + ListAuthorizedCertificatesPage, + ListAuthorizedCertificatesFixedSizeCollection> { + + private ListAuthorizedCertificatesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAuthorizedCertificatesFixedSizeCollection createEmptyCollection() { + return new ListAuthorizedCertificatesFixedSizeCollection(null, 0); + } + + @Override + protected ListAuthorizedCertificatesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAuthorizedCertificatesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesSettings.java new file mode 100644 index 00000000..0c5e0618 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesSettings.java @@ -0,0 +1,249 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.AuthorizedCertificatesClient.ListAuthorizedCertificatesPagedResponse; + +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.appengine.v1.stub.AuthorizedCertificatesStubSettings; +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 AuthorizedCertificatesClient}. + * + *

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

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

{@code
+ * AuthorizedCertificatesSettings.Builder authorizedCertificatesSettingsBuilder =
+ *     AuthorizedCertificatesSettings.newBuilder();
+ * authorizedCertificatesSettingsBuilder
+ *     .getAuthorizedCertificateSettings()
+ *     .setRetrySettings(
+ *         authorizedCertificatesSettingsBuilder
+ *             .getAuthorizedCertificateSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AuthorizedCertificatesSettings authorizedCertificatesSettings =
+ *     authorizedCertificatesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AuthorizedCertificatesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listAuthorizedCertificates. */ + public PagedCallSettings< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + ListAuthorizedCertificatesPagedResponse> + listAuthorizedCertificatesSettings() { + return ((AuthorizedCertificatesStubSettings) getStubSettings()) + .listAuthorizedCertificatesSettings(); + } + + /** Returns the object with the settings used for calls to getAuthorizedCertificate. */ + public UnaryCallSettings + getAuthorizedCertificateSettings() { + return ((AuthorizedCertificatesStubSettings) getStubSettings()) + .getAuthorizedCertificateSettings(); + } + + /** Returns the object with the settings used for calls to createAuthorizedCertificate. */ + public UnaryCallSettings + createAuthorizedCertificateSettings() { + return ((AuthorizedCertificatesStubSettings) getStubSettings()) + .createAuthorizedCertificateSettings(); + } + + /** Returns the object with the settings used for calls to updateAuthorizedCertificate. */ + public UnaryCallSettings + updateAuthorizedCertificateSettings() { + return ((AuthorizedCertificatesStubSettings) getStubSettings()) + .updateAuthorizedCertificateSettings(); + } + + /** Returns the object with the settings used for calls to deleteAuthorizedCertificate. */ + public UnaryCallSettings + deleteAuthorizedCertificateSettings() { + return ((AuthorizedCertificatesStubSettings) getStubSettings()) + .deleteAuthorizedCertificateSettings(); + } + + public static final AuthorizedCertificatesSettings create(AuthorizedCertificatesStubSettings stub) + throws IOException { + return new AuthorizedCertificatesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AuthorizedCertificatesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AuthorizedCertificatesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AuthorizedCertificatesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AuthorizedCertificatesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AuthorizedCertificatesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AuthorizedCertificatesStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AuthorizedCertificatesStubSettings.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 AuthorizedCertificatesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AuthorizedCertificatesSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AuthorizedCertificatesStubSettings.newBuilder(clientContext)); + } + + protected Builder(AuthorizedCertificatesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AuthorizedCertificatesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AuthorizedCertificatesStubSettings.newBuilder()); + } + + public AuthorizedCertificatesStubSettings.Builder getStubSettingsBuilder() { + return ((AuthorizedCertificatesStubSettings.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 listAuthorizedCertificates. */ + public PagedCallSettings.Builder< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + ListAuthorizedCertificatesPagedResponse> + listAuthorizedCertificatesSettings() { + return getStubSettingsBuilder().listAuthorizedCertificatesSettings(); + } + + /** Returns the builder for the settings used for calls to getAuthorizedCertificate. */ + public UnaryCallSettings.Builder + getAuthorizedCertificateSettings() { + return getStubSettingsBuilder().getAuthorizedCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to createAuthorizedCertificate. */ + public UnaryCallSettings.Builder + createAuthorizedCertificateSettings() { + return getStubSettingsBuilder().createAuthorizedCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to updateAuthorizedCertificate. */ + public UnaryCallSettings.Builder + updateAuthorizedCertificateSettings() { + return getStubSettingsBuilder().updateAuthorizedCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAuthorizedCertificate. */ + public UnaryCallSettings.Builder + deleteAuthorizedCertificateSettings() { + return getStubSettingsBuilder().deleteAuthorizedCertificateSettings(); + } + + @Override + public AuthorizedCertificatesSettings build() throws IOException { + return new AuthorizedCertificatesSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsClient.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsClient.java new file mode 100644 index 00000000..1d517ed5 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsClient.java @@ -0,0 +1,373 @@ +/* + * 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.appengine.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.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.stub.AuthorizedDomainsStub; +import com.google.appengine.v1.stub.AuthorizedDomainsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Manages domains a user is authorized to administer. To authorize use of a + * domain, verify ownership via [Webmaster + * Central](https://www.google.com/webmasters/verification/home). + * + *

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 (AuthorizedDomainsClient authorizedDomainsClient = AuthorizedDomainsClient.create()) {
+ *   ListAuthorizedDomainsRequest request =
+ *       ListAuthorizedDomainsRequest.newBuilder()
+ *           .setParent("parent-995424086")
+ *           .setPageSize(883849137)
+ *           .setPageToken("pageToken873572522")
+ *           .build();
+ *   for (AuthorizedDomain element :
+ *       authorizedDomainsClient.listAuthorizedDomains(request).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * AuthorizedDomainsSettings authorizedDomainsSettings =
+ *     AuthorizedDomainsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AuthorizedDomainsClient authorizedDomainsClient =
+ *     AuthorizedDomainsClient.create(authorizedDomainsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * AuthorizedDomainsSettings authorizedDomainsSettings =
+ *     AuthorizedDomainsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AuthorizedDomainsClient authorizedDomainsClient =
+ *     AuthorizedDomainsClient.create(authorizedDomainsSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * try (AuthorizedDomainsClient authorizedDomainsClient = AuthorizedDomainsClient.create()) {
+   *   ListAuthorizedDomainsRequest request =
+   *       ListAuthorizedDomainsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AuthorizedDomain element :
+   *       authorizedDomainsClient.listAuthorizedDomains(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 ListAuthorizedDomainsPagedResponse listAuthorizedDomains( + ListAuthorizedDomainsRequest request) { + return listAuthorizedDomainsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all domains the user is authorized to administer. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedDomainsClient authorizedDomainsClient = AuthorizedDomainsClient.create()) {
+   *   ListAuthorizedDomainsRequest request =
+   *       ListAuthorizedDomainsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       authorizedDomainsClient.listAuthorizedDomainsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AuthorizedDomain element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAuthorizedDomainsPagedCallable() { + return stub.listAuthorizedDomainsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all domains the user is authorized to administer. + * + *

Sample code: + * + *

{@code
+   * try (AuthorizedDomainsClient authorizedDomainsClient = AuthorizedDomainsClient.create()) {
+   *   ListAuthorizedDomainsRequest request =
+   *       ListAuthorizedDomainsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAuthorizedDomainsResponse response =
+   *         authorizedDomainsClient.listAuthorizedDomainsCallable().call(request);
+   *     for (AuthorizedDomain element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAuthorizedDomainsCallable() { + return stub.listAuthorizedDomainsCallable(); + } + + @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 ListAuthorizedDomainsPagedResponse + extends AbstractPagedListResponse< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + AuthorizedDomain, + ListAuthorizedDomainsPage, + ListAuthorizedDomainsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAuthorizedDomainsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListAuthorizedDomainsPagedResponse apply(ListAuthorizedDomainsPage input) { + return new ListAuthorizedDomainsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListAuthorizedDomainsPagedResponse(ListAuthorizedDomainsPage page) { + super(page, ListAuthorizedDomainsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAuthorizedDomainsPage + extends AbstractPage< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + AuthorizedDomain, + ListAuthorizedDomainsPage> { + + private ListAuthorizedDomainsPage( + PageContext + context, + ListAuthorizedDomainsResponse response) { + super(context, response); + } + + private static ListAuthorizedDomainsPage createEmptyPage() { + return new ListAuthorizedDomainsPage(null, null); + } + + @Override + protected ListAuthorizedDomainsPage createPage( + PageContext + context, + ListAuthorizedDomainsResponse response) { + return new ListAuthorizedDomainsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAuthorizedDomainsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + AuthorizedDomain, + ListAuthorizedDomainsPage, + ListAuthorizedDomainsFixedSizeCollection> { + + private ListAuthorizedDomainsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAuthorizedDomainsFixedSizeCollection createEmptyCollection() { + return new ListAuthorizedDomainsFixedSizeCollection(null, 0); + } + + @Override + protected ListAuthorizedDomainsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAuthorizedDomainsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsSettings.java new file mode 100644 index 00000000..e236206b --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsSettings.java @@ -0,0 +1,193 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.AuthorizedDomainsClient.ListAuthorizedDomainsPagedResponse; + +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.appengine.v1.stub.AuthorizedDomainsStubSettings; +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 AuthorizedDomainsClient}. + * + *

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

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

{@code
+ * AuthorizedDomainsSettings.Builder authorizedDomainsSettingsBuilder =
+ *     AuthorizedDomainsSettings.newBuilder();
+ * authorizedDomainsSettingsBuilder
+ *     .listAuthorizedDomainsSettings()
+ *     .setRetrySettings(
+ *         authorizedDomainsSettingsBuilder
+ *             .listAuthorizedDomainsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AuthorizedDomainsSettings authorizedDomainsSettings = authorizedDomainsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AuthorizedDomainsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listAuthorizedDomains. */ + public PagedCallSettings< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + ListAuthorizedDomainsPagedResponse> + listAuthorizedDomainsSettings() { + return ((AuthorizedDomainsStubSettings) getStubSettings()).listAuthorizedDomainsSettings(); + } + + public static final AuthorizedDomainsSettings create(AuthorizedDomainsStubSettings stub) + throws IOException { + return new AuthorizedDomainsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AuthorizedDomainsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AuthorizedDomainsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AuthorizedDomainsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AuthorizedDomainsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AuthorizedDomainsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AuthorizedDomainsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AuthorizedDomainsStubSettings.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 AuthorizedDomainsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AuthorizedDomainsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AuthorizedDomainsStubSettings.newBuilder(clientContext)); + } + + protected Builder(AuthorizedDomainsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AuthorizedDomainsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AuthorizedDomainsStubSettings.newBuilder()); + } + + public AuthorizedDomainsStubSettings.Builder getStubSettingsBuilder() { + return ((AuthorizedDomainsStubSettings.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 listAuthorizedDomains. */ + public PagedCallSettings.Builder< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + ListAuthorizedDomainsPagedResponse> + listAuthorizedDomainsSettings() { + return getStubSettingsBuilder().listAuthorizedDomainsSettings(); + } + + @Override + public AuthorizedDomainsSettings build() throws IOException { + return new AuthorizedDomainsSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsClient.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsClient.java new file mode 100644 index 00000000..cf875dde --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsClient.java @@ -0,0 +1,648 @@ +/* + * 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.appengine.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.appengine.v1.stub.DomainMappingsStub; +import com.google.appengine.v1.stub.DomainMappingsStubSettings; +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: Manages domains serving an application. + * + *

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 (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+ *   GetDomainMappingRequest request =
+ *       GetDomainMappingRequest.newBuilder().setName("name3373707").build();
+ *   DomainMapping response = domainMappingsClient.getDomainMapping(request);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * DomainMappingsSettings domainMappingsSettings =
+ *     DomainMappingsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DomainMappingsClient domainMappingsClient = DomainMappingsClient.create(domainMappingsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * DomainMappingsSettings domainMappingsSettings =
+ *     DomainMappingsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DomainMappingsClient domainMappingsClient = DomainMappingsClient.create(domainMappingsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DomainMappingsClient implements BackgroundResource { + private final DomainMappingsSettings settings; + private final DomainMappingsStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DomainMappingsClient with default settings. */ + public static final DomainMappingsClient create() throws IOException { + return create(DomainMappingsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DomainMappingsClient, 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 DomainMappingsClient create(DomainMappingsSettings settings) + throws IOException { + return new DomainMappingsClient(settings); + } + + /** + * Constructs an instance of DomainMappingsClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(DomainMappingsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DomainMappingsClient create(DomainMappingsStub stub) { + return new DomainMappingsClient(stub); + } + + /** + * Constructs an instance of DomainMappingsClient, 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 DomainMappingsClient(DomainMappingsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DomainMappingsStubSettings) 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 DomainMappingsClient(DomainMappingsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DomainMappingsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DomainMappingsStub 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 the domain mappings on an application. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   ListDomainMappingsRequest request =
+   *       ListDomainMappingsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (DomainMapping element : domainMappingsClient.listDomainMappings(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 ListDomainMappingsPagedResponse listDomainMappings( + ListDomainMappingsRequest request) { + return listDomainMappingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the domain mappings on an application. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   ListDomainMappingsRequest request =
+   *       ListDomainMappingsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       domainMappingsClient.listDomainMappingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DomainMapping element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDomainMappingsPagedCallable() { + return stub.listDomainMappingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the domain mappings on an application. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   ListDomainMappingsRequest request =
+   *       ListDomainMappingsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListDomainMappingsResponse response =
+   *         domainMappingsClient.listDomainMappingsCallable().call(request);
+   *     for (DomainMapping element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDomainMappingsCallable() { + return stub.listDomainMappingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified domain mapping. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   GetDomainMappingRequest request =
+   *       GetDomainMappingRequest.newBuilder().setName("name3373707").build();
+   *   DomainMapping response = domainMappingsClient.getDomainMapping(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 DomainMapping getDomainMapping(GetDomainMappingRequest request) { + return getDomainMappingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified domain mapping. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   GetDomainMappingRequest request =
+   *       GetDomainMappingRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       domainMappingsClient.getDomainMappingCallable().futureCall(request);
+   *   // Do something.
+   *   DomainMapping response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDomainMappingCallable() { + return stub.getDomainMappingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Maps a domain to an application. A user must be authorized to administer a domain in order to + * map it to an application. For a list of available authorized domains, see + * [`AuthorizedDomains.ListAuthorizedDomains`](). + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   CreateDomainMappingRequest request =
+   *       CreateDomainMappingRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setDomainMapping(DomainMapping.newBuilder().build())
+   *           .setOverrideStrategy(DomainOverrideStrategy.forNumber(0))
+   *           .build();
+   *   DomainMapping response = domainMappingsClient.createDomainMappingAsync(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 createDomainMappingAsync( + CreateDomainMappingRequest request) { + return createDomainMappingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Maps a domain to an application. A user must be authorized to administer a domain in order to + * map it to an application. For a list of available authorized domains, see + * [`AuthorizedDomains.ListAuthorizedDomains`](). + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   CreateDomainMappingRequest request =
+   *       CreateDomainMappingRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setDomainMapping(DomainMapping.newBuilder().build())
+   *           .setOverrideStrategy(DomainOverrideStrategy.forNumber(0))
+   *           .build();
+   *   OperationFuture future =
+   *       domainMappingsClient.createDomainMappingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DomainMapping response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createDomainMappingOperationCallable() { + return stub.createDomainMappingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Maps a domain to an application. A user must be authorized to administer a domain in order to + * map it to an application. For a list of available authorized domains, see + * [`AuthorizedDomains.ListAuthorizedDomains`](). + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   CreateDomainMappingRequest request =
+   *       CreateDomainMappingRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setDomainMapping(DomainMapping.newBuilder().build())
+   *           .setOverrideStrategy(DomainOverrideStrategy.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       domainMappingsClient.createDomainMappingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDomainMappingCallable() { + return stub.createDomainMappingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update + * `certificate_id` to point to an `AuthorizedCertificate` resource. A user must be authorized to + * administer the associated domain in order to update a `DomainMapping` resource. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   UpdateDomainMappingRequest request =
+   *       UpdateDomainMappingRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setDomainMapping(DomainMapping.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   DomainMapping response = domainMappingsClient.updateDomainMappingAsync(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 updateDomainMappingAsync( + UpdateDomainMappingRequest request) { + return updateDomainMappingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update + * `certificate_id` to point to an `AuthorizedCertificate` resource. A user must be authorized to + * administer the associated domain in order to update a `DomainMapping` resource. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   UpdateDomainMappingRequest request =
+   *       UpdateDomainMappingRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setDomainMapping(DomainMapping.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       domainMappingsClient.updateDomainMappingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DomainMapping response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateDomainMappingOperationCallable() { + return stub.updateDomainMappingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update + * `certificate_id` to point to an `AuthorizedCertificate` resource. A user must be authorized to + * administer the associated domain in order to update a `DomainMapping` resource. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   UpdateDomainMappingRequest request =
+   *       UpdateDomainMappingRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setDomainMapping(DomainMapping.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       domainMappingsClient.updateDomainMappingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDomainMappingCallable() { + return stub.updateDomainMappingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified domain mapping. A user must be authorized to administer the associated + * domain in order to delete a `DomainMapping` resource. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   DeleteDomainMappingRequest request =
+   *       DeleteDomainMappingRequest.newBuilder().setName("name3373707").build();
+   *   domainMappingsClient.deleteDomainMappingAsync(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 deleteDomainMappingAsync( + DeleteDomainMappingRequest request) { + return deleteDomainMappingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified domain mapping. A user must be authorized to administer the associated + * domain in order to delete a `DomainMapping` resource. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   DeleteDomainMappingRequest request =
+   *       DeleteDomainMappingRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       domainMappingsClient.deleteDomainMappingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteDomainMappingOperationCallable() { + return stub.deleteDomainMappingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified domain mapping. A user must be authorized to administer the associated + * domain in order to delete a `DomainMapping` resource. + * + *

Sample code: + * + *

{@code
+   * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+   *   DeleteDomainMappingRequest request =
+   *       DeleteDomainMappingRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       domainMappingsClient.deleteDomainMappingCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDomainMappingCallable() { + return stub.deleteDomainMappingCallable(); + } + + @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 ListDomainMappingsPagedResponse + extends AbstractPagedListResponse< + ListDomainMappingsRequest, + ListDomainMappingsResponse, + DomainMapping, + ListDomainMappingsPage, + ListDomainMappingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDomainMappingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDomainMappingsPagedResponse apply(ListDomainMappingsPage input) { + return new ListDomainMappingsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDomainMappingsPagedResponse(ListDomainMappingsPage page) { + super(page, ListDomainMappingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDomainMappingsPage + extends AbstractPage< + ListDomainMappingsRequest, + ListDomainMappingsResponse, + DomainMapping, + ListDomainMappingsPage> { + + private ListDomainMappingsPage( + PageContext context, + ListDomainMappingsResponse response) { + super(context, response); + } + + private static ListDomainMappingsPage createEmptyPage() { + return new ListDomainMappingsPage(null, null); + } + + @Override + protected ListDomainMappingsPage createPage( + PageContext context, + ListDomainMappingsResponse response) { + return new ListDomainMappingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDomainMappingsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDomainMappingsRequest, + ListDomainMappingsResponse, + DomainMapping, + ListDomainMappingsPage, + ListDomainMappingsFixedSizeCollection> { + + private ListDomainMappingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDomainMappingsFixedSizeCollection createEmptyCollection() { + return new ListDomainMappingsFixedSizeCollection(null, 0); + } + + @Override + protected ListDomainMappingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDomainMappingsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsSettings.java new file mode 100644 index 00000000..9cd71889 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsSettings.java @@ -0,0 +1,274 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.DomainMappingsClient.ListDomainMappingsPagedResponse; + +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.appengine.v1.stub.DomainMappingsStubSettings; +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 DomainMappingsClient}. + * + *

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

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

{@code
+ * DomainMappingsSettings.Builder domainMappingsSettingsBuilder =
+ *     DomainMappingsSettings.newBuilder();
+ * domainMappingsSettingsBuilder
+ *     .getDomainMappingSettings()
+ *     .setRetrySettings(
+ *         domainMappingsSettingsBuilder
+ *             .getDomainMappingSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DomainMappingsSettings domainMappingsSettings = domainMappingsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DomainMappingsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listDomainMappings. */ + public PagedCallSettings< + ListDomainMappingsRequest, ListDomainMappingsResponse, ListDomainMappingsPagedResponse> + listDomainMappingsSettings() { + return ((DomainMappingsStubSettings) getStubSettings()).listDomainMappingsSettings(); + } + + /** Returns the object with the settings used for calls to getDomainMapping. */ + public UnaryCallSettings getDomainMappingSettings() { + return ((DomainMappingsStubSettings) getStubSettings()).getDomainMappingSettings(); + } + + /** Returns the object with the settings used for calls to createDomainMapping. */ + public UnaryCallSettings createDomainMappingSettings() { + return ((DomainMappingsStubSettings) getStubSettings()).createDomainMappingSettings(); + } + + /** Returns the object with the settings used for calls to createDomainMapping. */ + public OperationCallSettings + createDomainMappingOperationSettings() { + return ((DomainMappingsStubSettings) getStubSettings()).createDomainMappingOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDomainMapping. */ + public UnaryCallSettings updateDomainMappingSettings() { + return ((DomainMappingsStubSettings) getStubSettings()).updateDomainMappingSettings(); + } + + /** Returns the object with the settings used for calls to updateDomainMapping. */ + public OperationCallSettings + updateDomainMappingOperationSettings() { + return ((DomainMappingsStubSettings) getStubSettings()).updateDomainMappingOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDomainMapping. */ + public UnaryCallSettings deleteDomainMappingSettings() { + return ((DomainMappingsStubSettings) getStubSettings()).deleteDomainMappingSettings(); + } + + /** Returns the object with the settings used for calls to deleteDomainMapping. */ + public OperationCallSettings + deleteDomainMappingOperationSettings() { + return ((DomainMappingsStubSettings) getStubSettings()).deleteDomainMappingOperationSettings(); + } + + public static final DomainMappingsSettings create(DomainMappingsStubSettings stub) + throws IOException { + return new DomainMappingsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DomainMappingsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DomainMappingsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DomainMappingsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DomainMappingsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DomainMappingsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DomainMappingsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DomainMappingsStubSettings.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 DomainMappingsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DomainMappingsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DomainMappingsStubSettings.newBuilder(clientContext)); + } + + protected Builder(DomainMappingsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DomainMappingsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DomainMappingsStubSettings.newBuilder()); + } + + public DomainMappingsStubSettings.Builder getStubSettingsBuilder() { + return ((DomainMappingsStubSettings.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 listDomainMappings. */ + public PagedCallSettings.Builder< + ListDomainMappingsRequest, ListDomainMappingsResponse, ListDomainMappingsPagedResponse> + listDomainMappingsSettings() { + return getStubSettingsBuilder().listDomainMappingsSettings(); + } + + /** Returns the builder for the settings used for calls to getDomainMapping. */ + public UnaryCallSettings.Builder + getDomainMappingSettings() { + return getStubSettingsBuilder().getDomainMappingSettings(); + } + + /** Returns the builder for the settings used for calls to createDomainMapping. */ + public UnaryCallSettings.Builder + createDomainMappingSettings() { + return getStubSettingsBuilder().createDomainMappingSettings(); + } + + /** Returns the builder for the settings used for calls to createDomainMapping. */ + public OperationCallSettings.Builder< + CreateDomainMappingRequest, DomainMapping, OperationMetadataV1> + createDomainMappingOperationSettings() { + return getStubSettingsBuilder().createDomainMappingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDomainMapping. */ + public UnaryCallSettings.Builder + updateDomainMappingSettings() { + return getStubSettingsBuilder().updateDomainMappingSettings(); + } + + /** Returns the builder for the settings used for calls to updateDomainMapping. */ + public OperationCallSettings.Builder< + UpdateDomainMappingRequest, DomainMapping, OperationMetadataV1> + updateDomainMappingOperationSettings() { + return getStubSettingsBuilder().updateDomainMappingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDomainMapping. */ + public UnaryCallSettings.Builder + deleteDomainMappingSettings() { + return getStubSettingsBuilder().deleteDomainMappingSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDomainMapping. */ + public OperationCallSettings.Builder + deleteDomainMappingOperationSettings() { + return getStubSettingsBuilder().deleteDomainMappingOperationSettings(); + } + + @Override + public DomainMappingsSettings build() throws IOException { + return new DomainMappingsSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallClient.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallClient.java new file mode 100644 index 00000000..cd781c72 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallClient.java @@ -0,0 +1,603 @@ +/* + * 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.appengine.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.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.firewall.FirewallRule; +import com.google.appengine.v1.stub.FirewallStub; +import com.google.appengine.v1.stub.FirewallStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +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: Firewall resources are used to define a collection of access control rules + * for an Application. Each rule is defined with a position which specifies the rule's order in the + * sequence of rules, an IP range to be matched against requests, and an action to take upon + * matching requests. + * + *

Every request is evaluated against the Firewall rules in priority order. Processesing stops at + * the first rule which matches the request's IP address. A final rule always specifies an action + * that applies to all remaining IP addresses. The default final rule for a newly-created + * application will be set to "allow" if not otherwise specified by the user. + * + *

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 (FirewallClient firewallClient = FirewallClient.create()) {
+ *   BatchUpdateIngressRulesRequest request =
+ *       BatchUpdateIngressRulesRequest.newBuilder()
+ *           .setName("name3373707")
+ *           .addAllIngressRules(new ArrayList())
+ *           .build();
+ *   BatchUpdateIngressRulesResponse response = firewallClient.batchUpdateIngressRules(request);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * FirewallSettings firewallSettings =
+ *     FirewallSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * FirewallClient firewallClient = FirewallClient.create(firewallSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * FirewallSettings firewallSettings =
+ *     FirewallSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * FirewallClient firewallClient = FirewallClient.create(firewallSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   ListIngressRulesRequest request =
+   *       ListIngressRulesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setMatchingAddress("matchingAddress861962551")
+   *           .build();
+   *   for (FirewallRule element : firewallClient.listIngressRules(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 ListIngressRulesPagedResponse listIngressRules(ListIngressRulesRequest request) { + return listIngressRulesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the firewall rules of an application. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   ListIngressRulesRequest request =
+   *       ListIngressRulesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setMatchingAddress("matchingAddress861962551")
+   *           .build();
+   *   ApiFuture future =
+   *       firewallClient.listIngressRulesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (FirewallRule element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listIngressRulesPagedCallable() { + return stub.listIngressRulesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the firewall rules of an application. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   ListIngressRulesRequest request =
+   *       ListIngressRulesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setMatchingAddress("matchingAddress861962551")
+   *           .build();
+   *   while (true) {
+   *     ListIngressRulesResponse response = firewallClient.listIngressRulesCallable().call(request);
+   *     for (FirewallRule element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listIngressRulesCallable() { + return stub.listIngressRulesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the + * rules of an existing firewall with the new rules. + * + *

If the final rule does not match traffic with the '*' wildcard IP range, then an "allow + * all" rule is explicitly added to the end of the list. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   BatchUpdateIngressRulesRequest request =
+   *       BatchUpdateIngressRulesRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .addAllIngressRules(new ArrayList())
+   *           .build();
+   *   BatchUpdateIngressRulesResponse response = firewallClient.batchUpdateIngressRules(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 BatchUpdateIngressRulesResponse batchUpdateIngressRules( + BatchUpdateIngressRulesRequest request) { + return batchUpdateIngressRulesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the + * rules of an existing firewall with the new rules. + * + *

If the final rule does not match traffic with the '*' wildcard IP range, then an "allow + * all" rule is explicitly added to the end of the list. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   BatchUpdateIngressRulesRequest request =
+   *       BatchUpdateIngressRulesRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .addAllIngressRules(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       firewallClient.batchUpdateIngressRulesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchUpdateIngressRulesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchUpdateIngressRulesCallable() { + return stub.batchUpdateIngressRulesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a firewall rule for the application. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   CreateIngressRuleRequest request =
+   *       CreateIngressRuleRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setRule(FirewallRule.newBuilder().build())
+   *           .build();
+   *   FirewallRule response = firewallClient.createIngressRule(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 FirewallRule createIngressRule(CreateIngressRuleRequest request) { + return createIngressRuleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a firewall rule for the application. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   CreateIngressRuleRequest request =
+   *       CreateIngressRuleRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setRule(FirewallRule.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       firewallClient.createIngressRuleCallable().futureCall(request);
+   *   // Do something.
+   *   FirewallRule response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createIngressRuleCallable() { + return stub.createIngressRuleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified firewall rule. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   GetIngressRuleRequest request =
+   *       GetIngressRuleRequest.newBuilder().setName("name3373707").build();
+   *   FirewallRule response = firewallClient.getIngressRule(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 FirewallRule getIngressRule(GetIngressRuleRequest request) { + return getIngressRuleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified firewall rule. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   GetIngressRuleRequest request =
+   *       GetIngressRuleRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = firewallClient.getIngressRuleCallable().futureCall(request);
+   *   // Do something.
+   *   FirewallRule response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIngressRuleCallable() { + return stub.getIngressRuleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified firewall rule. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   UpdateIngressRuleRequest request =
+   *       UpdateIngressRuleRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setRule(FirewallRule.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   FirewallRule response = firewallClient.updateIngressRule(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 FirewallRule updateIngressRule(UpdateIngressRuleRequest request) { + return updateIngressRuleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified firewall rule. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   UpdateIngressRuleRequest request =
+   *       UpdateIngressRuleRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setRule(FirewallRule.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       firewallClient.updateIngressRuleCallable().futureCall(request);
+   *   // Do something.
+   *   FirewallRule response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateIngressRuleCallable() { + return stub.updateIngressRuleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified firewall rule. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   DeleteIngressRuleRequest request =
+   *       DeleteIngressRuleRequest.newBuilder().setName("name3373707").build();
+   *   firewallClient.deleteIngressRule(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 void deleteIngressRule(DeleteIngressRuleRequest request) { + deleteIngressRuleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified firewall rule. + * + *

Sample code: + * + *

{@code
+   * try (FirewallClient firewallClient = FirewallClient.create()) {
+   *   DeleteIngressRuleRequest request =
+   *       DeleteIngressRuleRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = firewallClient.deleteIngressRuleCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteIngressRuleCallable() { + return stub.deleteIngressRuleCallable(); + } + + @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 ListIngressRulesPagedResponse + extends AbstractPagedListResponse< + ListIngressRulesRequest, + ListIngressRulesResponse, + FirewallRule, + ListIngressRulesPage, + ListIngressRulesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListIngressRulesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListIngressRulesPagedResponse apply(ListIngressRulesPage input) { + return new ListIngressRulesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListIngressRulesPagedResponse(ListIngressRulesPage page) { + super(page, ListIngressRulesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListIngressRulesPage + extends AbstractPage< + ListIngressRulesRequest, ListIngressRulesResponse, FirewallRule, ListIngressRulesPage> { + + private ListIngressRulesPage( + PageContext context, + ListIngressRulesResponse response) { + super(context, response); + } + + private static ListIngressRulesPage createEmptyPage() { + return new ListIngressRulesPage(null, null); + } + + @Override + protected ListIngressRulesPage createPage( + PageContext context, + ListIngressRulesResponse response) { + return new ListIngressRulesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListIngressRulesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListIngressRulesRequest, + ListIngressRulesResponse, + FirewallRule, + ListIngressRulesPage, + ListIngressRulesFixedSizeCollection> { + + private ListIngressRulesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListIngressRulesFixedSizeCollection createEmptyCollection() { + return new ListIngressRulesFixedSizeCollection(null, 0); + } + + @Override + protected ListIngressRulesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListIngressRulesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallSettings.java new file mode 100644 index 00000000..3d0cbbfe --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallSettings.java @@ -0,0 +1,244 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.FirewallClient.ListIngressRulesPagedResponse; + +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.appengine.v1.firewall.FirewallRule; +import com.google.appengine.v1.stub.FirewallStubSettings; +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 FirewallClient}. + * + *

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

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

{@code
+ * FirewallSettings.Builder firewallSettingsBuilder = FirewallSettings.newBuilder();
+ * firewallSettingsBuilder
+ *     .batchUpdateIngressRulesSettings()
+ *     .setRetrySettings(
+ *         firewallSettingsBuilder
+ *             .batchUpdateIngressRulesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * FirewallSettings firewallSettings = firewallSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class FirewallSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listIngressRules. */ + public PagedCallSettings< + ListIngressRulesRequest, ListIngressRulesResponse, ListIngressRulesPagedResponse> + listIngressRulesSettings() { + return ((FirewallStubSettings) getStubSettings()).listIngressRulesSettings(); + } + + /** Returns the object with the settings used for calls to batchUpdateIngressRules. */ + public UnaryCallSettings + batchUpdateIngressRulesSettings() { + return ((FirewallStubSettings) getStubSettings()).batchUpdateIngressRulesSettings(); + } + + /** Returns the object with the settings used for calls to createIngressRule. */ + public UnaryCallSettings createIngressRuleSettings() { + return ((FirewallStubSettings) getStubSettings()).createIngressRuleSettings(); + } + + /** Returns the object with the settings used for calls to getIngressRule. */ + public UnaryCallSettings getIngressRuleSettings() { + return ((FirewallStubSettings) getStubSettings()).getIngressRuleSettings(); + } + + /** Returns the object with the settings used for calls to updateIngressRule. */ + public UnaryCallSettings updateIngressRuleSettings() { + return ((FirewallStubSettings) getStubSettings()).updateIngressRuleSettings(); + } + + /** Returns the object with the settings used for calls to deleteIngressRule. */ + public UnaryCallSettings deleteIngressRuleSettings() { + return ((FirewallStubSettings) getStubSettings()).deleteIngressRuleSettings(); + } + + public static final FirewallSettings create(FirewallStubSettings stub) throws IOException { + return new FirewallSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return FirewallStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return FirewallStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return FirewallStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return FirewallStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return FirewallStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return FirewallStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return FirewallStubSettings.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 FirewallSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for FirewallSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(FirewallStubSettings.newBuilder(clientContext)); + } + + protected Builder(FirewallSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(FirewallStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(FirewallStubSettings.newBuilder()); + } + + public FirewallStubSettings.Builder getStubSettingsBuilder() { + return ((FirewallStubSettings.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 listIngressRules. */ + public PagedCallSettings.Builder< + ListIngressRulesRequest, ListIngressRulesResponse, ListIngressRulesPagedResponse> + listIngressRulesSettings() { + return getStubSettingsBuilder().listIngressRulesSettings(); + } + + /** Returns the builder for the settings used for calls to batchUpdateIngressRules. */ + public UnaryCallSettings.Builder< + BatchUpdateIngressRulesRequest, BatchUpdateIngressRulesResponse> + batchUpdateIngressRulesSettings() { + return getStubSettingsBuilder().batchUpdateIngressRulesSettings(); + } + + /** Returns the builder for the settings used for calls to createIngressRule. */ + public UnaryCallSettings.Builder + createIngressRuleSettings() { + return getStubSettingsBuilder().createIngressRuleSettings(); + } + + /** Returns the builder for the settings used for calls to getIngressRule. */ + public UnaryCallSettings.Builder getIngressRuleSettings() { + return getStubSettingsBuilder().getIngressRuleSettings(); + } + + /** Returns the builder for the settings used for calls to updateIngressRule. */ + public UnaryCallSettings.Builder + updateIngressRuleSettings() { + return getStubSettingsBuilder().updateIngressRuleSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIngressRule. */ + public UnaryCallSettings.Builder deleteIngressRuleSettings() { + return getStubSettingsBuilder().deleteIngressRuleSettings(); + } + + @Override + public FirewallSettings build() throws IOException { + return new FirewallSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesClient.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesClient.java new file mode 100644 index 00000000..690d2cee --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesClient.java @@ -0,0 +1,597 @@ +/* + * 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.appengine.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.appengine.v1.stub.InstancesStub; +import com.google.appengine.v1.stub.InstancesStubSettings; +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: Manages instances of a version. + * + *

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 (InstancesClient instancesClient = InstancesClient.create()) {
+ *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   Instance response = instancesClient.getInstance(request);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * InstancesSettings instancesSettings =
+ *     InstancesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * InstancesClient instancesClient = InstancesClient.create(instancesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * InstancesSettings instancesSettings =
+ *     InstancesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * InstancesClient instancesClient = InstancesClient.create(instancesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class InstancesClient implements BackgroundResource { + private final InstancesSettings settings; + private final InstancesStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of InstancesClient with default settings. */ + public static final InstancesClient create() throws IOException { + return create(InstancesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of InstancesClient, 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 InstancesClient create(InstancesSettings settings) throws IOException { + return new InstancesClient(settings); + } + + /** + * Constructs an instance of InstancesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(InstancesSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final InstancesClient create(InstancesStub stub) { + return new InstancesClient(stub); + } + + /** + * Constructs an instance of InstancesClient, 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 InstancesClient(InstancesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((InstancesStubSettings) 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 InstancesClient(InstancesStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final InstancesSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public InstancesStub 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 the instances of a version. + * + *

Tip: To aggregate details about instances over time, see the [Stackdriver Monitoring + * API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Instance element : instancesClient.listInstances(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 ListInstancesPagedResponse listInstances(ListInstancesRequest request) { + return listInstancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the instances of a version. + * + *

Tip: To aggregate details about instances over time, see the [Stackdriver Monitoring + * API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = instancesClient.listInstancesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Instance element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInstancesPagedCallable() { + return stub.listInstancesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the instances of a version. + * + *

Tip: To aggregate details about instances over time, see the [Stackdriver Monitoring + * API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListInstancesResponse response = instancesClient.listInstancesCallable().call(request);
+   *     for (Instance element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listInstancesCallable() { + return stub.listInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets instance information. + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = instancesClient.getInstance(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 Instance getInstance(GetInstanceRequest request) { + return getInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets instance information. + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = instancesClient.getInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInstanceCallable() { + return stub.getInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a running instance. + * + *

The instance might be automatically recreated based on the scaling settings of the version. + * For more information, see "How Instances are Managed" ([standard + * environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) + * | [flexible + * environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). + * + *

To ensure that instances are not re-created and avoid getting billed, you can stop all + * instances within the target version by changing the serving status of the version to `STOPPED` + * with the + * [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) + * method. + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   instancesClient.deleteInstanceAsync(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 deleteInstanceAsync( + DeleteInstanceRequest request) { + return deleteInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a running instance. + * + *

The instance might be automatically recreated based on the scaling settings of the version. + * For more information, see "How Instances are Managed" ([standard + * environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) + * | [flexible + * environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). + * + *

To ensure that instances are not re-created and avoid getting billed, you can stop all + * instances within the target version by changing the serving status of the version to `STOPPED` + * with the + * [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) + * method. + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       instancesClient.deleteInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteInstanceOperationCallable() { + return stub.deleteInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a running instance. + * + *

The instance might be automatically recreated based on the scaling settings of the version. + * For more information, see "How Instances are Managed" ([standard + * environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) + * | [flexible + * environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). + * + *

To ensure that instances are not re-created and avoid getting billed, you can stop all + * instances within the target version by changing the serving status of the version to `STOPPED` + * with the + * [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) + * method. + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = instancesClient.deleteInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteInstanceCallable() { + return stub.deleteInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables debugging on a VM instance. This allows you to use the SSH command to connect to the + * virtual machine where the instance lives. While in "debug mode", the instance continues to + * serve live traffic. You should delete the instance when you are done debugging and then allow + * the system to take over and determine if another instance should be started. + * + *

Only applicable for instances in App Engine flexible environment. + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   DebugInstanceRequest request =
+   *       DebugInstanceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setSshKey("sshKey-893236425")
+   *           .build();
+   *   Instance response = instancesClient.debugInstanceAsync(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 debugInstanceAsync( + DebugInstanceRequest request) { + return debugInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables debugging on a VM instance. This allows you to use the SSH command to connect to the + * virtual machine where the instance lives. While in "debug mode", the instance continues to + * serve live traffic. You should delete the instance when you are done debugging and then allow + * the system to take over and determine if another instance should be started. + * + *

Only applicable for instances in App Engine flexible environment. + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   DebugInstanceRequest request =
+   *       DebugInstanceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setSshKey("sshKey-893236425")
+   *           .build();
+   *   OperationFuture future =
+   *       instancesClient.debugInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + debugInstanceOperationCallable() { + return stub.debugInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables debugging on a VM instance. This allows you to use the SSH command to connect to the + * virtual machine where the instance lives. While in "debug mode", the instance continues to + * serve live traffic. You should delete the instance when you are done debugging and then allow + * the system to take over and determine if another instance should be started. + * + *

Only applicable for instances in App Engine flexible environment. + * + *

Sample code: + * + *

{@code
+   * try (InstancesClient instancesClient = InstancesClient.create()) {
+   *   DebugInstanceRequest request =
+   *       DebugInstanceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setSshKey("sshKey-893236425")
+   *           .build();
+   *   ApiFuture future = instancesClient.debugInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable debugInstanceCallable() { + return stub.debugInstanceCallable(); + } + + @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 ListInstancesPagedResponse + extends AbstractPagedListResponse< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListInstancesPagedResponse apply(ListInstancesPage input) { + return new ListInstancesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListInstancesPagedResponse(ListInstancesPage page) { + super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstancesPage + extends AbstractPage< + ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { + + private ListInstancesPage( + PageContext context, + ListInstancesResponse response) { + super(context, response); + } + + private static ListInstancesPage createEmptyPage() { + return new ListInstancesPage(null, null); + } + + @Override + protected ListInstancesPage createPage( + PageContext context, + ListInstancesResponse response) { + return new ListInstancesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstancesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + private ListInstancesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstancesFixedSizeCollection createEmptyCollection() { + return new ListInstancesFixedSizeCollection(null, 0); + } + + @Override + protected ListInstancesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstancesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesSettings.java new file mode 100644 index 00000000..25b7ee4d --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesSettings.java @@ -0,0 +1,243 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.InstancesClient.ListInstancesPagedResponse; + +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.appengine.v1.stub.InstancesStubSettings; +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 InstancesClient}. + * + *

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

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

{@code
+ * InstancesSettings.Builder instancesSettingsBuilder = InstancesSettings.newBuilder();
+ * instancesSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         instancesSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * InstancesSettings instancesSettings = instancesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class InstancesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return ((InstancesStubSettings) getStubSettings()).listInstancesSettings(); + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return ((InstancesStubSettings) getStubSettings()).getInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return ((InstancesStubSettings) getStubSettings()).deleteInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return ((InstancesStubSettings) getStubSettings()).deleteInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to debugInstance. */ + public UnaryCallSettings debugInstanceSettings() { + return ((InstancesStubSettings) getStubSettings()).debugInstanceSettings(); + } + + /** Returns the object with the settings used for calls to debugInstance. */ + public OperationCallSettings + debugInstanceOperationSettings() { + return ((InstancesStubSettings) getStubSettings()).debugInstanceOperationSettings(); + } + + public static final InstancesSettings create(InstancesStubSettings stub) throws IOException { + return new InstancesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstancesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return InstancesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return InstancesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return InstancesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstancesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return InstancesStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return InstancesStubSettings.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 InstancesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for InstancesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(InstancesStubSettings.newBuilder(clientContext)); + } + + protected Builder(InstancesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(InstancesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(InstancesStubSettings.newBuilder()); + } + + public InstancesStubSettings.Builder getStubSettingsBuilder() { + return ((InstancesStubSettings.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 listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return getStubSettingsBuilder().listInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getStubSettingsBuilder().getInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return getStubSettingsBuilder().deleteInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return getStubSettingsBuilder().deleteInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to debugInstance. */ + public UnaryCallSettings.Builder debugInstanceSettings() { + return getStubSettingsBuilder().debugInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to debugInstance. */ + public OperationCallSettings.Builder + debugInstanceOperationSettings() { + return getStubSettingsBuilder().debugInstanceOperationSettings(); + } + + @Override + public InstancesSettings build() throws IOException { + return new InstancesSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesClient.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesClient.java new file mode 100644 index 00000000..0623e7d0 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesClient.java @@ -0,0 +1,542 @@ +/* + * 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.appengine.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.appengine.v1.stub.ServicesStub; +import com.google.appengine.v1.stub.ServicesStubSettings; +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: Manages services of an application. + * + *

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 (ServicesClient servicesClient = ServicesClient.create()) {
+ *   GetServiceRequest request = GetServiceRequest.newBuilder().setName("name3373707").build();
+ *   Service response = servicesClient.getService(request);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * ServicesSettings servicesSettings =
+ *     ServicesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ServicesClient servicesClient = ServicesClient.create(servicesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ServicesSettings servicesSettings =
+ *     ServicesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ServicesClient servicesClient = ServicesClient.create(servicesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ServicesClient implements BackgroundResource { + private final ServicesSettings settings; + private final ServicesStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of ServicesClient with default settings. */ + public static final ServicesClient create() throws IOException { + return create(ServicesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ServicesClient, 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 ServicesClient create(ServicesSettings settings) throws IOException { + return new ServicesClient(settings); + } + + /** + * Constructs an instance of ServicesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ServicesSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ServicesClient create(ServicesStub stub) { + return new ServicesClient(stub); + } + + /** + * Constructs an instance of ServicesClient, 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 ServicesClient(ServicesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ServicesStubSettings) 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 ServicesClient(ServicesStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final ServicesSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ServicesStub 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 the services in the application. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   ListServicesRequest request =
+   *       ListServicesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Service element : servicesClient.listServices(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 ListServicesPagedResponse listServices(ListServicesRequest request) { + return listServicesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the services in the application. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   ListServicesRequest request =
+   *       ListServicesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = servicesClient.listServicesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Service element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServicesPagedCallable() { + return stub.listServicesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the services in the application. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   ListServicesRequest request =
+   *       ListServicesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListServicesResponse response = servicesClient.listServicesCallable().call(request);
+   *     for (Service element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listServicesCallable() { + return stub.listServicesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current configuration of the specified service. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   GetServiceRequest request = GetServiceRequest.newBuilder().setName("name3373707").build();
+   *   Service response = servicesClient.getService(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 Service getService(GetServiceRequest request) { + return getServiceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current configuration of the specified service. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   GetServiceRequest request = GetServiceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = servicesClient.getServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getServiceCallable() { + return stub.getServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of the specified service. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setService(Service.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMigrateTraffic(true)
+   *           .build();
+   *   Service response = servicesClient.updateServiceAsync(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 updateServiceAsync( + UpdateServiceRequest request) { + return updateServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of the specified service. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setService(Service.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMigrateTraffic(true)
+   *           .build();
+   *   OperationFuture future =
+   *       servicesClient.updateServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateServiceOperationCallable() { + return stub.updateServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configuration of the specified service. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setService(Service.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMigrateTraffic(true)
+   *           .build();
+   *   ApiFuture future = servicesClient.updateServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateServiceCallable() { + return stub.updateServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified service and all enclosed versions. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder().setName("name3373707").build();
+   *   servicesClient.deleteServiceAsync(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 deleteServiceAsync( + DeleteServiceRequest request) { + return deleteServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified service and all enclosed versions. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       servicesClient.deleteServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteServiceOperationCallable() { + return stub.deleteServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified service and all enclosed versions. + * + *

Sample code: + * + *

{@code
+   * try (ServicesClient servicesClient = ServicesClient.create()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = servicesClient.deleteServiceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteServiceCallable() { + return stub.deleteServiceCallable(); + } + + @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 ListServicesPagedResponse + extends AbstractPagedListResponse< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListServicesPagedResponse apply(ListServicesPage input) { + return new ListServicesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListServicesPagedResponse(ListServicesPage page) { + super(page, ListServicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListServicesPage + extends AbstractPage { + + private ListServicesPage( + PageContext context, + ListServicesResponse response) { + super(context, response); + } + + private static ListServicesPage createEmptyPage() { + return new ListServicesPage(null, null); + } + + @Override + protected ListServicesPage createPage( + PageContext context, + ListServicesResponse response) { + return new ListServicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListServicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + private ListServicesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListServicesFixedSizeCollection createEmptyCollection() { + return new ListServicesFixedSizeCollection(null, 0); + } + + @Override + protected ListServicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListServicesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesSettings.java new file mode 100644 index 00000000..830f5748 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesSettings.java @@ -0,0 +1,243 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.ServicesClient.ListServicesPagedResponse; + +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.appengine.v1.stub.ServicesStubSettings; +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 ServicesClient}. + * + *

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

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

{@code
+ * ServicesSettings.Builder servicesSettingsBuilder = ServicesSettings.newBuilder();
+ * servicesSettingsBuilder
+ *     .getServiceSettings()
+ *     .setRetrySettings(
+ *         servicesSettingsBuilder
+ *             .getServiceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ServicesSettings servicesSettings = servicesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ServicesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return ((ServicesStubSettings) getStubSettings()).listServicesSettings(); + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return ((ServicesStubSettings) getStubSettings()).getServiceSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return ((ServicesStubSettings) getStubSettings()).updateServiceSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return ((ServicesStubSettings) getStubSettings()).updateServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return ((ServicesStubSettings) getStubSettings()).deleteServiceSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return ((ServicesStubSettings) getStubSettings()).deleteServiceOperationSettings(); + } + + public static final ServicesSettings create(ServicesStubSettings stub) throws IOException { + return new ServicesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ServicesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ServicesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ServicesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ServicesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ServicesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ServicesStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ServicesStubSettings.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 ServicesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ServicesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ServicesStubSettings.newBuilder(clientContext)); + } + + protected Builder(ServicesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ServicesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ServicesStubSettings.newBuilder()); + } + + public ServicesStubSettings.Builder getStubSettingsBuilder() { + return ((ServicesStubSettings.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 listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return getStubSettingsBuilder().listServicesSettings(); + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getStubSettingsBuilder().getServiceSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return getStubSettingsBuilder().updateServiceSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return getStubSettingsBuilder().updateServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return getStubSettingsBuilder().deleteServiceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return getStubSettingsBuilder().deleteServiceOperationSettings(); + } + + @Override + public ServicesSettings build() throws IOException { + return new ServicesSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsClient.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsClient.java new file mode 100644 index 00000000..4c145eb2 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsClient.java @@ -0,0 +1,767 @@ +/* + * 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.appengine.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.appengine.v1.stub.VersionsStub; +import com.google.appengine.v1.stub.VersionsStubSettings; +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: Manages versions of a service. + * + *

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 (VersionsClient versionsClient = VersionsClient.create()) {
+ *   GetVersionRequest request =
+ *       GetVersionRequest.newBuilder()
+ *           .setName("name3373707")
+ *           .setView(VersionView.forNumber(0))
+ *           .build();
+ *   Version response = versionsClient.getVersion(request);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * VersionsSettings versionsSettings =
+ *     VersionsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * VersionsClient versionsClient = VersionsClient.create(versionsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * VersionsSettings versionsSettings =
+ *     VersionsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * VersionsClient versionsClient = VersionsClient.create(versionsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class VersionsClient implements BackgroundResource { + private final VersionsSettings settings; + private final VersionsStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of VersionsClient with default settings. */ + public static final VersionsClient create() throws IOException { + return create(VersionsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of VersionsClient, 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 VersionsClient create(VersionsSettings settings) throws IOException { + return new VersionsClient(settings); + } + + /** + * Constructs an instance of VersionsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(VersionsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final VersionsClient create(VersionsStub stub) { + return new VersionsClient(stub); + } + + /** + * Constructs an instance of VersionsClient, 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 VersionsClient(VersionsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((VersionsStubSettings) 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 VersionsClient(VersionsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final VersionsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public VersionsStub 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 the versions of a service. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   ListVersionsRequest request =
+   *       ListVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setView(VersionView.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Version element : versionsClient.listVersions(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 ListVersionsPagedResponse listVersions(ListVersionsRequest request) { + return listVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the versions of a service. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   ListVersionsRequest request =
+   *       ListVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setView(VersionView.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = versionsClient.listVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Version element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listVersionsPagedCallable() { + return stub.listVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the versions of a service. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   ListVersionsRequest request =
+   *       ListVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setView(VersionView.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListVersionsResponse response = versionsClient.listVersionsCallable().call(request);
+   *     for (Version element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listVersionsCallable() { + return stub.listVersionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified Version resource. By default, only a `BASIC_VIEW` will be returned. Specify + * the `FULL_VIEW` parameter to get the full resource. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   GetVersionRequest request =
+   *       GetVersionRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setView(VersionView.forNumber(0))
+   *           .build();
+   *   Version response = versionsClient.getVersion(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 Version getVersion(GetVersionRequest request) { + return getVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the specified Version resource. By default, only a `BASIC_VIEW` will be returned. Specify + * the `FULL_VIEW` parameter to get the full resource. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   GetVersionRequest request =
+   *       GetVersionRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setView(VersionView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = versionsClient.getVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Version response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getVersionCallable() { + return stub.getVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys code and resource files to a new version. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   CreateVersionRequest request =
+   *       CreateVersionRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setVersion(Version.newBuilder().build())
+   *           .build();
+   *   Version response = versionsClient.createVersionAsync(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 createVersionAsync( + CreateVersionRequest request) { + return createVersionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys code and resource files to a new version. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   CreateVersionRequest request =
+   *       CreateVersionRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setVersion(Version.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       versionsClient.createVersionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Version response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createVersionOperationCallable() { + return stub.createVersionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys code and resource files to a new version. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   CreateVersionRequest request =
+   *       CreateVersionRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setVersion(Version.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = versionsClient.createVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createVersionCallable() { + return stub.createVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Version resource. You can specify the following fields depending on the + * App Engine environment and type of scaling that the version resource uses: + * + *

**Standard environment** + * + *

    + *
  • [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) + *
+ * + *

*automatic scaling* in the standard environment: + * + *

    + *
  • [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
  • [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
  • [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
  • [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
+ * + *

*basic scaling* or *manual scaling* in the standard environment: + * + *

    + *
  • [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + *
  • [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + *
+ * + *

**Flexible environment** + * + *

    + *
  • [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + *
+ * + *

*automatic scaling* in the flexible environment: + * + *

    + *
  • [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
+ * + *

*manual scaling* in the flexible environment: + * + *

    + *
  • [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + *
+ * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   UpdateVersionRequest request =
+   *       UpdateVersionRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setVersion(Version.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Version response = versionsClient.updateVersionAsync(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 updateVersionAsync( + UpdateVersionRequest request) { + return updateVersionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Version resource. You can specify the following fields depending on the + * App Engine environment and type of scaling that the version resource uses: + * + *

**Standard environment** + * + *

    + *
  • [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) + *
+ * + *

*automatic scaling* in the standard environment: + * + *

    + *
  • [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
  • [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
  • [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
  • [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
+ * + *

*basic scaling* or *manual scaling* in the standard environment: + * + *

    + *
  • [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + *
  • [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + *
+ * + *

**Flexible environment** + * + *

    + *
  • [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + *
+ * + *

*automatic scaling* in the flexible environment: + * + *

    + *
  • [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
+ * + *

*manual scaling* in the flexible environment: + * + *

    + *
  • [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + *
+ * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   UpdateVersionRequest request =
+   *       UpdateVersionRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setVersion(Version.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       versionsClient.updateVersionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Version response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateVersionOperationCallable() { + return stub.updateVersionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Version resource. You can specify the following fields depending on the + * App Engine environment and type of scaling that the version resource uses: + * + *

**Standard environment** + * + *

    + *
  • [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) + *
+ * + *

*automatic scaling* in the standard environment: + * + *

    + *
  • [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
  • [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
  • [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
  • [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + *
+ * + *

*basic scaling* or *manual scaling* in the standard environment: + * + *

    + *
  • [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + *
  • [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + *
+ * + *

**Flexible environment** + * + *

    + *
  • [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + *
+ * + *

*automatic scaling* in the flexible environment: + * + *

    + *
  • [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
  • [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + *
+ * + *

*manual scaling* in the flexible environment: + * + *

    + *
  • [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + *
+ * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   UpdateVersionRequest request =
+   *       UpdateVersionRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setVersion(Version.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = versionsClient.updateVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateVersionCallable() { + return stub.updateVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing Version resource. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   DeleteVersionRequest request =
+   *       DeleteVersionRequest.newBuilder().setName("name3373707").build();
+   *   versionsClient.deleteVersionAsync(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 deleteVersionAsync( + DeleteVersionRequest request) { + return deleteVersionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing Version resource. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   DeleteVersionRequest request =
+   *       DeleteVersionRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       versionsClient.deleteVersionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteVersionOperationCallable() { + return stub.deleteVersionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing Version resource. + * + *

Sample code: + * + *

{@code
+   * try (VersionsClient versionsClient = VersionsClient.create()) {
+   *   DeleteVersionRequest request =
+   *       DeleteVersionRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = versionsClient.deleteVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteVersionCallable() { + return stub.deleteVersionCallable(); + } + + @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 ListVersionsPagedResponse + extends AbstractPagedListResponse< + ListVersionsRequest, + ListVersionsResponse, + Version, + ListVersionsPage, + ListVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListVersionsPagedResponse apply(ListVersionsPage input) { + return new ListVersionsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListVersionsPagedResponse(ListVersionsPage page) { + super(page, ListVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListVersionsPage + extends AbstractPage { + + private ListVersionsPage( + PageContext context, + ListVersionsResponse response) { + super(context, response); + } + + private static ListVersionsPage createEmptyPage() { + return new ListVersionsPage(null, null); + } + + @Override + protected ListVersionsPage createPage( + PageContext context, + ListVersionsResponse response) { + return new ListVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListVersionsRequest, + ListVersionsResponse, + Version, + ListVersionsPage, + ListVersionsFixedSizeCollection> { + + private ListVersionsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListVersionsFixedSizeCollection createEmptyCollection() { + return new ListVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListVersionsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsSettings.java new file mode 100644 index 00000000..174bdee7 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsSettings.java @@ -0,0 +1,265 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.VersionsClient.ListVersionsPagedResponse; + +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.appengine.v1.stub.VersionsStubSettings; +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 VersionsClient}. + * + *

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

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

{@code
+ * VersionsSettings.Builder versionsSettingsBuilder = VersionsSettings.newBuilder();
+ * versionsSettingsBuilder
+ *     .getVersionSettings()
+ *     .setRetrySettings(
+ *         versionsSettingsBuilder
+ *             .getVersionSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * VersionsSettings versionsSettings = versionsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class VersionsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listVersions. */ + public PagedCallSettings + listVersionsSettings() { + return ((VersionsStubSettings) getStubSettings()).listVersionsSettings(); + } + + /** Returns the object with the settings used for calls to getVersion. */ + public UnaryCallSettings getVersionSettings() { + return ((VersionsStubSettings) getStubSettings()).getVersionSettings(); + } + + /** Returns the object with the settings used for calls to createVersion. */ + public UnaryCallSettings createVersionSettings() { + return ((VersionsStubSettings) getStubSettings()).createVersionSettings(); + } + + /** Returns the object with the settings used for calls to createVersion. */ + public OperationCallSettings + createVersionOperationSettings() { + return ((VersionsStubSettings) getStubSettings()).createVersionOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateVersion. */ + public UnaryCallSettings updateVersionSettings() { + return ((VersionsStubSettings) getStubSettings()).updateVersionSettings(); + } + + /** Returns the object with the settings used for calls to updateVersion. */ + public OperationCallSettings + updateVersionOperationSettings() { + return ((VersionsStubSettings) getStubSettings()).updateVersionOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteVersion. */ + public UnaryCallSettings deleteVersionSettings() { + return ((VersionsStubSettings) getStubSettings()).deleteVersionSettings(); + } + + /** Returns the object with the settings used for calls to deleteVersion. */ + public OperationCallSettings + deleteVersionOperationSettings() { + return ((VersionsStubSettings) getStubSettings()).deleteVersionOperationSettings(); + } + + public static final VersionsSettings create(VersionsStubSettings stub) throws IOException { + return new VersionsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return VersionsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return VersionsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return VersionsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return VersionsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return VersionsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return VersionsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return VersionsStubSettings.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 VersionsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for VersionsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(VersionsStubSettings.newBuilder(clientContext)); + } + + protected Builder(VersionsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(VersionsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(VersionsStubSettings.newBuilder()); + } + + public VersionsStubSettings.Builder getStubSettingsBuilder() { + return ((VersionsStubSettings.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 listVersions. */ + public PagedCallSettings.Builder< + ListVersionsRequest, ListVersionsResponse, ListVersionsPagedResponse> + listVersionsSettings() { + return getStubSettingsBuilder().listVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to getVersion. */ + public UnaryCallSettings.Builder getVersionSettings() { + return getStubSettingsBuilder().getVersionSettings(); + } + + /** Returns the builder for the settings used for calls to createVersion. */ + public UnaryCallSettings.Builder createVersionSettings() { + return getStubSettingsBuilder().createVersionSettings(); + } + + /** Returns the builder for the settings used for calls to createVersion. */ + public OperationCallSettings.Builder + createVersionOperationSettings() { + return getStubSettingsBuilder().createVersionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateVersion. */ + public UnaryCallSettings.Builder updateVersionSettings() { + return getStubSettingsBuilder().updateVersionSettings(); + } + + /** Returns the builder for the settings used for calls to updateVersion. */ + public OperationCallSettings.Builder + updateVersionOperationSettings() { + return getStubSettingsBuilder().updateVersionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteVersion. */ + public UnaryCallSettings.Builder deleteVersionSettings() { + return getStubSettingsBuilder().deleteVersionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteVersion. */ + public OperationCallSettings.Builder + deleteVersionOperationSettings() { + return getStubSettingsBuilder().deleteVersionOperationSettings(); + } + + @Override + public VersionsSettings build() throws IOException { + return new VersionsSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/gapic_metadata.json b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/gapic_metadata.json new file mode 100644 index 00000000..bf17a3cb --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/gapic_metadata.json @@ -0,0 +1,183 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.appengine.v1", + "libraryPackage": "com.google.appengine.v1", + "services": { + "Applications": { + "clients": { + "grpc": { + "libraryClient": "ApplicationsClient", + "rpcs": { + "CreateApplication": { + "methods": ["createApplicationAsync", "createApplicationOperationCallable", "createApplicationCallable"] + }, + "GetApplication": { + "methods": ["getApplication", "getApplicationCallable"] + }, + "RepairApplication": { + "methods": ["repairApplicationAsync", "repairApplicationOperationCallable", "repairApplicationCallable"] + }, + "UpdateApplication": { + "methods": ["updateApplicationAsync", "updateApplicationOperationCallable", "updateApplicationCallable"] + } + } + } + } + }, + "Services": { + "clients": { + "grpc": { + "libraryClient": "ServicesClient", + "rpcs": { + "DeleteService": { + "methods": ["deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"] + }, + "GetService": { + "methods": ["getService", "getServiceCallable"] + }, + "ListServices": { + "methods": ["listServices", "listServicesPagedCallable", "listServicesCallable"] + }, + "UpdateService": { + "methods": ["updateServiceAsync", "updateServiceOperationCallable", "updateServiceCallable"] + } + } + } + } + }, + "Versions": { + "clients": { + "grpc": { + "libraryClient": "VersionsClient", + "rpcs": { + "CreateVersion": { + "methods": ["createVersionAsync", "createVersionOperationCallable", "createVersionCallable"] + }, + "DeleteVersion": { + "methods": ["deleteVersionAsync", "deleteVersionOperationCallable", "deleteVersionCallable"] + }, + "GetVersion": { + "methods": ["getVersion", "getVersionCallable"] + }, + "ListVersions": { + "methods": ["listVersions", "listVersionsPagedCallable", "listVersionsCallable"] + }, + "UpdateVersion": { + "methods": ["updateVersionAsync", "updateVersionOperationCallable", "updateVersionCallable"] + } + } + } + } + }, + "Instances": { + "clients": { + "grpc": { + "libraryClient": "InstancesClient", + "rpcs": { + "DebugInstance": { + "methods": ["debugInstanceAsync", "debugInstanceOperationCallable", "debugInstanceCallable"] + }, + "DeleteInstance": { + "methods": ["deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] + }, + "GetInstance": { + "methods": ["getInstance", "getInstanceCallable"] + }, + "ListInstances": { + "methods": ["listInstances", "listInstancesPagedCallable", "listInstancesCallable"] + } + } + } + } + }, + "Firewall": { + "clients": { + "grpc": { + "libraryClient": "FirewallClient", + "rpcs": { + "BatchUpdateIngressRules": { + "methods": ["batchUpdateIngressRules", "batchUpdateIngressRulesCallable"] + }, + "CreateIngressRule": { + "methods": ["createIngressRule", "createIngressRuleCallable"] + }, + "DeleteIngressRule": { + "methods": ["deleteIngressRule", "deleteIngressRuleCallable"] + }, + "GetIngressRule": { + "methods": ["getIngressRule", "getIngressRuleCallable"] + }, + "ListIngressRules": { + "methods": ["listIngressRules", "listIngressRulesPagedCallable", "listIngressRulesCallable"] + }, + "UpdateIngressRule": { + "methods": ["updateIngressRule", "updateIngressRuleCallable"] + } + } + } + } + }, + "AuthorizedDomains": { + "clients": { + "grpc": { + "libraryClient": "AuthorizedDomainsClient", + "rpcs": { + "ListAuthorizedDomains": { + "methods": ["listAuthorizedDomains", "listAuthorizedDomainsPagedCallable", "listAuthorizedDomainsCallable"] + } + } + } + } + }, + "AuthorizedCertificates": { + "clients": { + "grpc": { + "libraryClient": "AuthorizedCertificatesClient", + "rpcs": { + "CreateAuthorizedCertificate": { + "methods": ["createAuthorizedCertificate", "createAuthorizedCertificateCallable"] + }, + "DeleteAuthorizedCertificate": { + "methods": ["deleteAuthorizedCertificate", "deleteAuthorizedCertificateCallable"] + }, + "GetAuthorizedCertificate": { + "methods": ["getAuthorizedCertificate", "getAuthorizedCertificateCallable"] + }, + "ListAuthorizedCertificates": { + "methods": ["listAuthorizedCertificates", "listAuthorizedCertificatesPagedCallable", "listAuthorizedCertificatesCallable"] + }, + "UpdateAuthorizedCertificate": { + "methods": ["updateAuthorizedCertificate", "updateAuthorizedCertificateCallable"] + } + } + } + } + }, + "DomainMappings": { + "clients": { + "grpc": { + "libraryClient": "DomainMappingsClient", + "rpcs": { + "CreateDomainMapping": { + "methods": ["createDomainMappingAsync", "createDomainMappingOperationCallable", "createDomainMappingCallable"] + }, + "DeleteDomainMapping": { + "methods": ["deleteDomainMappingAsync", "deleteDomainMappingOperationCallable", "deleteDomainMappingCallable"] + }, + "GetDomainMapping": { + "methods": ["getDomainMapping", "getDomainMappingCallable"] + }, + "ListDomainMappings": { + "methods": ["listDomainMappings", "listDomainMappingsPagedCallable", "listDomainMappingsCallable"] + }, + "UpdateDomainMapping": { + "methods": ["updateDomainMappingAsync", "updateDomainMappingOperationCallable", "updateDomainMappingCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/package-info.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/package-info.java new file mode 100644 index 00000000..d38fb257 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/package-info.java @@ -0,0 +1,162 @@ +/* + * 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. + * + *

======================= ApplicationsClient ======================= + * + *

Service Description: Manages App Engine applications. + * + *

Sample for ApplicationsClient: + * + *

{@code
+ * try (ApplicationsClient applicationsClient = ApplicationsClient.create()) {
+ *   GetApplicationRequest request =
+ *       GetApplicationRequest.newBuilder().setName("name3373707").build();
+ *   Application response = applicationsClient.getApplication(request);
+ * }
+ * }
+ * + *

======================= ServicesClient ======================= + * + *

Service Description: Manages services of an application. + * + *

Sample for ServicesClient: + * + *

{@code
+ * try (ServicesClient servicesClient = ServicesClient.create()) {
+ *   GetServiceRequest request = GetServiceRequest.newBuilder().setName("name3373707").build();
+ *   Service response = servicesClient.getService(request);
+ * }
+ * }
+ * + *

======================= VersionsClient ======================= + * + *

Service Description: Manages versions of a service. + * + *

Sample for VersionsClient: + * + *

{@code
+ * try (VersionsClient versionsClient = VersionsClient.create()) {
+ *   GetVersionRequest request =
+ *       GetVersionRequest.newBuilder()
+ *           .setName("name3373707")
+ *           .setView(VersionView.forNumber(0))
+ *           .build();
+ *   Version response = versionsClient.getVersion(request);
+ * }
+ * }
+ * + *

======================= InstancesClient ======================= + * + *

Service Description: Manages instances of a version. + * + *

Sample for InstancesClient: + * + *

{@code
+ * try (InstancesClient instancesClient = InstancesClient.create()) {
+ *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   Instance response = instancesClient.getInstance(request);
+ * }
+ * }
+ * + *

======================= FirewallClient ======================= + * + *

Service Description: Firewall resources are used to define a collection of access control + * rules for an Application. Each rule is defined with a position which specifies the rule's order + * in the sequence of rules, an IP range to be matched against requests, and an action to take upon + * matching requests. + * + *

Every request is evaluated against the Firewall rules in priority order. Processesing stops at + * the first rule which matches the request's IP address. A final rule always specifies an action + * that applies to all remaining IP addresses. The default final rule for a newly-created + * application will be set to "allow" if not otherwise specified by the user. + * + *

Sample for FirewallClient: + * + *

{@code
+ * try (FirewallClient firewallClient = FirewallClient.create()) {
+ *   BatchUpdateIngressRulesRequest request =
+ *       BatchUpdateIngressRulesRequest.newBuilder()
+ *           .setName("name3373707")
+ *           .addAllIngressRules(new ArrayList())
+ *           .build();
+ *   BatchUpdateIngressRulesResponse response = firewallClient.batchUpdateIngressRules(request);
+ * }
+ * }
+ * + *

======================= AuthorizedDomainsClient ======================= + * + *

Service Description: Manages domains a user is authorized to administer. To authorize use of a + * domain, verify ownership via [Webmaster + * Central](https://www.google.com/webmasters/verification/home). + * + *

Sample for AuthorizedDomainsClient: + * + *

{@code
+ * try (AuthorizedDomainsClient authorizedDomainsClient = AuthorizedDomainsClient.create()) {
+ *   ListAuthorizedDomainsRequest request =
+ *       ListAuthorizedDomainsRequest.newBuilder()
+ *           .setParent("parent-995424086")
+ *           .setPageSize(883849137)
+ *           .setPageToken("pageToken873572522")
+ *           .build();
+ *   for (AuthorizedDomain element :
+ *       authorizedDomainsClient.listAuthorizedDomains(request).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

======================= AuthorizedCertificatesClient ======================= + * + *

Service Description: Manages SSL certificates a user is authorized to administer. A user can + * administer any SSL certificates applicable to their authorized domains. + * + *

Sample for AuthorizedCertificatesClient: + * + *

{@code
+ * try (AuthorizedCertificatesClient authorizedCertificatesClient =
+ *     AuthorizedCertificatesClient.create()) {
+ *   GetAuthorizedCertificateRequest request =
+ *       GetAuthorizedCertificateRequest.newBuilder()
+ *           .setName("name3373707")
+ *           .setView(AuthorizedCertificateView.forNumber(0))
+ *           .build();
+ *   AuthorizedCertificate response =
+ *       authorizedCertificatesClient.getAuthorizedCertificate(request);
+ * }
+ * }
+ * + *

======================= DomainMappingsClient ======================= + * + *

Service Description: Manages domains serving an application. + * + *

Sample for DomainMappingsClient: + * + *

{@code
+ * try (DomainMappingsClient domainMappingsClient = DomainMappingsClient.create()) {
+ *   GetDomainMappingRequest request =
+ *       GetDomainMappingRequest.newBuilder().setName("name3373707").build();
+ *   DomainMapping response = domainMappingsClient.getDomainMapping(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.appengine.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStub.java new file mode 100644 index 00000000..28db033b --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStub.java @@ -0,0 +1,81 @@ +/* + * 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.appengine.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.Application; +import com.google.appengine.v1.CreateApplicationRequest; +import com.google.appengine.v1.GetApplicationRequest; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.RepairApplicationRequest; +import com.google.appengine.v1.UpdateApplicationRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Applications service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ApplicationsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable getApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: getApplicationCallable()"); + } + + public OperationCallable + createApplicationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createApplicationOperationCallable()"); + } + + public UnaryCallable createApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: createApplicationCallable()"); + } + + public OperationCallable + updateApplicationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateApplicationOperationCallable()"); + } + + public UnaryCallable updateApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: updateApplicationCallable()"); + } + + public OperationCallable + repairApplicationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: repairApplicationOperationCallable()"); + } + + public UnaryCallable repairApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: repairApplicationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStubSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStubSettings.java new file mode 100644 index 00000000..525239d2 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStubSettings.java @@ -0,0 +1,491 @@ +/* + * 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.appengine.v1.stub; + +import com.google.api.core.ApiFunction; +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.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +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.appengine.v1.Application; +import com.google.appengine.v1.CreateApplicationRequest; +import com.google.appengine.v1.GetApplicationRequest; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.RepairApplicationRequest; +import com.google.appengine.v1.UpdateApplicationRequest; +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 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 ApplicationsStub}. + * + *

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

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

{@code
+ * ApplicationsStubSettings.Builder applicationsSettingsBuilder =
+ *     ApplicationsStubSettings.newBuilder();
+ * applicationsSettingsBuilder
+ *     .getApplicationSettings()
+ *     .setRetrySettings(
+ *         applicationsSettingsBuilder
+ *             .getApplicationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ApplicationsStubSettings applicationsSettings = applicationsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ApplicationsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/appengine.admin") + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final UnaryCallSettings getApplicationSettings; + private final UnaryCallSettings createApplicationSettings; + private final OperationCallSettings + createApplicationOperationSettings; + private final UnaryCallSettings updateApplicationSettings; + private final OperationCallSettings + updateApplicationOperationSettings; + private final UnaryCallSettings repairApplicationSettings; + private final OperationCallSettings + repairApplicationOperationSettings; + + /** Returns the object with the settings used for calls to getApplication. */ + public UnaryCallSettings getApplicationSettings() { + return getApplicationSettings; + } + + /** Returns the object with the settings used for calls to createApplication. */ + public UnaryCallSettings createApplicationSettings() { + return createApplicationSettings; + } + + /** Returns the object with the settings used for calls to createApplication. */ + public OperationCallSettings + createApplicationOperationSettings() { + return createApplicationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public UnaryCallSettings updateApplicationSettings() { + return updateApplicationSettings; + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public OperationCallSettings + updateApplicationOperationSettings() { + return updateApplicationOperationSettings; + } + + /** Returns the object with the settings used for calls to repairApplication. */ + public UnaryCallSettings repairApplicationSettings() { + return repairApplicationSettings; + } + + /** Returns the object with the settings used for calls to repairApplication. */ + public OperationCallSettings + repairApplicationOperationSettings() { + return repairApplicationOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ApplicationsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcApplicationsStub.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 "appengine.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(ApplicationsStubSettings.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 ApplicationsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getApplicationSettings = settingsBuilder.getApplicationSettings().build(); + createApplicationSettings = settingsBuilder.createApplicationSettings().build(); + createApplicationOperationSettings = + settingsBuilder.createApplicationOperationSettings().build(); + updateApplicationSettings = settingsBuilder.updateApplicationSettings().build(); + updateApplicationOperationSettings = + settingsBuilder.updateApplicationOperationSettings().build(); + repairApplicationSettings = settingsBuilder.repairApplicationSettings().build(); + repairApplicationOperationSettings = + settingsBuilder.repairApplicationOperationSettings().build(); + } + + /** Builder for ApplicationsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + getApplicationSettings; + private final UnaryCallSettings.Builder + createApplicationSettings; + private final OperationCallSettings.Builder< + CreateApplicationRequest, Application, OperationMetadataV1> + createApplicationOperationSettings; + private final UnaryCallSettings.Builder + updateApplicationSettings; + private final OperationCallSettings.Builder< + UpdateApplicationRequest, Application, OperationMetadataV1> + updateApplicationOperationSettings; + private final UnaryCallSettings.Builder + repairApplicationSettings; + private final OperationCallSettings.Builder< + RepairApplicationRequest, Application, OperationMetadataV1> + repairApplicationOperationSettings; + 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); + + getApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApplicationOperationSettings = OperationCallSettings.newBuilder(); + updateApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateApplicationOperationSettings = OperationCallSettings.newBuilder(); + repairApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + repairApplicationOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getApplicationSettings, + createApplicationSettings, + updateApplicationSettings, + repairApplicationSettings); + initDefaults(this); + } + + protected Builder(ApplicationsStubSettings settings) { + super(settings); + + getApplicationSettings = settings.getApplicationSettings.toBuilder(); + createApplicationSettings = settings.createApplicationSettings.toBuilder(); + createApplicationOperationSettings = settings.createApplicationOperationSettings.toBuilder(); + updateApplicationSettings = settings.updateApplicationSettings.toBuilder(); + updateApplicationOperationSettings = settings.updateApplicationOperationSettings.toBuilder(); + repairApplicationSettings = settings.repairApplicationSettings.toBuilder(); + repairApplicationOperationSettings = settings.repairApplicationOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getApplicationSettings, + createApplicationSettings, + updateApplicationSettings, + repairApplicationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .repairApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createApplicationOperationSettings() + .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(Application.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadataV1.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 + .updateApplicationOperationSettings() + .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(Application.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadataV1.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 + .repairApplicationOperationSettings() + .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(Application.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadataV1.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 getApplication. */ + public UnaryCallSettings.Builder getApplicationSettings() { + return getApplicationSettings; + } + + /** Returns the builder for the settings used for calls to createApplication. */ + public UnaryCallSettings.Builder + createApplicationSettings() { + return createApplicationSettings; + } + + /** Returns the builder for the settings used for calls to createApplication. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createApplicationOperationSettings() { + return createApplicationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + public UnaryCallSettings.Builder + updateApplicationSettings() { + return updateApplicationSettings; + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateApplicationOperationSettings() { + return updateApplicationOperationSettings; + } + + /** Returns the builder for the settings used for calls to repairApplication. */ + public UnaryCallSettings.Builder + repairApplicationSettings() { + return repairApplicationSettings; + } + + /** Returns the builder for the settings used for calls to repairApplication. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + repairApplicationOperationSettings() { + return repairApplicationOperationSettings; + } + + @Override + public ApplicationsStubSettings build() throws IOException { + return new ApplicationsStubSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStub.java new file mode 100644 index 00000000..1d5d1f08 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStub.java @@ -0,0 +1,79 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.AuthorizedCertificatesClient.ListAuthorizedCertificatesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.AuthorizedCertificate; +import com.google.appengine.v1.CreateAuthorizedCertificateRequest; +import com.google.appengine.v1.DeleteAuthorizedCertificateRequest; +import com.google.appengine.v1.GetAuthorizedCertificateRequest; +import com.google.appengine.v1.ListAuthorizedCertificatesRequest; +import com.google.appengine.v1.ListAuthorizedCertificatesResponse; +import com.google.appengine.v1.UpdateAuthorizedCertificateRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AuthorizedCertificates service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class AuthorizedCertificatesStub implements BackgroundResource { + + public UnaryCallable + listAuthorizedCertificatesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAuthorizedCertificatesPagedCallable()"); + } + + public UnaryCallable + listAuthorizedCertificatesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAuthorizedCertificatesCallable()"); + } + + public UnaryCallable + getAuthorizedCertificateCallable() { + throw new UnsupportedOperationException("Not implemented: getAuthorizedCertificateCallable()"); + } + + public UnaryCallable + createAuthorizedCertificateCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAuthorizedCertificateCallable()"); + } + + public UnaryCallable + updateAuthorizedCertificateCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAuthorizedCertificateCallable()"); + } + + public UnaryCallable + deleteAuthorizedCertificateCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAuthorizedCertificateCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStubSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStubSettings.java new file mode 100644 index 00000000..d1e6e439 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStubSettings.java @@ -0,0 +1,493 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.AuthorizedCertificatesClient.ListAuthorizedCertificatesPagedResponse; + +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.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.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.appengine.v1.AuthorizedCertificate; +import com.google.appengine.v1.CreateAuthorizedCertificateRequest; +import com.google.appengine.v1.DeleteAuthorizedCertificateRequest; +import com.google.appengine.v1.GetAuthorizedCertificateRequest; +import com.google.appengine.v1.ListAuthorizedCertificatesRequest; +import com.google.appengine.v1.ListAuthorizedCertificatesResponse; +import com.google.appengine.v1.UpdateAuthorizedCertificateRequest; +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.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 AuthorizedCertificatesStub}. + * + *

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

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

{@code
+ * AuthorizedCertificatesStubSettings.Builder authorizedCertificatesSettingsBuilder =
+ *     AuthorizedCertificatesStubSettings.newBuilder();
+ * authorizedCertificatesSettingsBuilder
+ *     .getAuthorizedCertificateSettings()
+ *     .setRetrySettings(
+ *         authorizedCertificatesSettingsBuilder
+ *             .getAuthorizedCertificateSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AuthorizedCertificatesStubSettings authorizedCertificatesSettings =
+ *     authorizedCertificatesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AuthorizedCertificatesStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/appengine.admin") + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final PagedCallSettings< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + ListAuthorizedCertificatesPagedResponse> + listAuthorizedCertificatesSettings; + private final UnaryCallSettings + getAuthorizedCertificateSettings; + private final UnaryCallSettings + createAuthorizedCertificateSettings; + private final UnaryCallSettings + updateAuthorizedCertificateSettings; + private final UnaryCallSettings + deleteAuthorizedCertificateSettings; + + private static final PagedListDescriptor< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate> + LIST_AUTHORIZED_CERTIFICATES_PAGE_STR_DESC = + new PagedListDescriptor< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAuthorizedCertificatesRequest injectToken( + ListAuthorizedCertificatesRequest payload, String token) { + return ListAuthorizedCertificatesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListAuthorizedCertificatesRequest injectPageSize( + ListAuthorizedCertificatesRequest payload, int pageSize) { + return ListAuthorizedCertificatesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAuthorizedCertificatesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAuthorizedCertificatesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAuthorizedCertificatesResponse payload) { + return payload.getCertificatesList() == null + ? ImmutableList.of() + : payload.getCertificatesList(); + } + }; + + private static final PagedListResponseFactory< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + ListAuthorizedCertificatesPagedResponse> + LIST_AUTHORIZED_CERTIFICATES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + ListAuthorizedCertificatesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListAuthorizedCertificatesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + AuthorizedCertificate> + pageContext = + PageContext.create( + callable, LIST_AUTHORIZED_CERTIFICATES_PAGE_STR_DESC, request, context); + return ListAuthorizedCertificatesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listAuthorizedCertificates. */ + public PagedCallSettings< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + ListAuthorizedCertificatesPagedResponse> + listAuthorizedCertificatesSettings() { + return listAuthorizedCertificatesSettings; + } + + /** Returns the object with the settings used for calls to getAuthorizedCertificate. */ + public UnaryCallSettings + getAuthorizedCertificateSettings() { + return getAuthorizedCertificateSettings; + } + + /** Returns the object with the settings used for calls to createAuthorizedCertificate. */ + public UnaryCallSettings + createAuthorizedCertificateSettings() { + return createAuthorizedCertificateSettings; + } + + /** Returns the object with the settings used for calls to updateAuthorizedCertificate. */ + public UnaryCallSettings + updateAuthorizedCertificateSettings() { + return updateAuthorizedCertificateSettings; + } + + /** Returns the object with the settings used for calls to deleteAuthorizedCertificate. */ + public UnaryCallSettings + deleteAuthorizedCertificateSettings() { + return deleteAuthorizedCertificateSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public AuthorizedCertificatesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAuthorizedCertificatesStub.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 "appengine.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(AuthorizedCertificatesStubSettings.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 AuthorizedCertificatesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listAuthorizedCertificatesSettings = + settingsBuilder.listAuthorizedCertificatesSettings().build(); + getAuthorizedCertificateSettings = settingsBuilder.getAuthorizedCertificateSettings().build(); + createAuthorizedCertificateSettings = + settingsBuilder.createAuthorizedCertificateSettings().build(); + updateAuthorizedCertificateSettings = + settingsBuilder.updateAuthorizedCertificateSettings().build(); + deleteAuthorizedCertificateSettings = + settingsBuilder.deleteAuthorizedCertificateSettings().build(); + } + + /** Builder for AuthorizedCertificatesStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + ListAuthorizedCertificatesPagedResponse> + listAuthorizedCertificatesSettings; + private final UnaryCallSettings.Builder + getAuthorizedCertificateSettings; + private final UnaryCallSettings.Builder< + CreateAuthorizedCertificateRequest, AuthorizedCertificate> + createAuthorizedCertificateSettings; + private final UnaryCallSettings.Builder< + UpdateAuthorizedCertificateRequest, AuthorizedCertificate> + updateAuthorizedCertificateSettings; + private final UnaryCallSettings.Builder + deleteAuthorizedCertificateSettings; + 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); + + listAuthorizedCertificatesSettings = + PagedCallSettings.newBuilder(LIST_AUTHORIZED_CERTIFICATES_PAGE_STR_FACT); + getAuthorizedCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAuthorizedCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAuthorizedCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAuthorizedCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAuthorizedCertificatesSettings, + getAuthorizedCertificateSettings, + createAuthorizedCertificateSettings, + updateAuthorizedCertificateSettings, + deleteAuthorizedCertificateSettings); + initDefaults(this); + } + + protected Builder(AuthorizedCertificatesStubSettings settings) { + super(settings); + + listAuthorizedCertificatesSettings = settings.listAuthorizedCertificatesSettings.toBuilder(); + getAuthorizedCertificateSettings = settings.getAuthorizedCertificateSettings.toBuilder(); + createAuthorizedCertificateSettings = + settings.createAuthorizedCertificateSettings.toBuilder(); + updateAuthorizedCertificateSettings = + settings.updateAuthorizedCertificateSettings.toBuilder(); + deleteAuthorizedCertificateSettings = + settings.deleteAuthorizedCertificateSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAuthorizedCertificatesSettings, + getAuthorizedCertificateSettings, + createAuthorizedCertificateSettings, + updateAuthorizedCertificateSettings, + deleteAuthorizedCertificateSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listAuthorizedCertificatesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getAuthorizedCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createAuthorizedCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateAuthorizedCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteAuthorizedCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + 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 listAuthorizedCertificates. */ + public PagedCallSettings.Builder< + ListAuthorizedCertificatesRequest, + ListAuthorizedCertificatesResponse, + ListAuthorizedCertificatesPagedResponse> + listAuthorizedCertificatesSettings() { + return listAuthorizedCertificatesSettings; + } + + /** Returns the builder for the settings used for calls to getAuthorizedCertificate. */ + public UnaryCallSettings.Builder + getAuthorizedCertificateSettings() { + return getAuthorizedCertificateSettings; + } + + /** Returns the builder for the settings used for calls to createAuthorizedCertificate. */ + public UnaryCallSettings.Builder + createAuthorizedCertificateSettings() { + return createAuthorizedCertificateSettings; + } + + /** Returns the builder for the settings used for calls to updateAuthorizedCertificate. */ + public UnaryCallSettings.Builder + updateAuthorizedCertificateSettings() { + return updateAuthorizedCertificateSettings; + } + + /** Returns the builder for the settings used for calls to deleteAuthorizedCertificate. */ + public UnaryCallSettings.Builder + deleteAuthorizedCertificateSettings() { + return deleteAuthorizedCertificateSettings; + } + + @Override + public AuthorizedCertificatesStubSettings build() throws IOException { + return new AuthorizedCertificatesStubSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStub.java new file mode 100644 index 00000000..439219bc --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStub.java @@ -0,0 +1,49 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.AuthorizedDomainsClient.ListAuthorizedDomainsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.ListAuthorizedDomainsRequest; +import com.google.appengine.v1.ListAuthorizedDomainsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AuthorizedDomains service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class AuthorizedDomainsStub implements BackgroundResource { + + public UnaryCallable + listAuthorizedDomainsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAuthorizedDomainsPagedCallable()"); + } + + public UnaryCallable + listAuthorizedDomainsCallable() { + throw new UnsupportedOperationException("Not implemented: listAuthorizedDomainsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStubSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStubSettings.java new file mode 100644 index 00000000..bbc5229a --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStubSettings.java @@ -0,0 +1,359 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.AuthorizedDomainsClient.ListAuthorizedDomainsPagedResponse; + +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.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.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.appengine.v1.AuthorizedDomain; +import com.google.appengine.v1.ListAuthorizedDomainsRequest; +import com.google.appengine.v1.ListAuthorizedDomainsResponse; +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 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 AuthorizedDomainsStub}. + * + *

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

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

{@code
+ * AuthorizedDomainsStubSettings.Builder authorizedDomainsSettingsBuilder =
+ *     AuthorizedDomainsStubSettings.newBuilder();
+ * authorizedDomainsSettingsBuilder
+ *     .listAuthorizedDomainsSettings()
+ *     .setRetrySettings(
+ *         authorizedDomainsSettingsBuilder
+ *             .listAuthorizedDomainsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AuthorizedDomainsStubSettings authorizedDomainsSettings =
+ *     authorizedDomainsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AuthorizedDomainsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/appengine.admin") + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final PagedCallSettings< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + ListAuthorizedDomainsPagedResponse> + listAuthorizedDomainsSettings; + + private static final PagedListDescriptor< + ListAuthorizedDomainsRequest, ListAuthorizedDomainsResponse, AuthorizedDomain> + LIST_AUTHORIZED_DOMAINS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAuthorizedDomainsRequest, ListAuthorizedDomainsResponse, AuthorizedDomain>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAuthorizedDomainsRequest injectToken( + ListAuthorizedDomainsRequest payload, String token) { + return ListAuthorizedDomainsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAuthorizedDomainsRequest injectPageSize( + ListAuthorizedDomainsRequest payload, int pageSize) { + return ListAuthorizedDomainsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAuthorizedDomainsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAuthorizedDomainsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAuthorizedDomainsResponse payload) { + return payload.getDomainsList() == null + ? ImmutableList.of() + : payload.getDomainsList(); + } + }; + + private static final PagedListResponseFactory< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + ListAuthorizedDomainsPagedResponse> + LIST_AUTHORIZED_DOMAINS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + ListAuthorizedDomainsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAuthorizedDomainsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAuthorizedDomainsRequest, ListAuthorizedDomainsResponse, AuthorizedDomain> + pageContext = + PageContext.create( + callable, LIST_AUTHORIZED_DOMAINS_PAGE_STR_DESC, request, context); + return ListAuthorizedDomainsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listAuthorizedDomains. */ + public PagedCallSettings< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + ListAuthorizedDomainsPagedResponse> + listAuthorizedDomainsSettings() { + return listAuthorizedDomainsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public AuthorizedDomainsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAuthorizedDomainsStub.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 "appengine.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(AuthorizedDomainsStubSettings.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 AuthorizedDomainsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listAuthorizedDomainsSettings = settingsBuilder.listAuthorizedDomainsSettings().build(); + } + + /** Builder for AuthorizedDomainsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + ListAuthorizedDomainsPagedResponse> + listAuthorizedDomainsSettings; + 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); + + listAuthorizedDomainsSettings = + PagedCallSettings.newBuilder(LIST_AUTHORIZED_DOMAINS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listAuthorizedDomainsSettings); + initDefaults(this); + } + + protected Builder(AuthorizedDomainsStubSettings settings) { + super(settings); + + listAuthorizedDomainsSettings = settings.listAuthorizedDomainsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listAuthorizedDomainsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listAuthorizedDomainsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + 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 listAuthorizedDomains. */ + public PagedCallSettings.Builder< + ListAuthorizedDomainsRequest, + ListAuthorizedDomainsResponse, + ListAuthorizedDomainsPagedResponse> + listAuthorizedDomainsSettings() { + return listAuthorizedDomainsSettings; + } + + @Override + public AuthorizedDomainsStubSettings build() throws IOException { + return new AuthorizedDomainsStubSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStub.java new file mode 100644 index 00000000..638416d8 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStub.java @@ -0,0 +1,96 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.DomainMappingsClient.ListDomainMappingsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.CreateDomainMappingRequest; +import com.google.appengine.v1.DeleteDomainMappingRequest; +import com.google.appengine.v1.DomainMapping; +import com.google.appengine.v1.GetDomainMappingRequest; +import com.google.appengine.v1.ListDomainMappingsRequest; +import com.google.appengine.v1.ListDomainMappingsResponse; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.UpdateDomainMappingRequest; +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 DomainMappings service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DomainMappingsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listDomainMappingsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDomainMappingsPagedCallable()"); + } + + public UnaryCallable + listDomainMappingsCallable() { + throw new UnsupportedOperationException("Not implemented: listDomainMappingsCallable()"); + } + + public UnaryCallable getDomainMappingCallable() { + throw new UnsupportedOperationException("Not implemented: getDomainMappingCallable()"); + } + + public OperationCallable + createDomainMappingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDomainMappingOperationCallable()"); + } + + public UnaryCallable createDomainMappingCallable() { + throw new UnsupportedOperationException("Not implemented: createDomainMappingCallable()"); + } + + public OperationCallable + updateDomainMappingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDomainMappingOperationCallable()"); + } + + public UnaryCallable updateDomainMappingCallable() { + throw new UnsupportedOperationException("Not implemented: updateDomainMappingCallable()"); + } + + public OperationCallable + deleteDomainMappingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDomainMappingOperationCallable()"); + } + + public UnaryCallable deleteDomainMappingCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDomainMappingCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStubSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStubSettings.java new file mode 100644 index 00000000..bc094b6f --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStubSettings.java @@ -0,0 +1,605 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.DomainMappingsClient.ListDomainMappingsPagedResponse; + +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.appengine.v1.CreateDomainMappingRequest; +import com.google.appengine.v1.DeleteDomainMappingRequest; +import com.google.appengine.v1.DomainMapping; +import com.google.appengine.v1.GetDomainMappingRequest; +import com.google.appengine.v1.ListDomainMappingsRequest; +import com.google.appengine.v1.ListDomainMappingsResponse; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.UpdateDomainMappingRequest; +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 DomainMappingsStub}. + * + *

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

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

{@code
+ * DomainMappingsStubSettings.Builder domainMappingsSettingsBuilder =
+ *     DomainMappingsStubSettings.newBuilder();
+ * domainMappingsSettingsBuilder
+ *     .getDomainMappingSettings()
+ *     .setRetrySettings(
+ *         domainMappingsSettingsBuilder
+ *             .getDomainMappingSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DomainMappingsStubSettings domainMappingsSettings = domainMappingsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DomainMappingsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/appengine.admin") + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final PagedCallSettings< + ListDomainMappingsRequest, ListDomainMappingsResponse, ListDomainMappingsPagedResponse> + listDomainMappingsSettings; + private final UnaryCallSettings getDomainMappingSettings; + private final UnaryCallSettings + createDomainMappingSettings; + private final OperationCallSettings< + CreateDomainMappingRequest, DomainMapping, OperationMetadataV1> + createDomainMappingOperationSettings; + private final UnaryCallSettings + updateDomainMappingSettings; + private final OperationCallSettings< + UpdateDomainMappingRequest, DomainMapping, OperationMetadataV1> + updateDomainMappingOperationSettings; + private final UnaryCallSettings + deleteDomainMappingSettings; + private final OperationCallSettings + deleteDomainMappingOperationSettings; + + private static final PagedListDescriptor< + ListDomainMappingsRequest, ListDomainMappingsResponse, DomainMapping> + LIST_DOMAIN_MAPPINGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListDomainMappingsRequest, ListDomainMappingsResponse, DomainMapping>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDomainMappingsRequest injectToken( + ListDomainMappingsRequest payload, String token) { + return ListDomainMappingsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDomainMappingsRequest injectPageSize( + ListDomainMappingsRequest payload, int pageSize) { + return ListDomainMappingsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDomainMappingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDomainMappingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDomainMappingsResponse payload) { + return payload.getDomainMappingsList() == null + ? ImmutableList.of() + : payload.getDomainMappingsList(); + } + }; + + private static final PagedListResponseFactory< + ListDomainMappingsRequest, ListDomainMappingsResponse, ListDomainMappingsPagedResponse> + LIST_DOMAIN_MAPPINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDomainMappingsRequest, + ListDomainMappingsResponse, + ListDomainMappingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDomainMappingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_DOMAIN_MAPPINGS_PAGE_STR_DESC, request, context); + return ListDomainMappingsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listDomainMappings. */ + public PagedCallSettings< + ListDomainMappingsRequest, ListDomainMappingsResponse, ListDomainMappingsPagedResponse> + listDomainMappingsSettings() { + return listDomainMappingsSettings; + } + + /** Returns the object with the settings used for calls to getDomainMapping. */ + public UnaryCallSettings getDomainMappingSettings() { + return getDomainMappingSettings; + } + + /** Returns the object with the settings used for calls to createDomainMapping. */ + public UnaryCallSettings createDomainMappingSettings() { + return createDomainMappingSettings; + } + + /** Returns the object with the settings used for calls to createDomainMapping. */ + public OperationCallSettings + createDomainMappingOperationSettings() { + return createDomainMappingOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDomainMapping. */ + public UnaryCallSettings updateDomainMappingSettings() { + return updateDomainMappingSettings; + } + + /** Returns the object with the settings used for calls to updateDomainMapping. */ + public OperationCallSettings + updateDomainMappingOperationSettings() { + return updateDomainMappingOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDomainMapping. */ + public UnaryCallSettings deleteDomainMappingSettings() { + return deleteDomainMappingSettings; + } + + /** Returns the object with the settings used for calls to deleteDomainMapping. */ + public OperationCallSettings + deleteDomainMappingOperationSettings() { + return deleteDomainMappingOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DomainMappingsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDomainMappingsStub.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 "appengine.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(DomainMappingsStubSettings.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 DomainMappingsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listDomainMappingsSettings = settingsBuilder.listDomainMappingsSettings().build(); + getDomainMappingSettings = settingsBuilder.getDomainMappingSettings().build(); + createDomainMappingSettings = settingsBuilder.createDomainMappingSettings().build(); + createDomainMappingOperationSettings = + settingsBuilder.createDomainMappingOperationSettings().build(); + updateDomainMappingSettings = settingsBuilder.updateDomainMappingSettings().build(); + updateDomainMappingOperationSettings = + settingsBuilder.updateDomainMappingOperationSettings().build(); + deleteDomainMappingSettings = settingsBuilder.deleteDomainMappingSettings().build(); + deleteDomainMappingOperationSettings = + settingsBuilder.deleteDomainMappingOperationSettings().build(); + } + + /** Builder for DomainMappingsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListDomainMappingsRequest, ListDomainMappingsResponse, ListDomainMappingsPagedResponse> + listDomainMappingsSettings; + private final UnaryCallSettings.Builder + getDomainMappingSettings; + private final UnaryCallSettings.Builder + createDomainMappingSettings; + private final OperationCallSettings.Builder< + CreateDomainMappingRequest, DomainMapping, OperationMetadataV1> + createDomainMappingOperationSettings; + private final UnaryCallSettings.Builder + updateDomainMappingSettings; + private final OperationCallSettings.Builder< + UpdateDomainMappingRequest, DomainMapping, OperationMetadataV1> + updateDomainMappingOperationSettings; + private final UnaryCallSettings.Builder + deleteDomainMappingSettings; + private final OperationCallSettings.Builder< + DeleteDomainMappingRequest, Empty, OperationMetadataV1> + deleteDomainMappingOperationSettings; + 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); + + listDomainMappingsSettings = PagedCallSettings.newBuilder(LIST_DOMAIN_MAPPINGS_PAGE_STR_FACT); + getDomainMappingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDomainMappingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDomainMappingOperationSettings = OperationCallSettings.newBuilder(); + updateDomainMappingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDomainMappingOperationSettings = OperationCallSettings.newBuilder(); + deleteDomainMappingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDomainMappingOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDomainMappingsSettings, + getDomainMappingSettings, + createDomainMappingSettings, + updateDomainMappingSettings, + deleteDomainMappingSettings); + initDefaults(this); + } + + protected Builder(DomainMappingsStubSettings settings) { + super(settings); + + listDomainMappingsSettings = settings.listDomainMappingsSettings.toBuilder(); + getDomainMappingSettings = settings.getDomainMappingSettings.toBuilder(); + createDomainMappingSettings = settings.createDomainMappingSettings.toBuilder(); + createDomainMappingOperationSettings = + settings.createDomainMappingOperationSettings.toBuilder(); + updateDomainMappingSettings = settings.updateDomainMappingSettings.toBuilder(); + updateDomainMappingOperationSettings = + settings.updateDomainMappingOperationSettings.toBuilder(); + deleteDomainMappingSettings = settings.deleteDomainMappingSettings.toBuilder(); + deleteDomainMappingOperationSettings = + settings.deleteDomainMappingOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDomainMappingsSettings, + getDomainMappingSettings, + createDomainMappingSettings, + updateDomainMappingSettings, + deleteDomainMappingSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listDomainMappingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getDomainMappingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createDomainMappingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateDomainMappingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteDomainMappingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createDomainMappingOperationSettings() + .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(DomainMapping.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadataV1.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 + .updateDomainMappingOperationSettings() + .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(DomainMapping.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadataV1.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 + .deleteDomainMappingOperationSettings() + .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(OperationMetadataV1.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 listDomainMappings. */ + public PagedCallSettings.Builder< + ListDomainMappingsRequest, ListDomainMappingsResponse, ListDomainMappingsPagedResponse> + listDomainMappingsSettings() { + return listDomainMappingsSettings; + } + + /** Returns the builder for the settings used for calls to getDomainMapping. */ + public UnaryCallSettings.Builder + getDomainMappingSettings() { + return getDomainMappingSettings; + } + + /** Returns the builder for the settings used for calls to createDomainMapping. */ + public UnaryCallSettings.Builder + createDomainMappingSettings() { + return createDomainMappingSettings; + } + + /** Returns the builder for the settings used for calls to createDomainMapping. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateDomainMappingRequest, DomainMapping, OperationMetadataV1> + createDomainMappingOperationSettings() { + return createDomainMappingOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDomainMapping. */ + public UnaryCallSettings.Builder + updateDomainMappingSettings() { + return updateDomainMappingSettings; + } + + /** Returns the builder for the settings used for calls to updateDomainMapping. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateDomainMappingRequest, DomainMapping, OperationMetadataV1> + updateDomainMappingOperationSettings() { + return updateDomainMappingOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDomainMapping. */ + public UnaryCallSettings.Builder + deleteDomainMappingSettings() { + return deleteDomainMappingSettings; + } + + /** Returns the builder for the settings used for calls to deleteDomainMapping. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteDomainMappingOperationSettings() { + return deleteDomainMappingOperationSettings; + } + + @Override + public DomainMappingsStubSettings build() throws IOException { + return new DomainMappingsStubSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStub.java new file mode 100644 index 00000000..c1759525 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStub.java @@ -0,0 +1,77 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.FirewallClient.ListIngressRulesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.BatchUpdateIngressRulesRequest; +import com.google.appengine.v1.BatchUpdateIngressRulesResponse; +import com.google.appengine.v1.CreateIngressRuleRequest; +import com.google.appengine.v1.DeleteIngressRuleRequest; +import com.google.appengine.v1.GetIngressRuleRequest; +import com.google.appengine.v1.ListIngressRulesRequest; +import com.google.appengine.v1.ListIngressRulesResponse; +import com.google.appengine.v1.UpdateIngressRuleRequest; +import com.google.appengine.v1.firewall.FirewallRule; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Firewall service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class FirewallStub implements BackgroundResource { + + public UnaryCallable + listIngressRulesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listIngressRulesPagedCallable()"); + } + + public UnaryCallable + listIngressRulesCallable() { + throw new UnsupportedOperationException("Not implemented: listIngressRulesCallable()"); + } + + public UnaryCallable + batchUpdateIngressRulesCallable() { + throw new UnsupportedOperationException("Not implemented: batchUpdateIngressRulesCallable()"); + } + + public UnaryCallable createIngressRuleCallable() { + throw new UnsupportedOperationException("Not implemented: createIngressRuleCallable()"); + } + + public UnaryCallable getIngressRuleCallable() { + throw new UnsupportedOperationException("Not implemented: getIngressRuleCallable()"); + } + + public UnaryCallable updateIngressRuleCallable() { + throw new UnsupportedOperationException("Not implemented: updateIngressRuleCallable()"); + } + + public UnaryCallable deleteIngressRuleCallable() { + throw new UnsupportedOperationException("Not implemented: deleteIngressRuleCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStubSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStubSettings.java new file mode 100644 index 00000000..6c0b0241 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStubSettings.java @@ -0,0 +1,472 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.FirewallClient.ListIngressRulesPagedResponse; + +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.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.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.appengine.v1.BatchUpdateIngressRulesRequest; +import com.google.appengine.v1.BatchUpdateIngressRulesResponse; +import com.google.appengine.v1.CreateIngressRuleRequest; +import com.google.appengine.v1.DeleteIngressRuleRequest; +import com.google.appengine.v1.GetIngressRuleRequest; +import com.google.appengine.v1.ListIngressRulesRequest; +import com.google.appengine.v1.ListIngressRulesResponse; +import com.google.appengine.v1.UpdateIngressRuleRequest; +import com.google.appengine.v1.firewall.FirewallRule; +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.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 FirewallStub}. + * + *

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

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

{@code
+ * FirewallStubSettings.Builder firewallSettingsBuilder = FirewallStubSettings.newBuilder();
+ * firewallSettingsBuilder
+ *     .batchUpdateIngressRulesSettings()
+ *     .setRetrySettings(
+ *         firewallSettingsBuilder
+ *             .batchUpdateIngressRulesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * FirewallStubSettings firewallSettings = firewallSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class FirewallStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/appengine.admin") + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final PagedCallSettings< + ListIngressRulesRequest, ListIngressRulesResponse, ListIngressRulesPagedResponse> + listIngressRulesSettings; + private final UnaryCallSettings + batchUpdateIngressRulesSettings; + private final UnaryCallSettings createIngressRuleSettings; + private final UnaryCallSettings getIngressRuleSettings; + private final UnaryCallSettings updateIngressRuleSettings; + private final UnaryCallSettings deleteIngressRuleSettings; + + private static final PagedListDescriptor< + ListIngressRulesRequest, ListIngressRulesResponse, FirewallRule> + LIST_INGRESS_RULES_PAGE_STR_DESC = + new PagedListDescriptor< + ListIngressRulesRequest, ListIngressRulesResponse, FirewallRule>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListIngressRulesRequest injectToken( + ListIngressRulesRequest payload, String token) { + return ListIngressRulesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListIngressRulesRequest injectPageSize( + ListIngressRulesRequest payload, int pageSize) { + return ListIngressRulesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListIngressRulesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListIngressRulesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListIngressRulesResponse payload) { + return payload.getIngressRulesList() == null + ? ImmutableList.of() + : payload.getIngressRulesList(); + } + }; + + private static final PagedListResponseFactory< + ListIngressRulesRequest, ListIngressRulesResponse, ListIngressRulesPagedResponse> + LIST_INGRESS_RULES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListIngressRulesRequest, ListIngressRulesResponse, ListIngressRulesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListIngressRulesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_INGRESS_RULES_PAGE_STR_DESC, request, context); + return ListIngressRulesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listIngressRules. */ + public PagedCallSettings< + ListIngressRulesRequest, ListIngressRulesResponse, ListIngressRulesPagedResponse> + listIngressRulesSettings() { + return listIngressRulesSettings; + } + + /** Returns the object with the settings used for calls to batchUpdateIngressRules. */ + public UnaryCallSettings + batchUpdateIngressRulesSettings() { + return batchUpdateIngressRulesSettings; + } + + /** Returns the object with the settings used for calls to createIngressRule. */ + public UnaryCallSettings createIngressRuleSettings() { + return createIngressRuleSettings; + } + + /** Returns the object with the settings used for calls to getIngressRule. */ + public UnaryCallSettings getIngressRuleSettings() { + return getIngressRuleSettings; + } + + /** Returns the object with the settings used for calls to updateIngressRule. */ + public UnaryCallSettings updateIngressRuleSettings() { + return updateIngressRuleSettings; + } + + /** Returns the object with the settings used for calls to deleteIngressRule. */ + public UnaryCallSettings deleteIngressRuleSettings() { + return deleteIngressRuleSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public FirewallStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcFirewallStub.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 "appengine.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(FirewallStubSettings.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 FirewallStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listIngressRulesSettings = settingsBuilder.listIngressRulesSettings().build(); + batchUpdateIngressRulesSettings = settingsBuilder.batchUpdateIngressRulesSettings().build(); + createIngressRuleSettings = settingsBuilder.createIngressRuleSettings().build(); + getIngressRuleSettings = settingsBuilder.getIngressRuleSettings().build(); + updateIngressRuleSettings = settingsBuilder.updateIngressRuleSettings().build(); + deleteIngressRuleSettings = settingsBuilder.deleteIngressRuleSettings().build(); + } + + /** Builder for FirewallStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListIngressRulesRequest, ListIngressRulesResponse, ListIngressRulesPagedResponse> + listIngressRulesSettings; + private final UnaryCallSettings.Builder< + BatchUpdateIngressRulesRequest, BatchUpdateIngressRulesResponse> + batchUpdateIngressRulesSettings; + private final UnaryCallSettings.Builder + createIngressRuleSettings; + private final UnaryCallSettings.Builder + getIngressRuleSettings; + private final UnaryCallSettings.Builder + updateIngressRuleSettings; + private final UnaryCallSettings.Builder + deleteIngressRuleSettings; + 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); + + listIngressRulesSettings = PagedCallSettings.newBuilder(LIST_INGRESS_RULES_PAGE_STR_FACT); + batchUpdateIngressRulesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createIngressRuleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIngressRuleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateIngressRuleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteIngressRuleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listIngressRulesSettings, + batchUpdateIngressRulesSettings, + createIngressRuleSettings, + getIngressRuleSettings, + updateIngressRuleSettings, + deleteIngressRuleSettings); + initDefaults(this); + } + + protected Builder(FirewallStubSettings settings) { + super(settings); + + listIngressRulesSettings = settings.listIngressRulesSettings.toBuilder(); + batchUpdateIngressRulesSettings = settings.batchUpdateIngressRulesSettings.toBuilder(); + createIngressRuleSettings = settings.createIngressRuleSettings.toBuilder(); + getIngressRuleSettings = settings.getIngressRuleSettings.toBuilder(); + updateIngressRuleSettings = settings.updateIngressRuleSettings.toBuilder(); + deleteIngressRuleSettings = settings.deleteIngressRuleSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listIngressRulesSettings, + batchUpdateIngressRulesSettings, + createIngressRuleSettings, + getIngressRuleSettings, + updateIngressRuleSettings, + deleteIngressRuleSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listIngressRulesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .batchUpdateIngressRulesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createIngressRuleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getIngressRuleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateIngressRuleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteIngressRuleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + 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 listIngressRules. */ + public PagedCallSettings.Builder< + ListIngressRulesRequest, ListIngressRulesResponse, ListIngressRulesPagedResponse> + listIngressRulesSettings() { + return listIngressRulesSettings; + } + + /** Returns the builder for the settings used for calls to batchUpdateIngressRules. */ + public UnaryCallSettings.Builder< + BatchUpdateIngressRulesRequest, BatchUpdateIngressRulesResponse> + batchUpdateIngressRulesSettings() { + return batchUpdateIngressRulesSettings; + } + + /** Returns the builder for the settings used for calls to createIngressRule. */ + public UnaryCallSettings.Builder + createIngressRuleSettings() { + return createIngressRuleSettings; + } + + /** Returns the builder for the settings used for calls to getIngressRule. */ + public UnaryCallSettings.Builder getIngressRuleSettings() { + return getIngressRuleSettings; + } + + /** Returns the builder for the settings used for calls to updateIngressRule. */ + public UnaryCallSettings.Builder + updateIngressRuleSettings() { + return updateIngressRuleSettings; + } + + /** Returns the builder for the settings used for calls to deleteIngressRule. */ + public UnaryCallSettings.Builder deleteIngressRuleSettings() { + return deleteIngressRuleSettings; + } + + @Override + public FirewallStubSettings build() throws IOException { + return new FirewallStubSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcApplicationsCallableFactory.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcApplicationsCallableFactory.java new file mode 100644 index 00000000..0cd9226c --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcApplicationsCallableFactory.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.appengine.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 Applications service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcApplicationsCallableFactory 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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcApplicationsStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcApplicationsStub.java new file mode 100644 index 00000000..0187a2df --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcApplicationsStub.java @@ -0,0 +1,300 @@ +/* + * 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.appengine.v1.stub; + +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.appengine.v1.Application; +import com.google.appengine.v1.CreateApplicationRequest; +import com.google.appengine.v1.GetApplicationRequest; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.RepairApplicationRequest; +import com.google.appengine.v1.UpdateApplicationRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +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 Applications service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcApplicationsStub extends ApplicationsStub { + private static final MethodDescriptor + getApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Applications/GetApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(GetApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Application.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Applications/CreateApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Applications/UpdateApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + repairApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Applications/RepairApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(RepairApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable getApplicationCallable; + private final UnaryCallable createApplicationCallable; + private final OperationCallable + createApplicationOperationCallable; + private final UnaryCallable updateApplicationCallable; + private final OperationCallable + updateApplicationOperationCallable; + private final UnaryCallable repairApplicationCallable; + private final OperationCallable + repairApplicationOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcApplicationsStub create(ApplicationsStubSettings settings) + throws IOException { + return new GrpcApplicationsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcApplicationsStub create(ClientContext clientContext) throws IOException { + return new GrpcApplicationsStub(ApplicationsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcApplicationsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcApplicationsStub( + ApplicationsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcApplicationsStub, 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 GrpcApplicationsStub(ApplicationsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcApplicationsCallableFactory()); + } + + /** + * Constructs an instance of GrpcApplicationsStub, 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 GrpcApplicationsStub( + ApplicationsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getApplicationMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetApplicationRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createApplicationMethodDescriptor) + .build(); + GrpcCallSettings updateApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateApplicationMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateApplicationRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings repairApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(repairApplicationMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RepairApplicationRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.getApplicationCallable = + callableFactory.createUnaryCallable( + getApplicationTransportSettings, settings.getApplicationSettings(), clientContext); + this.createApplicationCallable = + callableFactory.createUnaryCallable( + createApplicationTransportSettings, + settings.createApplicationSettings(), + clientContext); + this.createApplicationOperationCallable = + callableFactory.createOperationCallable( + createApplicationTransportSettings, + settings.createApplicationOperationSettings(), + clientContext, + operationsStub); + this.updateApplicationCallable = + callableFactory.createUnaryCallable( + updateApplicationTransportSettings, + settings.updateApplicationSettings(), + clientContext); + this.updateApplicationOperationCallable = + callableFactory.createOperationCallable( + updateApplicationTransportSettings, + settings.updateApplicationOperationSettings(), + clientContext, + operationsStub); + this.repairApplicationCallable = + callableFactory.createUnaryCallable( + repairApplicationTransportSettings, + settings.repairApplicationSettings(), + clientContext); + this.repairApplicationOperationCallable = + callableFactory.createOperationCallable( + repairApplicationTransportSettings, + settings.repairApplicationOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getApplicationCallable() { + return getApplicationCallable; + } + + @Override + public UnaryCallable createApplicationCallable() { + return createApplicationCallable; + } + + @Override + public OperationCallable + createApplicationOperationCallable() { + return createApplicationOperationCallable; + } + + @Override + public UnaryCallable updateApplicationCallable() { + return updateApplicationCallable; + } + + @Override + public OperationCallable + updateApplicationOperationCallable() { + return updateApplicationOperationCallable; + } + + @Override + public UnaryCallable repairApplicationCallable() { + return repairApplicationCallable; + } + + @Override + public OperationCallable + repairApplicationOperationCallable() { + return repairApplicationOperationCallable; + } + + @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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedCertificatesCallableFactory.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedCertificatesCallableFactory.java new file mode 100644 index 00000000..033d875f --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedCertificatesCallableFactory.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.appengine.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 AuthorizedCertificates service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcAuthorizedCertificatesCallableFactory 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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedCertificatesStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedCertificatesStub.java new file mode 100644 index 00000000..9ad013ff --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedCertificatesStub.java @@ -0,0 +1,352 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.AuthorizedCertificatesClient.ListAuthorizedCertificatesPagedResponse; + +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.AuthorizedCertificate; +import com.google.appengine.v1.CreateAuthorizedCertificateRequest; +import com.google.appengine.v1.DeleteAuthorizedCertificateRequest; +import com.google.appengine.v1.GetAuthorizedCertificateRequest; +import com.google.appengine.v1.ListAuthorizedCertificatesRequest; +import com.google.appengine.v1.ListAuthorizedCertificatesResponse; +import com.google.appengine.v1.UpdateAuthorizedCertificateRequest; +import com.google.common.collect.ImmutableMap; +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 AuthorizedCertificates service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcAuthorizedCertificatesStub extends AuthorizedCertificatesStub { + private static final MethodDescriptor< + ListAuthorizedCertificatesRequest, ListAuthorizedCertificatesResponse> + listAuthorizedCertificatesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.appengine.v1.AuthorizedCertificates/ListAuthorizedCertificates") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAuthorizedCertificatesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAuthorizedCertificatesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAuthorizedCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.appengine.v1.AuthorizedCertificates/GetAuthorizedCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAuthorizedCertificateRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AuthorizedCertificate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createAuthorizedCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.appengine.v1.AuthorizedCertificates/CreateAuthorizedCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAuthorizedCertificateRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AuthorizedCertificate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAuthorizedCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.appengine.v1.AuthorizedCertificates/UpdateAuthorizedCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAuthorizedCertificateRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AuthorizedCertificate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAuthorizedCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.appengine.v1.AuthorizedCertificates/DeleteAuthorizedCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAuthorizedCertificateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final UnaryCallable + listAuthorizedCertificatesCallable; + private final UnaryCallable< + ListAuthorizedCertificatesRequest, ListAuthorizedCertificatesPagedResponse> + listAuthorizedCertificatesPagedCallable; + private final UnaryCallable + getAuthorizedCertificateCallable; + private final UnaryCallable + createAuthorizedCertificateCallable; + private final UnaryCallable + updateAuthorizedCertificateCallable; + private final UnaryCallable + deleteAuthorizedCertificateCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAuthorizedCertificatesStub create( + AuthorizedCertificatesStubSettings settings) throws IOException { + return new GrpcAuthorizedCertificatesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAuthorizedCertificatesStub create(ClientContext clientContext) + throws IOException { + return new GrpcAuthorizedCertificatesStub( + AuthorizedCertificatesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAuthorizedCertificatesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAuthorizedCertificatesStub( + AuthorizedCertificatesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAuthorizedCertificatesStub, 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 GrpcAuthorizedCertificatesStub( + AuthorizedCertificatesStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcAuthorizedCertificatesCallableFactory()); + } + + /** + * Constructs an instance of GrpcAuthorizedCertificatesStub, 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 GrpcAuthorizedCertificatesStub( + AuthorizedCertificatesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listAuthorizedCertificatesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAuthorizedCertificatesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListAuthorizedCertificatesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getAuthorizedCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAuthorizedCertificateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetAuthorizedCertificateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createAuthorizedCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAuthorizedCertificateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + CreateAuthorizedCertificateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateAuthorizedCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAuthorizedCertificateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + UpdateAuthorizedCertificateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteAuthorizedCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAuthorizedCertificateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + DeleteAuthorizedCertificateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listAuthorizedCertificatesCallable = + callableFactory.createUnaryCallable( + listAuthorizedCertificatesTransportSettings, + settings.listAuthorizedCertificatesSettings(), + clientContext); + this.listAuthorizedCertificatesPagedCallable = + callableFactory.createPagedCallable( + listAuthorizedCertificatesTransportSettings, + settings.listAuthorizedCertificatesSettings(), + clientContext); + this.getAuthorizedCertificateCallable = + callableFactory.createUnaryCallable( + getAuthorizedCertificateTransportSettings, + settings.getAuthorizedCertificateSettings(), + clientContext); + this.createAuthorizedCertificateCallable = + callableFactory.createUnaryCallable( + createAuthorizedCertificateTransportSettings, + settings.createAuthorizedCertificateSettings(), + clientContext); + this.updateAuthorizedCertificateCallable = + callableFactory.createUnaryCallable( + updateAuthorizedCertificateTransportSettings, + settings.updateAuthorizedCertificateSettings(), + clientContext); + this.deleteAuthorizedCertificateCallable = + callableFactory.createUnaryCallable( + deleteAuthorizedCertificateTransportSettings, + settings.deleteAuthorizedCertificateSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listAuthorizedCertificatesCallable() { + return listAuthorizedCertificatesCallable; + } + + @Override + public UnaryCallable + listAuthorizedCertificatesPagedCallable() { + return listAuthorizedCertificatesPagedCallable; + } + + @Override + public UnaryCallable + getAuthorizedCertificateCallable() { + return getAuthorizedCertificateCallable; + } + + @Override + public UnaryCallable + createAuthorizedCertificateCallable() { + return createAuthorizedCertificateCallable; + } + + @Override + public UnaryCallable + updateAuthorizedCertificateCallable() { + return updateAuthorizedCertificateCallable; + } + + @Override + public UnaryCallable + deleteAuthorizedCertificateCallable() { + return deleteAuthorizedCertificateCallable; + } + + @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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedDomainsCallableFactory.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedDomainsCallableFactory.java new file mode 100644 index 00000000..332d765d --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedDomainsCallableFactory.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.appengine.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 AuthorizedDomains service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcAuthorizedDomainsCallableFactory 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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedDomainsStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedDomainsStub.java new file mode 100644 index 00000000..cfa1bd25 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcAuthorizedDomainsStub.java @@ -0,0 +1,183 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.AuthorizedDomainsClient.ListAuthorizedDomainsPagedResponse; + +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.ListAuthorizedDomainsRequest; +import com.google.appengine.v1.ListAuthorizedDomainsResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +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 AuthorizedDomains service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcAuthorizedDomainsStub extends AuthorizedDomainsStub { + private static final MethodDescriptor + listAuthorizedDomainsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.AuthorizedDomains/ListAuthorizedDomains") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAuthorizedDomainsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAuthorizedDomainsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + listAuthorizedDomainsCallable; + private final UnaryCallable + listAuthorizedDomainsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAuthorizedDomainsStub create(AuthorizedDomainsStubSettings settings) + throws IOException { + return new GrpcAuthorizedDomainsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAuthorizedDomainsStub create(ClientContext clientContext) + throws IOException { + return new GrpcAuthorizedDomainsStub( + AuthorizedDomainsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAuthorizedDomainsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAuthorizedDomainsStub( + AuthorizedDomainsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAuthorizedDomainsStub, 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 GrpcAuthorizedDomainsStub( + AuthorizedDomainsStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcAuthorizedDomainsCallableFactory()); + } + + /** + * Constructs an instance of GrpcAuthorizedDomainsStub, 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 GrpcAuthorizedDomainsStub( + AuthorizedDomainsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listAuthorizedDomainsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAuthorizedDomainsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAuthorizedDomainsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.listAuthorizedDomainsCallable = + callableFactory.createUnaryCallable( + listAuthorizedDomainsTransportSettings, + settings.listAuthorizedDomainsSettings(), + clientContext); + this.listAuthorizedDomainsPagedCallable = + callableFactory.createPagedCallable( + listAuthorizedDomainsTransportSettings, + settings.listAuthorizedDomainsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listAuthorizedDomainsCallable() { + return listAuthorizedDomainsCallable; + } + + @Override + public UnaryCallable + listAuthorizedDomainsPagedCallable() { + return listAuthorizedDomainsPagedCallable; + } + + @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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcDomainMappingsCallableFactory.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcDomainMappingsCallableFactory.java new file mode 100644 index 00000000..cdb83a0e --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcDomainMappingsCallableFactory.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.appengine.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 DomainMappings service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDomainMappingsCallableFactory 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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcDomainMappingsStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcDomainMappingsStub.java new file mode 100644 index 00000000..09099d20 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcDomainMappingsStub.java @@ -0,0 +1,367 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.DomainMappingsClient.ListDomainMappingsPagedResponse; + +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.appengine.v1.CreateDomainMappingRequest; +import com.google.appengine.v1.DeleteDomainMappingRequest; +import com.google.appengine.v1.DomainMapping; +import com.google.appengine.v1.GetDomainMappingRequest; +import com.google.appengine.v1.ListDomainMappingsRequest; +import com.google.appengine.v1.ListDomainMappingsResponse; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.UpdateDomainMappingRequest; +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 DomainMappings service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDomainMappingsStub extends DomainMappingsStub { + private static final MethodDescriptor + listDomainMappingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.DomainMappings/ListDomainMappings") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDomainMappingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDomainMappingsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDomainMappingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.DomainMappings/GetDomainMapping") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDomainMappingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DomainMapping.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDomainMappingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.DomainMappings/CreateDomainMapping") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDomainMappingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDomainMappingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.DomainMappings/UpdateDomainMapping") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDomainMappingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDomainMappingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.DomainMappings/DeleteDomainMapping") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDomainMappingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + listDomainMappingsCallable; + private final UnaryCallable + listDomainMappingsPagedCallable; + private final UnaryCallable getDomainMappingCallable; + private final UnaryCallable createDomainMappingCallable; + private final OperationCallable + createDomainMappingOperationCallable; + private final UnaryCallable updateDomainMappingCallable; + private final OperationCallable + updateDomainMappingOperationCallable; + private final UnaryCallable deleteDomainMappingCallable; + private final OperationCallable + deleteDomainMappingOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDomainMappingsStub create(DomainMappingsStubSettings settings) + throws IOException { + return new GrpcDomainMappingsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDomainMappingsStub create(ClientContext clientContext) + throws IOException { + return new GrpcDomainMappingsStub( + DomainMappingsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDomainMappingsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDomainMappingsStub( + DomainMappingsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDomainMappingsStub, 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 GrpcDomainMappingsStub(DomainMappingsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDomainMappingsCallableFactory()); + } + + /** + * Constructs an instance of GrpcDomainMappingsStub, 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 GrpcDomainMappingsStub( + DomainMappingsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listDomainMappingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDomainMappingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDomainMappingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getDomainMappingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDomainMappingMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDomainMappingRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createDomainMappingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDomainMappingMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateDomainMappingRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateDomainMappingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDomainMappingMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateDomainMappingRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteDomainMappingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDomainMappingMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteDomainMappingRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listDomainMappingsCallable = + callableFactory.createUnaryCallable( + listDomainMappingsTransportSettings, + settings.listDomainMappingsSettings(), + clientContext); + this.listDomainMappingsPagedCallable = + callableFactory.createPagedCallable( + listDomainMappingsTransportSettings, + settings.listDomainMappingsSettings(), + clientContext); + this.getDomainMappingCallable = + callableFactory.createUnaryCallable( + getDomainMappingTransportSettings, settings.getDomainMappingSettings(), clientContext); + this.createDomainMappingCallable = + callableFactory.createUnaryCallable( + createDomainMappingTransportSettings, + settings.createDomainMappingSettings(), + clientContext); + this.createDomainMappingOperationCallable = + callableFactory.createOperationCallable( + createDomainMappingTransportSettings, + settings.createDomainMappingOperationSettings(), + clientContext, + operationsStub); + this.updateDomainMappingCallable = + callableFactory.createUnaryCallable( + updateDomainMappingTransportSettings, + settings.updateDomainMappingSettings(), + clientContext); + this.updateDomainMappingOperationCallable = + callableFactory.createOperationCallable( + updateDomainMappingTransportSettings, + settings.updateDomainMappingOperationSettings(), + clientContext, + operationsStub); + this.deleteDomainMappingCallable = + callableFactory.createUnaryCallable( + deleteDomainMappingTransportSettings, + settings.deleteDomainMappingSettings(), + clientContext); + this.deleteDomainMappingOperationCallable = + callableFactory.createOperationCallable( + deleteDomainMappingTransportSettings, + settings.deleteDomainMappingOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listDomainMappingsCallable() { + return listDomainMappingsCallable; + } + + @Override + public UnaryCallable + listDomainMappingsPagedCallable() { + return listDomainMappingsPagedCallable; + } + + @Override + public UnaryCallable getDomainMappingCallable() { + return getDomainMappingCallable; + } + + @Override + public UnaryCallable createDomainMappingCallable() { + return createDomainMappingCallable; + } + + @Override + public OperationCallable + createDomainMappingOperationCallable() { + return createDomainMappingOperationCallable; + } + + @Override + public UnaryCallable updateDomainMappingCallable() { + return updateDomainMappingCallable; + } + + @Override + public OperationCallable + updateDomainMappingOperationCallable() { + return updateDomainMappingOperationCallable; + } + + @Override + public UnaryCallable deleteDomainMappingCallable() { + return deleteDomainMappingCallable; + } + + @Override + public OperationCallable + deleteDomainMappingOperationCallable() { + return deleteDomainMappingOperationCallable; + } + + @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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcFirewallCallableFactory.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcFirewallCallableFactory.java new file mode 100644 index 00000000..71d621f8 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcFirewallCallableFactory.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.appengine.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 Firewall service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcFirewallCallableFactory 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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcFirewallStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcFirewallStub.java new file mode 100644 index 00000000..e2eda2c8 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcFirewallStub.java @@ -0,0 +1,356 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.FirewallClient.ListIngressRulesPagedResponse; + +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.BatchUpdateIngressRulesRequest; +import com.google.appengine.v1.BatchUpdateIngressRulesResponse; +import com.google.appengine.v1.CreateIngressRuleRequest; +import com.google.appengine.v1.DeleteIngressRuleRequest; +import com.google.appengine.v1.GetIngressRuleRequest; +import com.google.appengine.v1.ListIngressRulesRequest; +import com.google.appengine.v1.ListIngressRulesResponse; +import com.google.appengine.v1.UpdateIngressRuleRequest; +import com.google.appengine.v1.firewall.FirewallRule; +import com.google.common.collect.ImmutableMap; +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 Firewall service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcFirewallStub extends FirewallStub { + private static final MethodDescriptor + listIngressRulesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Firewall/ListIngressRules") + .setRequestMarshaller( + ProtoUtils.marshaller(ListIngressRulesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListIngressRulesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + BatchUpdateIngressRulesRequest, BatchUpdateIngressRulesResponse> + batchUpdateIngressRulesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Firewall/BatchUpdateIngressRules") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchUpdateIngressRulesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchUpdateIngressRulesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createIngressRuleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Firewall/CreateIngressRule") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateIngressRuleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FirewallRule.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getIngressRuleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Firewall/GetIngressRule") + .setRequestMarshaller( + ProtoUtils.marshaller(GetIngressRuleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FirewallRule.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateIngressRuleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Firewall/UpdateIngressRule") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateIngressRuleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FirewallRule.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteIngressRuleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Firewall/DeleteIngressRule") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteIngressRuleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final UnaryCallable + listIngressRulesCallable; + private final UnaryCallable + listIngressRulesPagedCallable; + private final UnaryCallable + batchUpdateIngressRulesCallable; + private final UnaryCallable createIngressRuleCallable; + private final UnaryCallable getIngressRuleCallable; + private final UnaryCallable updateIngressRuleCallable; + private final UnaryCallable deleteIngressRuleCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcFirewallStub create(FirewallStubSettings settings) throws IOException { + return new GrpcFirewallStub(settings, ClientContext.create(settings)); + } + + public static final GrpcFirewallStub create(ClientContext clientContext) throws IOException { + return new GrpcFirewallStub(FirewallStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcFirewallStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcFirewallStub( + FirewallStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcFirewallStub, 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 GrpcFirewallStub(FirewallStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcFirewallCallableFactory()); + } + + /** + * Constructs an instance of GrpcFirewallStub, 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 GrpcFirewallStub( + FirewallStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listIngressRulesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listIngressRulesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListIngressRulesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + batchUpdateIngressRulesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(batchUpdateIngressRulesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchUpdateIngressRulesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createIngressRuleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createIngressRuleMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateIngressRuleRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getIngressRuleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIngressRuleMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetIngressRuleRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateIngressRuleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateIngressRuleMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateIngressRuleRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteIngressRuleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteIngressRuleMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteIngressRuleRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listIngressRulesCallable = + callableFactory.createUnaryCallable( + listIngressRulesTransportSettings, settings.listIngressRulesSettings(), clientContext); + this.listIngressRulesPagedCallable = + callableFactory.createPagedCallable( + listIngressRulesTransportSettings, settings.listIngressRulesSettings(), clientContext); + this.batchUpdateIngressRulesCallable = + callableFactory.createUnaryCallable( + batchUpdateIngressRulesTransportSettings, + settings.batchUpdateIngressRulesSettings(), + clientContext); + this.createIngressRuleCallable = + callableFactory.createUnaryCallable( + createIngressRuleTransportSettings, + settings.createIngressRuleSettings(), + clientContext); + this.getIngressRuleCallable = + callableFactory.createUnaryCallable( + getIngressRuleTransportSettings, settings.getIngressRuleSettings(), clientContext); + this.updateIngressRuleCallable = + callableFactory.createUnaryCallable( + updateIngressRuleTransportSettings, + settings.updateIngressRuleSettings(), + clientContext); + this.deleteIngressRuleCallable = + callableFactory.createUnaryCallable( + deleteIngressRuleTransportSettings, + settings.deleteIngressRuleSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listIngressRulesCallable() { + return listIngressRulesCallable; + } + + @Override + public UnaryCallable + listIngressRulesPagedCallable() { + return listIngressRulesPagedCallable; + } + + @Override + public UnaryCallable + batchUpdateIngressRulesCallable() { + return batchUpdateIngressRulesCallable; + } + + @Override + public UnaryCallable createIngressRuleCallable() { + return createIngressRuleCallable; + } + + @Override + public UnaryCallable getIngressRuleCallable() { + return getIngressRuleCallable; + } + + @Override + public UnaryCallable updateIngressRuleCallable() { + return updateIngressRuleCallable; + } + + @Override + public UnaryCallable deleteIngressRuleCallable() { + return deleteIngressRuleCallable; + } + + @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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcInstancesCallableFactory.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcInstancesCallableFactory.java new file mode 100644 index 00000000..156d8a1c --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcInstancesCallableFactory.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.appengine.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 Instances service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcInstancesCallableFactory 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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcInstancesStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcInstancesStub.java new file mode 100644 index 00000000..7761b29c --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcInstancesStub.java @@ -0,0 +1,302 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.InstancesClient.ListInstancesPagedResponse; + +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.appengine.v1.DebugInstanceRequest; +import com.google.appengine.v1.DeleteInstanceRequest; +import com.google.appengine.v1.GetInstanceRequest; +import com.google.appengine.v1.Instance; +import com.google.appengine.v1.ListInstancesRequest; +import com.google.appengine.v1.ListInstancesResponse; +import com.google.appengine.v1.OperationMetadataV1; +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 Instances service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcInstancesStub extends InstancesStub { + private static final MethodDescriptor + listInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Instances/ListInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Instances/GetInstance") + .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Instances/DeleteInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + debugInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Instances/DebugInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(DebugInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable deleteInstanceCallable; + private final OperationCallable + deleteInstanceOperationCallable; + private final UnaryCallable debugInstanceCallable; + private final OperationCallable + debugInstanceOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcInstancesStub create(InstancesStubSettings settings) throws IOException { + return new GrpcInstancesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcInstancesStub create(ClientContext clientContext) throws IOException { + return new GrpcInstancesStub(InstancesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcInstancesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcInstancesStub( + InstancesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcInstancesStub, 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 GrpcInstancesStub(InstancesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcInstancesCallableFactory()); + } + + /** + * Constructs an instance of GrpcInstancesStub, 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 GrpcInstancesStub( + InstancesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListInstancesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings debugInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(debugInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DebugInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.deleteInstanceCallable = + callableFactory.createUnaryCallable( + deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); + this.deleteInstanceOperationCallable = + callableFactory.createOperationCallable( + deleteInstanceTransportSettings, + settings.deleteInstanceOperationSettings(), + clientContext, + operationsStub); + this.debugInstanceCallable = + callableFactory.createUnaryCallable( + debugInstanceTransportSettings, settings.debugInstanceSettings(), clientContext); + this.debugInstanceOperationCallable = + callableFactory.createOperationCallable( + debugInstanceTransportSettings, + settings.debugInstanceOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable deleteInstanceCallable() { + return deleteInstanceCallable; + } + + @Override + public OperationCallable + deleteInstanceOperationCallable() { + return deleteInstanceOperationCallable; + } + + @Override + public UnaryCallable debugInstanceCallable() { + return debugInstanceCallable; + } + + @Override + public OperationCallable + debugInstanceOperationCallable() { + return debugInstanceOperationCallable; + } + + @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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcServicesCallableFactory.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcServicesCallableFactory.java new file mode 100644 index 00000000..a8bcd2a3 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcServicesCallableFactory.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.appengine.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 Services service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcServicesCallableFactory 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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcServicesStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcServicesStub.java new file mode 100644 index 00000000..6dac8486 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcServicesStub.java @@ -0,0 +1,298 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.ServicesClient.ListServicesPagedResponse; + +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.appengine.v1.DeleteServiceRequest; +import com.google.appengine.v1.GetServiceRequest; +import com.google.appengine.v1.ListServicesRequest; +import com.google.appengine.v1.ListServicesResponse; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.Service; +import com.google.appengine.v1.UpdateServiceRequest; +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 Services service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcServicesStub extends ServicesStub { + private static final MethodDescriptor + listServicesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Services/ListServices") + .setRequestMarshaller(ProtoUtils.marshaller(ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListServicesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Services/GetService") + .setRequestMarshaller(ProtoUtils.marshaller(GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Services/UpdateService") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Services/DeleteService") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable updateServiceCallable; + private final OperationCallable + updateServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcServicesStub create(ServicesStubSettings settings) throws IOException { + return new GrpcServicesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcServicesStub create(ClientContext clientContext) throws IOException { + return new GrpcServicesStub(ServicesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcServicesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcServicesStub( + ServicesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcServicesStub, 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 GrpcServicesStub(ServicesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcServicesCallableFactory()); + } + + /** + * Constructs an instance of GrpcServicesStub, 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 GrpcServicesStub( + ServicesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listServicesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListServicesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetServiceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateServiceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateServiceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteServiceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.updateServiceCallable = + callableFactory.createUnaryCallable( + updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); + this.updateServiceOperationCallable = + callableFactory.createOperationCallable( + updateServiceTransportSettings, + settings.updateServiceOperationSettings(), + clientContext, + operationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable updateServiceCallable() { + return updateServiceCallable; + } + + @Override + public OperationCallable + updateServiceOperationCallable() { + return updateServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcVersionsCallableFactory.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcVersionsCallableFactory.java new file mode 100644 index 00000000..bbf37c0d --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcVersionsCallableFactory.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.appengine.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 Versions service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcVersionsCallableFactory 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-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcVersionsStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcVersionsStub.java new file mode 100644 index 00000000..c43d9928 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/GrpcVersionsStub.java @@ -0,0 +1,346 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.VersionsClient.ListVersionsPagedResponse; + +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.appengine.v1.CreateVersionMetadataV1; +import com.google.appengine.v1.CreateVersionRequest; +import com.google.appengine.v1.DeleteVersionRequest; +import com.google.appengine.v1.GetVersionRequest; +import com.google.appengine.v1.ListVersionsRequest; +import com.google.appengine.v1.ListVersionsResponse; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.UpdateVersionRequest; +import com.google.appengine.v1.Version; +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 Versions service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcVersionsStub extends VersionsStub { + private static final MethodDescriptor + listVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Versions/ListVersions") + .setRequestMarshaller(ProtoUtils.marshaller(ListVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListVersionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Versions/GetVersion") + .setRequestMarshaller(ProtoUtils.marshaller(GetVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Version.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Versions/CreateVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Versions/UpdateVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.appengine.v1.Versions/DeleteVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable listVersionsCallable; + private final UnaryCallable + listVersionsPagedCallable; + private final UnaryCallable getVersionCallable; + private final UnaryCallable createVersionCallable; + private final OperationCallable + createVersionOperationCallable; + private final UnaryCallable updateVersionCallable; + private final OperationCallable + updateVersionOperationCallable; + private final UnaryCallable deleteVersionCallable; + private final OperationCallable + deleteVersionOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcVersionsStub create(VersionsStubSettings settings) throws IOException { + return new GrpcVersionsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcVersionsStub create(ClientContext clientContext) throws IOException { + return new GrpcVersionsStub(VersionsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcVersionsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcVersionsStub( + VersionsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcVersionsStub, 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 GrpcVersionsStub(VersionsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcVersionsCallableFactory()); + } + + /** + * Constructs an instance of GrpcVersionsStub, 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 GrpcVersionsStub( + VersionsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listVersionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listVersionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListVersionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getVersionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetVersionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createVersionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateVersionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateVersionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateVersionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteVersionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteVersionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listVersionsCallable = + callableFactory.createUnaryCallable( + listVersionsTransportSettings, settings.listVersionsSettings(), clientContext); + this.listVersionsPagedCallable = + callableFactory.createPagedCallable( + listVersionsTransportSettings, settings.listVersionsSettings(), clientContext); + this.getVersionCallable = + callableFactory.createUnaryCallable( + getVersionTransportSettings, settings.getVersionSettings(), clientContext); + this.createVersionCallable = + callableFactory.createUnaryCallable( + createVersionTransportSettings, settings.createVersionSettings(), clientContext); + this.createVersionOperationCallable = + callableFactory.createOperationCallable( + createVersionTransportSettings, + settings.createVersionOperationSettings(), + clientContext, + operationsStub); + this.updateVersionCallable = + callableFactory.createUnaryCallable( + updateVersionTransportSettings, settings.updateVersionSettings(), clientContext); + this.updateVersionOperationCallable = + callableFactory.createOperationCallable( + updateVersionTransportSettings, + settings.updateVersionOperationSettings(), + clientContext, + operationsStub); + this.deleteVersionCallable = + callableFactory.createUnaryCallable( + deleteVersionTransportSettings, settings.deleteVersionSettings(), clientContext); + this.deleteVersionOperationCallable = + callableFactory.createOperationCallable( + deleteVersionTransportSettings, + settings.deleteVersionOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listVersionsCallable() { + return listVersionsCallable; + } + + @Override + public UnaryCallable listVersionsPagedCallable() { + return listVersionsPagedCallable; + } + + @Override + public UnaryCallable getVersionCallable() { + return getVersionCallable; + } + + @Override + public UnaryCallable createVersionCallable() { + return createVersionCallable; + } + + @Override + public OperationCallable + createVersionOperationCallable() { + return createVersionOperationCallable; + } + + @Override + public UnaryCallable updateVersionCallable() { + return updateVersionCallable; + } + + @Override + public OperationCallable + updateVersionOperationCallable() { + return updateVersionOperationCallable; + } + + @Override + public UnaryCallable deleteVersionCallable() { + return deleteVersionCallable; + } + + @Override + public OperationCallable + deleteVersionOperationCallable() { + return deleteVersionOperationCallable; + } + + @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-appengine-admin/src/main/java/com/google/appengine/v1/stub/InstancesStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/InstancesStub.java new file mode 100644 index 00000000..e17643bb --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/InstancesStub.java @@ -0,0 +1,82 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.InstancesClient.ListInstancesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.DebugInstanceRequest; +import com.google.appengine.v1.DeleteInstanceRequest; +import com.google.appengine.v1.GetInstanceRequest; +import com.google.appengine.v1.Instance; +import com.google.appengine.v1.ListInstancesRequest; +import com.google.appengine.v1.ListInstancesResponse; +import com.google.appengine.v1.OperationMetadataV1; +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 Instances service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class InstancesStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listInstancesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesPagedCallable()"); + } + + public UnaryCallable listInstancesCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); + } + + public UnaryCallable getInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); + } + + public OperationCallable + deleteInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceOperationCallable()"); + } + + public UnaryCallable deleteInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); + } + + public OperationCallable + debugInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: debugInstanceOperationCallable()"); + } + + public UnaryCallable debugInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: debugInstanceCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/InstancesStubSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/InstancesStubSettings.java new file mode 100644 index 00000000..226bfd38 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/InstancesStubSettings.java @@ -0,0 +1,503 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.InstancesClient.ListInstancesPagedResponse; + +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.appengine.v1.DebugInstanceRequest; +import com.google.appengine.v1.DeleteInstanceRequest; +import com.google.appengine.v1.GetInstanceRequest; +import com.google.appengine.v1.Instance; +import com.google.appengine.v1.ListInstancesRequest; +import com.google.appengine.v1.ListInstancesResponse; +import com.google.appengine.v1.OperationMetadataV1; +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 InstancesStub}. + * + *

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

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

{@code
+ * InstancesStubSettings.Builder instancesSettingsBuilder = InstancesStubSettings.newBuilder();
+ * instancesSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         instancesSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * InstancesStubSettings instancesSettings = instancesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class InstancesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/appengine.admin") + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final PagedCallSettings< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings getInstanceSettings; + private final UnaryCallSettings deleteInstanceSettings; + private final OperationCallSettings + deleteInstanceOperationSettings; + private final UnaryCallSettings debugInstanceSettings; + private final OperationCallSettings + debugInstanceOperationSettings; + + private static final PagedListDescriptor + LIST_INSTANCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstancesRequest injectToken(ListInstancesRequest payload, String token) { + return ListInstancesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInstancesRequest injectPageSize(ListInstancesRequest payload, int pageSize) { + return ListInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInstancesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstancesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInstancesResponse payload) { + return payload.getInstancesList() == null + ? ImmutableList.of() + : payload.getInstancesList(); + } + }; + + private static final PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + LIST_INSTANCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInstancesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INSTANCES_PAGE_STR_DESC, request, context); + return ListInstancesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to debugInstance. */ + public UnaryCallSettings debugInstanceSettings() { + return debugInstanceSettings; + } + + /** Returns the object with the settings used for calls to debugInstance. */ + public OperationCallSettings + debugInstanceOperationSettings() { + return debugInstanceOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public InstancesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcInstancesStub.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 "appengine.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(InstancesStubSettings.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 InstancesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listInstancesSettings = settingsBuilder.listInstancesSettings().build(); + getInstanceSettings = settingsBuilder.getInstanceSettings().build(); + deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); + deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); + debugInstanceSettings = settingsBuilder.debugInstanceSettings().build(); + debugInstanceOperationSettings = settingsBuilder.debugInstanceOperationSettings().build(); + } + + /** Builder for InstancesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings.Builder getInstanceSettings; + private final UnaryCallSettings.Builder + deleteInstanceSettings; + private final OperationCallSettings.Builder + deleteInstanceOperationSettings; + private final UnaryCallSettings.Builder debugInstanceSettings; + private final OperationCallSettings.Builder + debugInstanceOperationSettings; + 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); + + listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); + getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); + debugInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + debugInstanceOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listInstancesSettings, + getInstanceSettings, + deleteInstanceSettings, + debugInstanceSettings); + initDefaults(this); + } + + protected Builder(InstancesStubSettings settings) { + super(settings); + + listInstancesSettings = settings.listInstancesSettings.toBuilder(); + getInstanceSettings = settings.getInstanceSettings.toBuilder(); + deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); + deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); + debugInstanceSettings = settings.debugInstanceSettings.toBuilder(); + debugInstanceOperationSettings = settings.debugInstanceOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listInstancesSettings, + getInstanceSettings, + deleteInstanceSettings, + debugInstanceSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .debugInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteInstanceOperationSettings() + .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(OperationMetadataV1.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 + .debugInstanceOperationSettings() + .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(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadataV1.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 listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to debugInstance. */ + public UnaryCallSettings.Builder debugInstanceSettings() { + return debugInstanceSettings; + } + + /** Returns the builder for the settings used for calls to debugInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + debugInstanceOperationSettings() { + return debugInstanceOperationSettings; + } + + @Override + public InstancesStubSettings build() throws IOException { + return new InstancesStubSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ServicesStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ServicesStub.java new file mode 100644 index 00000000..0567462d --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ServicesStub.java @@ -0,0 +1,81 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.ServicesClient.ListServicesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.DeleteServiceRequest; +import com.google.appengine.v1.GetServiceRequest; +import com.google.appengine.v1.ListServicesRequest; +import com.google.appengine.v1.ListServicesResponse; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.Service; +import com.google.appengine.v1.UpdateServiceRequest; +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 Services service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ServicesStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable listServicesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesPagedCallable()"); + } + + public UnaryCallable listServicesCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesCallable()"); + } + + public UnaryCallable getServiceCallable() { + throw new UnsupportedOperationException("Not implemented: getServiceCallable()"); + } + + public OperationCallable + updateServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceOperationCallable()"); + } + + public UnaryCallable updateServiceCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceCallable()"); + } + + public OperationCallable + deleteServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceOperationCallable()"); + } + + public UnaryCallable deleteServiceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ServicesStubSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ServicesStubSettings.java new file mode 100644 index 00000000..2ead7a99 --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ServicesStubSettings.java @@ -0,0 +1,502 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.ServicesClient.ListServicesPagedResponse; + +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.appengine.v1.DeleteServiceRequest; +import com.google.appengine.v1.GetServiceRequest; +import com.google.appengine.v1.ListServicesRequest; +import com.google.appengine.v1.ListServicesResponse; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.Service; +import com.google.appengine.v1.UpdateServiceRequest; +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 ServicesStub}. + * + *

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

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

{@code
+ * ServicesStubSettings.Builder servicesSettingsBuilder = ServicesStubSettings.newBuilder();
+ * servicesSettingsBuilder
+ *     .getServiceSettings()
+ *     .setRetrySettings(
+ *         servicesSettingsBuilder
+ *             .getServiceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ServicesStubSettings servicesSettings = servicesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ServicesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/appengine.admin") + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final PagedCallSettings< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings getServiceSettings; + private final UnaryCallSettings updateServiceSettings; + private final OperationCallSettings + updateServiceOperationSettings; + private final UnaryCallSettings deleteServiceSettings; + private final OperationCallSettings + deleteServiceOperationSettings; + + private static final PagedListDescriptor + LIST_SERVICES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListServicesRequest injectToken(ListServicesRequest payload, String token) { + return ListServicesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListServicesRequest injectPageSize(ListServicesRequest payload, int pageSize) { + return ListServicesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListServicesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListServicesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListServicesResponse payload) { + return payload.getServicesList() == null + ? ImmutableList.of() + : payload.getServicesList(); + } + }; + + private static final PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + LIST_SERVICES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListServicesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SERVICES_PAGE_STR_DESC, request, context); + return ListServicesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return getServiceSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ServicesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcServicesStub.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 "appengine.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(ServicesStubSettings.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 ServicesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listServicesSettings = settingsBuilder.listServicesSettings().build(); + getServiceSettings = settingsBuilder.getServiceSettings().build(); + updateServiceSettings = settingsBuilder.updateServiceSettings().build(); + updateServiceOperationSettings = settingsBuilder.updateServiceOperationSettings().build(); + deleteServiceSettings = settingsBuilder.deleteServiceSettings().build(); + deleteServiceOperationSettings = settingsBuilder.deleteServiceOperationSettings().build(); + } + + /** Builder for ServicesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings.Builder getServiceSettings; + private final UnaryCallSettings.Builder updateServiceSettings; + private final OperationCallSettings.Builder + updateServiceOperationSettings; + private final UnaryCallSettings.Builder deleteServiceSettings; + private final OperationCallSettings.Builder + deleteServiceOperationSettings; + 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); + + listServicesSettings = PagedCallSettings.newBuilder(LIST_SERVICES_PAGE_STR_FACT); + getServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateServiceOperationSettings = OperationCallSettings.newBuilder(); + deleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteServiceOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + updateServiceSettings, + deleteServiceSettings); + initDefaults(this); + } + + protected Builder(ServicesStubSettings settings) { + super(settings); + + listServicesSettings = settings.listServicesSettings.toBuilder(); + getServiceSettings = settings.getServiceSettings.toBuilder(); + updateServiceSettings = settings.updateServiceSettings.toBuilder(); + updateServiceOperationSettings = settings.updateServiceOperationSettings.toBuilder(); + deleteServiceSettings = settings.deleteServiceSettings.toBuilder(); + deleteServiceOperationSettings = settings.deleteServiceOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + updateServiceSettings, + deleteServiceSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listServicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateServiceOperationSettings() + .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(Service.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadataV1.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 + .deleteServiceOperationSettings() + .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(OperationMetadataV1.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 listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getServiceSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + @Override + public ServicesStubSettings build() throws IOException { + return new ServicesStubSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/VersionsStub.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/VersionsStub.java new file mode 100644 index 00000000..63a6a77f --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/VersionsStub.java @@ -0,0 +1,92 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.VersionsClient.ListVersionsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.appengine.v1.CreateVersionMetadataV1; +import com.google.appengine.v1.CreateVersionRequest; +import com.google.appengine.v1.DeleteVersionRequest; +import com.google.appengine.v1.GetVersionRequest; +import com.google.appengine.v1.ListVersionsRequest; +import com.google.appengine.v1.ListVersionsResponse; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.UpdateVersionRequest; +import com.google.appengine.v1.Version; +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 Versions service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class VersionsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable listVersionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listVersionsPagedCallable()"); + } + + public UnaryCallable listVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listVersionsCallable()"); + } + + public UnaryCallable getVersionCallable() { + throw new UnsupportedOperationException("Not implemented: getVersionCallable()"); + } + + public OperationCallable + createVersionOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createVersionOperationCallable()"); + } + + public UnaryCallable createVersionCallable() { + throw new UnsupportedOperationException("Not implemented: createVersionCallable()"); + } + + public OperationCallable + updateVersionOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateVersionOperationCallable()"); + } + + public UnaryCallable updateVersionCallable() { + throw new UnsupportedOperationException("Not implemented: updateVersionCallable()"); + } + + public OperationCallable + deleteVersionOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteVersionOperationCallable()"); + } + + public UnaryCallable deleteVersionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteVersionCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/VersionsStubSettings.java b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/VersionsStubSettings.java new file mode 100644 index 00000000..05f29cca --- /dev/null +++ b/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/VersionsStubSettings.java @@ -0,0 +1,572 @@ +/* + * 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.appengine.v1.stub; + +import static com.google.appengine.v1.VersionsClient.ListVersionsPagedResponse; + +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.appengine.v1.CreateVersionMetadataV1; +import com.google.appengine.v1.CreateVersionRequest; +import com.google.appengine.v1.DeleteVersionRequest; +import com.google.appengine.v1.GetVersionRequest; +import com.google.appengine.v1.ListVersionsRequest; +import com.google.appengine.v1.ListVersionsResponse; +import com.google.appengine.v1.OperationMetadataV1; +import com.google.appengine.v1.UpdateVersionRequest; +import com.google.appengine.v1.Version; +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 VersionsStub}. + * + *

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

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

{@code
+ * VersionsStubSettings.Builder versionsSettingsBuilder = VersionsStubSettings.newBuilder();
+ * versionsSettingsBuilder
+ *     .getVersionSettings()
+ *     .setRetrySettings(
+ *         versionsSettingsBuilder
+ *             .getVersionSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * VersionsStubSettings versionsSettings = versionsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class VersionsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/appengine.admin") + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final PagedCallSettings< + ListVersionsRequest, ListVersionsResponse, ListVersionsPagedResponse> + listVersionsSettings; + private final UnaryCallSettings getVersionSettings; + private final UnaryCallSettings createVersionSettings; + private final OperationCallSettings + createVersionOperationSettings; + private final UnaryCallSettings updateVersionSettings; + private final OperationCallSettings + updateVersionOperationSettings; + private final UnaryCallSettings deleteVersionSettings; + private final OperationCallSettings + deleteVersionOperationSettings; + + private static final PagedListDescriptor + LIST_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListVersionsRequest injectToken(ListVersionsRequest payload, String token) { + return ListVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListVersionsRequest injectPageSize(ListVersionsRequest payload, int pageSize) { + return ListVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListVersionsResponse payload) { + return payload.getVersionsList() == null + ? ImmutableList.of() + : payload.getVersionsList(); + } + }; + + private static final PagedListResponseFactory< + ListVersionsRequest, ListVersionsResponse, ListVersionsPagedResponse> + LIST_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListVersionsRequest, ListVersionsResponse, ListVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_VERSIONS_PAGE_STR_DESC, request, context); + return ListVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listVersions. */ + public PagedCallSettings + listVersionsSettings() { + return listVersionsSettings; + } + + /** Returns the object with the settings used for calls to getVersion. */ + public UnaryCallSettings getVersionSettings() { + return getVersionSettings; + } + + /** Returns the object with the settings used for calls to createVersion. */ + public UnaryCallSettings createVersionSettings() { + return createVersionSettings; + } + + /** Returns the object with the settings used for calls to createVersion. */ + public OperationCallSettings + createVersionOperationSettings() { + return createVersionOperationSettings; + } + + /** Returns the object with the settings used for calls to updateVersion. */ + public UnaryCallSettings updateVersionSettings() { + return updateVersionSettings; + } + + /** Returns the object with the settings used for calls to updateVersion. */ + public OperationCallSettings + updateVersionOperationSettings() { + return updateVersionOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteVersion. */ + public UnaryCallSettings deleteVersionSettings() { + return deleteVersionSettings; + } + + /** Returns the object with the settings used for calls to deleteVersion. */ + public OperationCallSettings + deleteVersionOperationSettings() { + return deleteVersionOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public VersionsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcVersionsStub.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 "appengine.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(VersionsStubSettings.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 VersionsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listVersionsSettings = settingsBuilder.listVersionsSettings().build(); + getVersionSettings = settingsBuilder.getVersionSettings().build(); + createVersionSettings = settingsBuilder.createVersionSettings().build(); + createVersionOperationSettings = settingsBuilder.createVersionOperationSettings().build(); + updateVersionSettings = settingsBuilder.updateVersionSettings().build(); + updateVersionOperationSettings = settingsBuilder.updateVersionOperationSettings().build(); + deleteVersionSettings = settingsBuilder.deleteVersionSettings().build(); + deleteVersionOperationSettings = settingsBuilder.deleteVersionOperationSettings().build(); + } + + /** Builder for VersionsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListVersionsRequest, ListVersionsResponse, ListVersionsPagedResponse> + listVersionsSettings; + private final UnaryCallSettings.Builder getVersionSettings; + private final UnaryCallSettings.Builder createVersionSettings; + private final OperationCallSettings.Builder< + CreateVersionRequest, Version, CreateVersionMetadataV1> + createVersionOperationSettings; + private final UnaryCallSettings.Builder updateVersionSettings; + private final OperationCallSettings.Builder + updateVersionOperationSettings; + private final UnaryCallSettings.Builder deleteVersionSettings; + private final OperationCallSettings.Builder + deleteVersionOperationSettings; + 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); + + listVersionsSettings = PagedCallSettings.newBuilder(LIST_VERSIONS_PAGE_STR_FACT); + getVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createVersionOperationSettings = OperationCallSettings.newBuilder(); + updateVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateVersionOperationSettings = OperationCallSettings.newBuilder(); + deleteVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteVersionOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listVersionsSettings, + getVersionSettings, + createVersionSettings, + updateVersionSettings, + deleteVersionSettings); + initDefaults(this); + } + + protected Builder(VersionsStubSettings settings) { + super(settings); + + listVersionsSettings = settings.listVersionsSettings.toBuilder(); + getVersionSettings = settings.getVersionSettings.toBuilder(); + createVersionSettings = settings.createVersionSettings.toBuilder(); + createVersionOperationSettings = settings.createVersionOperationSettings.toBuilder(); + updateVersionSettings = settings.updateVersionSettings.toBuilder(); + updateVersionOperationSettings = settings.updateVersionOperationSettings.toBuilder(); + deleteVersionSettings = settings.deleteVersionSettings.toBuilder(); + deleteVersionOperationSettings = settings.deleteVersionOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listVersionsSettings, + getVersionSettings, + createVersionSettings, + updateVersionSettings, + deleteVersionSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createVersionOperationSettings() + .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(Version.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(CreateVersionMetadataV1.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 + .updateVersionOperationSettings() + .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(Version.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadataV1.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 + .deleteVersionOperationSettings() + .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(OperationMetadataV1.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 listVersions. */ + public PagedCallSettings.Builder< + ListVersionsRequest, ListVersionsResponse, ListVersionsPagedResponse> + listVersionsSettings() { + return listVersionsSettings; + } + + /** Returns the builder for the settings used for calls to getVersion. */ + public UnaryCallSettings.Builder getVersionSettings() { + return getVersionSettings; + } + + /** Returns the builder for the settings used for calls to createVersion. */ + public UnaryCallSettings.Builder createVersionSettings() { + return createVersionSettings; + } + + /** Returns the builder for the settings used for calls to createVersion. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createVersionOperationSettings() { + return createVersionOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateVersion. */ + public UnaryCallSettings.Builder updateVersionSettings() { + return updateVersionSettings; + } + + /** Returns the builder for the settings used for calls to updateVersion. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateVersionOperationSettings() { + return updateVersionOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteVersion. */ + public UnaryCallSettings.Builder deleteVersionSettings() { + return deleteVersionSettings; + } + + /** Returns the builder for the settings used for calls to deleteVersion. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteVersionOperationSettings() { + return deleteVersionOperationSettings; + } + + @Override + public VersionsStubSettings build() throws IOException { + return new VersionsStubSettings(this); + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/ApplicationsClientTest.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/ApplicationsClientTest.java new file mode 100644 index 00000000..4eb8cb04 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/ApplicationsClientTest.java @@ -0,0 +1,326 @@ +/* + * 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.appengine.v1; + +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.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.protobuf.FieldMask; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +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 ApplicationsClientTest { + private static MockApplications mockApplications; + private static MockServiceHelper mockServiceHelper; + private ApplicationsClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockApplications = new MockApplications(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockApplications)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ApplicationsSettings settings = + ApplicationsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ApplicationsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName("name3373707") + .setId("id3355") + .addAllDispatchRules(new ArrayList()) + .setAuthDomain("authDomain1560526988") + .setLocationId("locationId1541836720") + .setCodeBucket("codeBucket-1407386057") + .setDefaultCookieExpiration(Duration.newBuilder().build()) + .setDefaultHostname("defaultHostname1698284948") + .setDefaultBucket("defaultBucket487561099") + .setIap(Application.IdentityAwareProxy.newBuilder().build()) + .setGcrDomain("gcrDomain-595843206") + .setFeatureSettings(Application.FeatureSettings.newBuilder().build()) + .build(); + mockApplications.addResponse(expectedResponse); + + GetApplicationRequest request = + GetApplicationRequest.newBuilder().setName("name3373707").build(); + + Application actualResponse = client.getApplication(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockApplications.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApplicationRequest actualRequest = ((GetApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockApplications.addException(exception); + + try { + GetApplicationRequest request = + GetApplicationRequest.newBuilder().setName("name3373707").build(); + client.getApplication(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName("name3373707") + .setId("id3355") + .addAllDispatchRules(new ArrayList()) + .setAuthDomain("authDomain1560526988") + .setLocationId("locationId1541836720") + .setCodeBucket("codeBucket-1407386057") + .setDefaultCookieExpiration(Duration.newBuilder().build()) + .setDefaultHostname("defaultHostname1698284948") + .setDefaultBucket("defaultBucket487561099") + .setIap(Application.IdentityAwareProxy.newBuilder().build()) + .setGcrDomain("gcrDomain-595843206") + .setFeatureSettings(Application.FeatureSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockApplications.addResponse(resultOperation); + + CreateApplicationRequest request = + CreateApplicationRequest.newBuilder() + .setApplication(Application.newBuilder().build()) + .build(); + + Application actualResponse = client.createApplicationAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockApplications.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApplicationRequest actualRequest = ((CreateApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getApplication(), actualRequest.getApplication()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockApplications.addException(exception); + + try { + CreateApplicationRequest request = + CreateApplicationRequest.newBuilder() + .setApplication(Application.newBuilder().build()) + .build(); + client.createApplicationAsync(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 updateApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName("name3373707") + .setId("id3355") + .addAllDispatchRules(new ArrayList()) + .setAuthDomain("authDomain1560526988") + .setLocationId("locationId1541836720") + .setCodeBucket("codeBucket-1407386057") + .setDefaultCookieExpiration(Duration.newBuilder().build()) + .setDefaultHostname("defaultHostname1698284948") + .setDefaultBucket("defaultBucket487561099") + .setIap(Application.IdentityAwareProxy.newBuilder().build()) + .setGcrDomain("gcrDomain-595843206") + .setFeatureSettings(Application.FeatureSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockApplications.addResponse(resultOperation); + + UpdateApplicationRequest request = + UpdateApplicationRequest.newBuilder() + .setName("name3373707") + .setApplication(Application.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Application actualResponse = client.updateApplicationAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockApplications.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApplicationRequest actualRequest = ((UpdateApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getApplication(), actualRequest.getApplication()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockApplications.addException(exception); + + try { + UpdateApplicationRequest request = + UpdateApplicationRequest.newBuilder() + .setName("name3373707") + .setApplication(Application.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.updateApplicationAsync(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 repairApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName("name3373707") + .setId("id3355") + .addAllDispatchRules(new ArrayList()) + .setAuthDomain("authDomain1560526988") + .setLocationId("locationId1541836720") + .setCodeBucket("codeBucket-1407386057") + .setDefaultCookieExpiration(Duration.newBuilder().build()) + .setDefaultHostname("defaultHostname1698284948") + .setDefaultBucket("defaultBucket487561099") + .setIap(Application.IdentityAwareProxy.newBuilder().build()) + .setGcrDomain("gcrDomain-595843206") + .setFeatureSettings(Application.FeatureSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("repairApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockApplications.addResponse(resultOperation); + + RepairApplicationRequest request = + RepairApplicationRequest.newBuilder().setName("name3373707").build(); + + Application actualResponse = client.repairApplicationAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockApplications.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RepairApplicationRequest actualRequest = ((RepairApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void repairApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockApplications.addException(exception); + + try { + RepairApplicationRequest request = + RepairApplicationRequest.newBuilder().setName("name3373707").build(); + client.repairApplicationAsync(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/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/AuthorizedCertificatesClientTest.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/AuthorizedCertificatesClientTest.java new file mode 100644 index 00000000..235be6c8 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/AuthorizedCertificatesClientTest.java @@ -0,0 +1,354 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.AuthorizedCertificatesClient.ListAuthorizedCertificatesPagedResponse; + +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.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +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.List; +import java.util.UUID; +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 AuthorizedCertificatesClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockAuthorizedCertificates mockAuthorizedCertificates; + private AuthorizedCertificatesClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockAuthorizedCertificates = new MockAuthorizedCertificates(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockAuthorizedCertificates)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AuthorizedCertificatesSettings settings = + AuthorizedCertificatesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AuthorizedCertificatesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listAuthorizedCertificatesTest() throws Exception { + AuthorizedCertificate responsesElement = AuthorizedCertificate.newBuilder().build(); + ListAuthorizedCertificatesResponse expectedResponse = + ListAuthorizedCertificatesResponse.newBuilder() + .setNextPageToken("") + .addAllCertificates(Arrays.asList(responsesElement)) + .build(); + mockAuthorizedCertificates.addResponse(expectedResponse); + + ListAuthorizedCertificatesRequest request = + ListAuthorizedCertificatesRequest.newBuilder() + .setParent("parent-995424086") + .setView(AuthorizedCertificateView.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListAuthorizedCertificatesPagedResponse pagedListResponse = + client.listAuthorizedCertificates(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCertificatesList().get(0), resources.get(0)); + + List actualRequests = mockAuthorizedCertificates.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAuthorizedCertificatesRequest actualRequest = + ((ListAuthorizedCertificatesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAuthorizedCertificatesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAuthorizedCertificates.addException(exception); + + try { + ListAuthorizedCertificatesRequest request = + ListAuthorizedCertificatesRequest.newBuilder() + .setParent("parent-995424086") + .setView(AuthorizedCertificateView.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listAuthorizedCertificates(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAuthorizedCertificateTest() throws Exception { + AuthorizedCertificate expectedResponse = + AuthorizedCertificate.newBuilder() + .setName("name3373707") + .setId("id3355") + .setDisplayName("displayName1714148973") + .addAllDomainNames(new ArrayList()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCertificateRawData(CertificateRawData.newBuilder().build()) + .setManagedCertificate(ManagedCertificate.newBuilder().build()) + .addAllVisibleDomainMappings(new ArrayList()) + .setDomainMappingsCount(-307278192) + .build(); + mockAuthorizedCertificates.addResponse(expectedResponse); + + GetAuthorizedCertificateRequest request = + GetAuthorizedCertificateRequest.newBuilder() + .setName("name3373707") + .setView(AuthorizedCertificateView.forNumber(0)) + .build(); + + AuthorizedCertificate actualResponse = client.getAuthorizedCertificate(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAuthorizedCertificates.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAuthorizedCertificateRequest actualRequest = + ((GetAuthorizedCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAuthorizedCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAuthorizedCertificates.addException(exception); + + try { + GetAuthorizedCertificateRequest request = + GetAuthorizedCertificateRequest.newBuilder() + .setName("name3373707") + .setView(AuthorizedCertificateView.forNumber(0)) + .build(); + client.getAuthorizedCertificate(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAuthorizedCertificateTest() throws Exception { + AuthorizedCertificate expectedResponse = + AuthorizedCertificate.newBuilder() + .setName("name3373707") + .setId("id3355") + .setDisplayName("displayName1714148973") + .addAllDomainNames(new ArrayList()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCertificateRawData(CertificateRawData.newBuilder().build()) + .setManagedCertificate(ManagedCertificate.newBuilder().build()) + .addAllVisibleDomainMappings(new ArrayList()) + .setDomainMappingsCount(-307278192) + .build(); + mockAuthorizedCertificates.addResponse(expectedResponse); + + CreateAuthorizedCertificateRequest request = + CreateAuthorizedCertificateRequest.newBuilder() + .setParent("parent-995424086") + .setCertificate(AuthorizedCertificate.newBuilder().build()) + .build(); + + AuthorizedCertificate actualResponse = client.createAuthorizedCertificate(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAuthorizedCertificates.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAuthorizedCertificateRequest actualRequest = + ((CreateAuthorizedCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getCertificate(), actualRequest.getCertificate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAuthorizedCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAuthorizedCertificates.addException(exception); + + try { + CreateAuthorizedCertificateRequest request = + CreateAuthorizedCertificateRequest.newBuilder() + .setParent("parent-995424086") + .setCertificate(AuthorizedCertificate.newBuilder().build()) + .build(); + client.createAuthorizedCertificate(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAuthorizedCertificateTest() throws Exception { + AuthorizedCertificate expectedResponse = + AuthorizedCertificate.newBuilder() + .setName("name3373707") + .setId("id3355") + .setDisplayName("displayName1714148973") + .addAllDomainNames(new ArrayList()) + .setExpireTime(Timestamp.newBuilder().build()) + .setCertificateRawData(CertificateRawData.newBuilder().build()) + .setManagedCertificate(ManagedCertificate.newBuilder().build()) + .addAllVisibleDomainMappings(new ArrayList()) + .setDomainMappingsCount(-307278192) + .build(); + mockAuthorizedCertificates.addResponse(expectedResponse); + + UpdateAuthorizedCertificateRequest request = + UpdateAuthorizedCertificateRequest.newBuilder() + .setName("name3373707") + .setCertificate(AuthorizedCertificate.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + AuthorizedCertificate actualResponse = client.updateAuthorizedCertificate(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAuthorizedCertificates.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAuthorizedCertificateRequest actualRequest = + ((UpdateAuthorizedCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getCertificate(), actualRequest.getCertificate()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAuthorizedCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAuthorizedCertificates.addException(exception); + + try { + UpdateAuthorizedCertificateRequest request = + UpdateAuthorizedCertificateRequest.newBuilder() + .setName("name3373707") + .setCertificate(AuthorizedCertificate.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.updateAuthorizedCertificate(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAuthorizedCertificateTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAuthorizedCertificates.addResponse(expectedResponse); + + DeleteAuthorizedCertificateRequest request = + DeleteAuthorizedCertificateRequest.newBuilder().setName("name3373707").build(); + + client.deleteAuthorizedCertificate(request); + + List actualRequests = mockAuthorizedCertificates.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAuthorizedCertificateRequest actualRequest = + ((DeleteAuthorizedCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAuthorizedCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAuthorizedCertificates.addException(exception); + + try { + DeleteAuthorizedCertificateRequest request = + DeleteAuthorizedCertificateRequest.newBuilder().setName("name3373707").build(); + client.deleteAuthorizedCertificate(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/AuthorizedDomainsClientTest.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/AuthorizedDomainsClientTest.java new file mode 100644 index 00000000..27784387 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/AuthorizedDomainsClientTest.java @@ -0,0 +1,137 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.AuthorizedDomainsClient.ListAuthorizedDomainsPagedResponse; + +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.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +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 AuthorizedDomainsClientTest { + private static MockAuthorizedDomains mockAuthorizedDomains; + private static MockServiceHelper mockServiceHelper; + private AuthorizedDomainsClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockAuthorizedDomains = new MockAuthorizedDomains(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAuthorizedDomains)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AuthorizedDomainsSettings settings = + AuthorizedDomainsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AuthorizedDomainsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listAuthorizedDomainsTest() throws Exception { + AuthorizedDomain responsesElement = AuthorizedDomain.newBuilder().build(); + ListAuthorizedDomainsResponse expectedResponse = + ListAuthorizedDomainsResponse.newBuilder() + .setNextPageToken("") + .addAllDomains(Arrays.asList(responsesElement)) + .build(); + mockAuthorizedDomains.addResponse(expectedResponse); + + ListAuthorizedDomainsRequest request = + ListAuthorizedDomainsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListAuthorizedDomainsPagedResponse pagedListResponse = client.listAuthorizedDomains(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDomainsList().get(0), resources.get(0)); + + List actualRequests = mockAuthorizedDomains.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAuthorizedDomainsRequest actualRequest = + ((ListAuthorizedDomainsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAuthorizedDomainsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAuthorizedDomains.addException(exception); + + try { + ListAuthorizedDomainsRequest request = + ListAuthorizedDomainsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listAuthorizedDomains(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/DomainMappingsClientTest.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/DomainMappingsClientTest.java new file mode 100644 index 00000000..227aa325 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/DomainMappingsClientTest.java @@ -0,0 +1,352 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.DomainMappingsClient.ListDomainMappingsPagedResponse; + +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 io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +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 DomainMappingsClientTest { + private static MockServiceHelper mockServiceHelper; + private DomainMappingsClient client; + private static MockDomainMappings mockDomainMappings; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockDomainMappings = new MockDomainMappings(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDomainMappings)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DomainMappingsSettings settings = + DomainMappingsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DomainMappingsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listDomainMappingsTest() throws Exception { + DomainMapping responsesElement = DomainMapping.newBuilder().build(); + ListDomainMappingsResponse expectedResponse = + ListDomainMappingsResponse.newBuilder() + .setNextPageToken("") + .addAllDomainMappings(Arrays.asList(responsesElement)) + .build(); + mockDomainMappings.addResponse(expectedResponse); + + ListDomainMappingsRequest request = + ListDomainMappingsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListDomainMappingsPagedResponse pagedListResponse = client.listDomainMappings(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDomainMappingsList().get(0), resources.get(0)); + + List actualRequests = mockDomainMappings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDomainMappingsRequest actualRequest = ((ListDomainMappingsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDomainMappingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDomainMappings.addException(exception); + + try { + ListDomainMappingsRequest request = + ListDomainMappingsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listDomainMappings(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDomainMappingTest() throws Exception { + DomainMapping expectedResponse = + DomainMapping.newBuilder() + .setName("name3373707") + .setId("id3355") + .setSslSettings(SslSettings.newBuilder().build()) + .addAllResourceRecords(new ArrayList()) + .build(); + mockDomainMappings.addResponse(expectedResponse); + + GetDomainMappingRequest request = + GetDomainMappingRequest.newBuilder().setName("name3373707").build(); + + DomainMapping actualResponse = client.getDomainMapping(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDomainMappings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDomainMappingRequest actualRequest = ((GetDomainMappingRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDomainMappingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDomainMappings.addException(exception); + + try { + GetDomainMappingRequest request = + GetDomainMappingRequest.newBuilder().setName("name3373707").build(); + client.getDomainMapping(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDomainMappingTest() throws Exception { + DomainMapping expectedResponse = + DomainMapping.newBuilder() + .setName("name3373707") + .setId("id3355") + .setSslSettings(SslSettings.newBuilder().build()) + .addAllResourceRecords(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDomainMappingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDomainMappings.addResponse(resultOperation); + + CreateDomainMappingRequest request = + CreateDomainMappingRequest.newBuilder() + .setParent("parent-995424086") + .setDomainMapping(DomainMapping.newBuilder().build()) + .setOverrideStrategy(DomainOverrideStrategy.forNumber(0)) + .build(); + + DomainMapping actualResponse = client.createDomainMappingAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDomainMappings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDomainMappingRequest actualRequest = ((CreateDomainMappingRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getDomainMapping(), actualRequest.getDomainMapping()); + Assert.assertEquals(request.getOverrideStrategy(), actualRequest.getOverrideStrategy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDomainMappingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDomainMappings.addException(exception); + + try { + CreateDomainMappingRequest request = + CreateDomainMappingRequest.newBuilder() + .setParent("parent-995424086") + .setDomainMapping(DomainMapping.newBuilder().build()) + .setOverrideStrategy(DomainOverrideStrategy.forNumber(0)) + .build(); + client.createDomainMappingAsync(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 updateDomainMappingTest() throws Exception { + DomainMapping expectedResponse = + DomainMapping.newBuilder() + .setName("name3373707") + .setId("id3355") + .setSslSettings(SslSettings.newBuilder().build()) + .addAllResourceRecords(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDomainMappingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDomainMappings.addResponse(resultOperation); + + UpdateDomainMappingRequest request = + UpdateDomainMappingRequest.newBuilder() + .setName("name3373707") + .setDomainMapping(DomainMapping.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + DomainMapping actualResponse = client.updateDomainMappingAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDomainMappings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDomainMappingRequest actualRequest = ((UpdateDomainMappingRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getDomainMapping(), actualRequest.getDomainMapping()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDomainMappingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDomainMappings.addException(exception); + + try { + UpdateDomainMappingRequest request = + UpdateDomainMappingRequest.newBuilder() + .setName("name3373707") + .setDomainMapping(DomainMapping.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.updateDomainMappingAsync(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 deleteDomainMappingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDomainMappingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDomainMappings.addResponse(resultOperation); + + DeleteDomainMappingRequest request = + DeleteDomainMappingRequest.newBuilder().setName("name3373707").build(); + + client.deleteDomainMappingAsync(request).get(); + + List actualRequests = mockDomainMappings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDomainMappingRequest actualRequest = ((DeleteDomainMappingRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDomainMappingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDomainMappings.addException(exception); + + try { + DeleteDomainMappingRequest request = + DeleteDomainMappingRequest.newBuilder().setName("name3373707").build(); + client.deleteDomainMappingAsync(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/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/FirewallClientTest.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/FirewallClientTest.java new file mode 100644 index 00000000..777e2725 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/FirewallClientTest.java @@ -0,0 +1,370 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.FirewallClient.ListIngressRulesPagedResponse; + +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.appengine.v1.firewall.FirewallRule; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +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 FirewallClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockFirewall mockFirewall; + private FirewallClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockFirewall = new MockFirewall(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockFirewall)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + FirewallSettings settings = + FirewallSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = FirewallClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listIngressRulesTest() throws Exception { + FirewallRule responsesElement = FirewallRule.newBuilder().build(); + ListIngressRulesResponse expectedResponse = + ListIngressRulesResponse.newBuilder() + .setNextPageToken("") + .addAllIngressRules(Arrays.asList(responsesElement)) + .build(); + mockFirewall.addResponse(expectedResponse); + + ListIngressRulesRequest request = + ListIngressRulesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setMatchingAddress("matchingAddress861962551") + .build(); + + ListIngressRulesPagedResponse pagedListResponse = client.listIngressRules(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIngressRulesList().get(0), resources.get(0)); + + List actualRequests = mockFirewall.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIngressRulesRequest actualRequest = ((ListIngressRulesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getMatchingAddress(), actualRequest.getMatchingAddress()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIngressRulesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirewall.addException(exception); + + try { + ListIngressRulesRequest request = + ListIngressRulesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setMatchingAddress("matchingAddress861962551") + .build(); + client.listIngressRules(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchUpdateIngressRulesTest() throws Exception { + BatchUpdateIngressRulesResponse expectedResponse = + BatchUpdateIngressRulesResponse.newBuilder() + .addAllIngressRules(new ArrayList()) + .build(); + mockFirewall.addResponse(expectedResponse); + + BatchUpdateIngressRulesRequest request = + BatchUpdateIngressRulesRequest.newBuilder() + .setName("name3373707") + .addAllIngressRules(new ArrayList()) + .build(); + + BatchUpdateIngressRulesResponse actualResponse = client.batchUpdateIngressRules(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirewall.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchUpdateIngressRulesRequest actualRequest = + ((BatchUpdateIngressRulesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getIngressRulesList(), actualRequest.getIngressRulesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchUpdateIngressRulesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirewall.addException(exception); + + try { + BatchUpdateIngressRulesRequest request = + BatchUpdateIngressRulesRequest.newBuilder() + .setName("name3373707") + .addAllIngressRules(new ArrayList()) + .build(); + client.batchUpdateIngressRules(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIngressRuleTest() throws Exception { + FirewallRule expectedResponse = + FirewallRule.newBuilder() + .setPriority(-1165461084) + .setSourceRange("sourceRange-97207838") + .setDescription("description-1724546052") + .build(); + mockFirewall.addResponse(expectedResponse); + + CreateIngressRuleRequest request = + CreateIngressRuleRequest.newBuilder() + .setParent("parent-995424086") + .setRule(FirewallRule.newBuilder().build()) + .build(); + + FirewallRule actualResponse = client.createIngressRule(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirewall.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIngressRuleRequest actualRequest = ((CreateIngressRuleRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getRule(), actualRequest.getRule()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIngressRuleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirewall.addException(exception); + + try { + CreateIngressRuleRequest request = + CreateIngressRuleRequest.newBuilder() + .setParent("parent-995424086") + .setRule(FirewallRule.newBuilder().build()) + .build(); + client.createIngressRule(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIngressRuleTest() throws Exception { + FirewallRule expectedResponse = + FirewallRule.newBuilder() + .setPriority(-1165461084) + .setSourceRange("sourceRange-97207838") + .setDescription("description-1724546052") + .build(); + mockFirewall.addResponse(expectedResponse); + + GetIngressRuleRequest request = + GetIngressRuleRequest.newBuilder().setName("name3373707").build(); + + FirewallRule actualResponse = client.getIngressRule(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirewall.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIngressRuleRequest actualRequest = ((GetIngressRuleRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIngressRuleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirewall.addException(exception); + + try { + GetIngressRuleRequest request = + GetIngressRuleRequest.newBuilder().setName("name3373707").build(); + client.getIngressRule(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateIngressRuleTest() throws Exception { + FirewallRule expectedResponse = + FirewallRule.newBuilder() + .setPriority(-1165461084) + .setSourceRange("sourceRange-97207838") + .setDescription("description-1724546052") + .build(); + mockFirewall.addResponse(expectedResponse); + + UpdateIngressRuleRequest request = + UpdateIngressRuleRequest.newBuilder() + .setName("name3373707") + .setRule(FirewallRule.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + FirewallRule actualResponse = client.updateIngressRule(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirewall.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateIngressRuleRequest actualRequest = ((UpdateIngressRuleRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getRule(), actualRequest.getRule()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateIngressRuleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirewall.addException(exception); + + try { + UpdateIngressRuleRequest request = + UpdateIngressRuleRequest.newBuilder() + .setName("name3373707") + .setRule(FirewallRule.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.updateIngressRule(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteIngressRuleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockFirewall.addResponse(expectedResponse); + + DeleteIngressRuleRequest request = + DeleteIngressRuleRequest.newBuilder().setName("name3373707").build(); + + client.deleteIngressRule(request); + + List actualRequests = mockFirewall.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIngressRuleRequest actualRequest = ((DeleteIngressRuleRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteIngressRuleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirewall.addException(exception); + + try { + DeleteIngressRuleRequest request = + DeleteIngressRuleRequest.newBuilder().setName("name3373707").build(); + client.deleteIngressRule(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/InstancesClientTest.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/InstancesClientTest.java new file mode 100644 index 00000000..cad73be2 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/InstancesClientTest.java @@ -0,0 +1,307 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.InstancesClient.ListInstancesPagedResponse; + +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.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +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 InstancesClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockInstances mockInstances; + private InstancesClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockInstances = new MockInstances(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockInstances)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + InstancesSettings settings = + InstancesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = InstancesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockInstances.addResponse(expectedResponse); + + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listInstances(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[APP]", "[SERVICE]", "[VERSION]", "[INSTANCE]").toString()) + .setId("id3355") + .setAppEngineRelease("appEngineRelease-1601369404") + .setVmName("vmName-813643294") + .setVmZoneName("vmZoneName-245094354") + .setVmId("vmId3622450") + .setStartTime(Timestamp.newBuilder().build()) + .setRequests(-393257020) + .setErrors(-1294635157) + .setQps(112180) + .setAverageLatency(1814586588) + .setMemoryUsage(1034557667) + .setVmStatus("vmStatus-66804343") + .setVmDebugEnabled(true) + .setVmIp("vmIp3622462") + .build(); + mockInstances.addResponse(expectedResponse); + + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.getInstance(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + client.getInstance(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteInstanceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder().setName("name3373707").build(); + + client.deleteInstanceAsync(request).get(); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder().setName("name3373707").build(); + client.deleteInstanceAsync(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 debugInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[APP]", "[SERVICE]", "[VERSION]", "[INSTANCE]").toString()) + .setId("id3355") + .setAppEngineRelease("appEngineRelease-1601369404") + .setVmName("vmName-813643294") + .setVmZoneName("vmZoneName-245094354") + .setVmId("vmId3622450") + .setStartTime(Timestamp.newBuilder().build()) + .setRequests(-393257020) + .setErrors(-1294635157) + .setQps(112180) + .setAverageLatency(1814586588) + .setMemoryUsage(1034557667) + .setVmStatus("vmStatus-66804343") + .setVmDebugEnabled(true) + .setVmIp("vmIp3622462") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("debugInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstances.addResponse(resultOperation); + + DebugInstanceRequest request = + DebugInstanceRequest.newBuilder() + .setName("name3373707") + .setSshKey("sshKey-893236425") + .build(); + + Instance actualResponse = client.debugInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstances.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DebugInstanceRequest actualRequest = ((DebugInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getSshKey(), actualRequest.getSshKey()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void debugInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstances.addException(exception); + + try { + DebugInstanceRequest request = + DebugInstanceRequest.newBuilder() + .setName("name3373707") + .setSshKey("sshKey-893236425") + .build(); + client.debugInstanceAsync(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/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockApplications.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockApplications.java new file mode 100644 index 00000000..f79cb634 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockApplications.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.appengine.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 MockApplications implements MockGrpcService { + private final MockApplicationsImpl serviceImpl; + + public MockApplications() { + serviceImpl = new MockApplicationsImpl(); + } + + @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-appengine-admin/src/test/java/com/google/appengine/v1/MockApplicationsImpl.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockApplicationsImpl.java new file mode 100644 index 00000000..afeeb235 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockApplicationsImpl.java @@ -0,0 +1,145 @@ +/* + * 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.appengine.v1; + +import com.google.api.core.BetaApi; +import com.google.appengine.v1.ApplicationsGrpc.ApplicationsImplBase; +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 MockApplicationsImpl extends ApplicationsImplBase { + private List requests; + private Queue responses; + + public MockApplicationsImpl() { + 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 getApplication( + GetApplicationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Application) { + requests.add(request); + responseObserver.onNext(((Application) 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 GetApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Application.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createApplication( + CreateApplicationRequest 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 CreateApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateApplication( + UpdateApplicationRequest 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 UpdateApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void repairApplication( + RepairApplicationRequest 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 RepairApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedCertificates.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedCertificates.java new file mode 100644 index 00000000..7e7956f6 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedCertificates.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.appengine.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 MockAuthorizedCertificates implements MockGrpcService { + private final MockAuthorizedCertificatesImpl serviceImpl; + + public MockAuthorizedCertificates() { + serviceImpl = new MockAuthorizedCertificatesImpl(); + } + + @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-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedCertificatesImpl.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedCertificatesImpl.java new file mode 100644 index 00000000..49403425 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedCertificatesImpl.java @@ -0,0 +1,170 @@ +/* + * 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.appengine.v1; + +import com.google.api.core.BetaApi; +import com.google.appengine.v1.AuthorizedCertificatesGrpc.AuthorizedCertificatesImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +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 MockAuthorizedCertificatesImpl extends AuthorizedCertificatesImplBase { + private List requests; + private Queue responses; + + public MockAuthorizedCertificatesImpl() { + 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 listAuthorizedCertificates( + ListAuthorizedCertificatesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAuthorizedCertificatesResponse) { + requests.add(request); + responseObserver.onNext(((ListAuthorizedCertificatesResponse) 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 ListAuthorizedCertificates, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAuthorizedCertificatesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAuthorizedCertificate( + GetAuthorizedCertificateRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AuthorizedCertificate) { + requests.add(request); + responseObserver.onNext(((AuthorizedCertificate) 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 GetAuthorizedCertificate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AuthorizedCertificate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAuthorizedCertificate( + CreateAuthorizedCertificateRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AuthorizedCertificate) { + requests.add(request); + responseObserver.onNext(((AuthorizedCertificate) 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 CreateAuthorizedCertificate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AuthorizedCertificate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAuthorizedCertificate( + UpdateAuthorizedCertificateRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AuthorizedCertificate) { + requests.add(request); + responseObserver.onNext(((AuthorizedCertificate) 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 UpdateAuthorizedCertificate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AuthorizedCertificate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAuthorizedCertificate( + DeleteAuthorizedCertificateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 DeleteAuthorizedCertificate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedDomains.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedDomains.java new file mode 100644 index 00000000..36fcc992 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedDomains.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.appengine.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 MockAuthorizedDomains implements MockGrpcService { + private final MockAuthorizedDomainsImpl serviceImpl; + + public MockAuthorizedDomains() { + serviceImpl = new MockAuthorizedDomainsImpl(); + } + + @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-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedDomainsImpl.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedDomainsImpl.java new file mode 100644 index 00000000..febbf6cd --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockAuthorizedDomainsImpl.java @@ -0,0 +1,82 @@ +/* + * 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.appengine.v1; + +import com.google.api.core.BetaApi; +import com.google.appengine.v1.AuthorizedDomainsGrpc.AuthorizedDomainsImplBase; +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 MockAuthorizedDomainsImpl extends AuthorizedDomainsImplBase { + private List requests; + private Queue responses; + + public MockAuthorizedDomainsImpl() { + 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 listAuthorizedDomains( + ListAuthorizedDomainsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAuthorizedDomainsResponse) { + requests.add(request); + responseObserver.onNext(((ListAuthorizedDomainsResponse) 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 ListAuthorizedDomains, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAuthorizedDomainsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockDomainMappings.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockDomainMappings.java new file mode 100644 index 00000000..c251c926 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockDomainMappings.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.appengine.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 MockDomainMappings implements MockGrpcService { + private final MockDomainMappingsImpl serviceImpl; + + public MockDomainMappings() { + serviceImpl = new MockDomainMappingsImpl(); + } + + @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-appengine-admin/src/test/java/com/google/appengine/v1/MockDomainMappingsImpl.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockDomainMappingsImpl.java new file mode 100644 index 00000000..3ce3accb --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockDomainMappingsImpl.java @@ -0,0 +1,167 @@ +/* + * 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.appengine.v1; + +import com.google.api.core.BetaApi; +import com.google.appengine.v1.DomainMappingsGrpc.DomainMappingsImplBase; +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 MockDomainMappingsImpl extends DomainMappingsImplBase { + private List requests; + private Queue responses; + + public MockDomainMappingsImpl() { + 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 listDomainMappings( + ListDomainMappingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDomainMappingsResponse) { + requests.add(request); + responseObserver.onNext(((ListDomainMappingsResponse) 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 ListDomainMappings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDomainMappingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDomainMapping( + GetDomainMappingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DomainMapping) { + requests.add(request); + responseObserver.onNext(((DomainMapping) 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 GetDomainMapping, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DomainMapping.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDomainMapping( + CreateDomainMappingRequest 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 CreateDomainMapping, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDomainMapping( + UpdateDomainMappingRequest 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 UpdateDomainMapping, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDomainMapping( + DeleteDomainMappingRequest 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 DeleteDomainMapping, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockFirewall.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockFirewall.java new file mode 100644 index 00000000..8126779f --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockFirewall.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.appengine.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 MockFirewall implements MockGrpcService { + private final MockFirewallImpl serviceImpl; + + public MockFirewall() { + serviceImpl = new MockFirewallImpl(); + } + + @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-appengine-admin/src/test/java/com/google/appengine/v1/MockFirewallImpl.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockFirewallImpl.java new file mode 100644 index 00000000..b085845a --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockFirewallImpl.java @@ -0,0 +1,189 @@ +/* + * 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.appengine.v1; + +import com.google.api.core.BetaApi; +import com.google.appengine.v1.FirewallGrpc.FirewallImplBase; +import com.google.appengine.v1.firewall.FirewallRule; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +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 MockFirewallImpl extends FirewallImplBase { + private List requests; + private Queue responses; + + public MockFirewallImpl() { + 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 listIngressRules( + ListIngressRulesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListIngressRulesResponse) { + requests.add(request); + responseObserver.onNext(((ListIngressRulesResponse) 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 ListIngressRules, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListIngressRulesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchUpdateIngressRules( + BatchUpdateIngressRulesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchUpdateIngressRulesResponse) { + requests.add(request); + responseObserver.onNext(((BatchUpdateIngressRulesResponse) 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 BatchUpdateIngressRules, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchUpdateIngressRulesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createIngressRule( + CreateIngressRuleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FirewallRule) { + requests.add(request); + responseObserver.onNext(((FirewallRule) 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 CreateIngressRule, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FirewallRule.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIngressRule( + GetIngressRuleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FirewallRule) { + requests.add(request); + responseObserver.onNext(((FirewallRule) 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 GetIngressRule, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FirewallRule.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateIngressRule( + UpdateIngressRuleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FirewallRule) { + requests.add(request); + responseObserver.onNext(((FirewallRule) 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 UpdateIngressRule, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FirewallRule.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteIngressRule( + DeleteIngressRuleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 DeleteIngressRule, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockInstances.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockInstances.java new file mode 100644 index 00000000..8f1bf9e8 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockInstances.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.appengine.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 MockInstances implements MockGrpcService { + private final MockInstancesImpl serviceImpl; + + public MockInstances() { + serviceImpl = new MockInstancesImpl(); + } + + @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-appengine-admin/src/test/java/com/google/appengine/v1/MockInstancesImpl.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockInstancesImpl.java new file mode 100644 index 00000000..eb968635 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockInstancesImpl.java @@ -0,0 +1,144 @@ +/* + * 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.appengine.v1; + +import com.google.api.core.BetaApi; +import com.google.appengine.v1.InstancesGrpc.InstancesImplBase; +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 MockInstancesImpl extends InstancesImplBase { + private List requests; + private Queue responses; + + public MockInstancesImpl() { + 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 listInstances( + ListInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstancesResponse) { + requests.add(request); + responseObserver.onNext(((ListInstancesResponse) 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 ListInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstancesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Instance) { + requests.add(request); + responseObserver.onNext(((Instance) 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 GetInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Instance.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInstance( + DeleteInstanceRequest 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 DeleteInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void debugInstance( + DebugInstanceRequest 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 DebugInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockServices.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockServices.java new file mode 100644 index 00000000..a7026cb8 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockServices.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.appengine.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 MockServices implements MockGrpcService { + private final MockServicesImpl serviceImpl; + + public MockServices() { + serviceImpl = new MockServicesImpl(); + } + + @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-appengine-admin/src/test/java/com/google/appengine/v1/MockServicesImpl.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockServicesImpl.java new file mode 100644 index 00000000..01fa664a --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockServicesImpl.java @@ -0,0 +1,144 @@ +/* + * 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.appengine.v1; + +import com.google.api.core.BetaApi; +import com.google.appengine.v1.ServicesGrpc.ServicesImplBase; +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 MockServicesImpl extends ServicesImplBase { + private List requests; + private Queue responses; + + public MockServicesImpl() { + 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 listServices( + ListServicesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListServicesResponse) { + requests.add(request); + responseObserver.onNext(((ListServicesResponse) 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 ListServices, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListServicesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getService(GetServiceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Service) { + requests.add(request); + responseObserver.onNext(((Service) 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 GetService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Service.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateService( + UpdateServiceRequest 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 UpdateService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteService( + DeleteServiceRequest 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 DeleteService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockVersions.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockVersions.java new file mode 100644 index 00000000..aaf96e2d --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockVersions.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.appengine.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 MockVersions implements MockGrpcService { + private final MockVersionsImpl serviceImpl; + + public MockVersions() { + serviceImpl = new MockVersionsImpl(); + } + + @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-appengine-admin/src/test/java/com/google/appengine/v1/MockVersionsImpl.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockVersionsImpl.java new file mode 100644 index 00000000..0cc4f6db --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/MockVersionsImpl.java @@ -0,0 +1,165 @@ +/* + * 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.appengine.v1; + +import com.google.api.core.BetaApi; +import com.google.appengine.v1.VersionsGrpc.VersionsImplBase; +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 MockVersionsImpl extends VersionsImplBase { + private List requests; + private Queue responses; + + public MockVersionsImpl() { + 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 listVersions( + ListVersionsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListVersionsResponse) 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 ListVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getVersion(GetVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Version) { + requests.add(request); + responseObserver.onNext(((Version) 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 GetVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Version.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createVersion( + CreateVersionRequest 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 CreateVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateVersion( + UpdateVersionRequest 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 UpdateVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteVersion( + DeleteVersionRequest 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 DeleteVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/ServicesClientTest.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/ServicesClientTest.java new file mode 100644 index 00000000..389f4695 --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/ServicesClientTest.java @@ -0,0 +1,290 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.ServicesClient.ListServicesPagedResponse; + +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 io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +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 ServicesClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockServices mockServices; + private ServicesClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockServices = new MockServices(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockServices)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ServicesSettings settings = + ServicesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ServicesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listServicesTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockServices.addResponse(expectedResponse); + + ListServicesRequest request = + ListServicesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListServicesPagedResponse pagedListResponse = client.listServices(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServices.addException(exception); + + try { + ListServicesRequest request = + ListServicesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listServices(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName("name3373707") + .setId("id3355") + .setSplit(TrafficSplit.newBuilder().build()) + .setNetworkSettings(NetworkSettings.newBuilder().build()) + .build(); + mockServices.addResponse(expectedResponse); + + GetServiceRequest request = GetServiceRequest.newBuilder().setName("name3373707").build(); + + Service actualResponse = client.getService(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServices.addException(exception); + + try { + GetServiceRequest request = GetServiceRequest.newBuilder().setName("name3373707").build(); + client.getService(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName("name3373707") + .setId("id3355") + .setSplit(TrafficSplit.newBuilder().build()) + .setNetworkSettings(NetworkSettings.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockServices.addResponse(resultOperation); + + UpdateServiceRequest request = + UpdateServiceRequest.newBuilder() + .setName("name3373707") + .setService(Service.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setMigrateTraffic(true) + .build(); + + Service actualResponse = client.updateServiceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateServiceRequest actualRequest = ((UpdateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertEquals(request.getMigrateTraffic(), actualRequest.getMigrateTraffic()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServices.addException(exception); + + try { + UpdateServiceRequest request = + UpdateServiceRequest.newBuilder() + .setName("name3373707") + .setService(Service.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setMigrateTraffic(true) + .build(); + client.updateServiceAsync(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 deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockServices.addResponse(resultOperation); + + DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName("name3373707").build(); + + client.deleteServiceAsync(request).get(); + + List actualRequests = mockServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServices.addException(exception); + + try { + DeleteServiceRequest request = + DeleteServiceRequest.newBuilder().setName("name3373707").build(); + client.deleteServiceAsync(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/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/VersionsClientTest.java b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/VersionsClientTest.java new file mode 100644 index 00000000..cc6601cc --- /dev/null +++ b/google-cloud-appengine-admin/src/test/java/com/google/appengine/v1/VersionsClientTest.java @@ -0,0 +1,457 @@ +/* + * 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.appengine.v1; + +import static com.google.appengine.v1.VersionsClient.ListVersionsPagedResponse; + +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.Duration; +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 VersionsClientTest { + private static MockVersions mockVersions; + private static MockServiceHelper mockServiceHelper; + private VersionsClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockVersions = new MockVersions(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockVersions)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + VersionsSettings settings = + VersionsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = VersionsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listVersionsTest() throws Exception { + Version responsesElement = Version.newBuilder().build(); + ListVersionsResponse expectedResponse = + ListVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllVersions(Arrays.asList(responsesElement)) + .build(); + mockVersions.addResponse(expectedResponse); + + ListVersionsRequest request = + ListVersionsRequest.newBuilder() + .setParent("parent-995424086") + .setView(VersionView.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListVersionsPagedResponse pagedListResponse = client.listVersions(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getVersionsList().get(0), resources.get(0)); + + List actualRequests = mockVersions.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListVersionsRequest actualRequest = ((ListVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVersions.addException(exception); + + try { + ListVersionsRequest request = + ListVersionsRequest.newBuilder() + .setParent("parent-995424086") + .setView(VersionView.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listVersions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getVersionTest() throws Exception { + Version expectedResponse = + Version.newBuilder() + .setName("name3373707") + .setId("id3355") + .addAllInboundServices(new ArrayList()) + .setInstanceClass("instanceClass-1408583197") + .setNetwork(Network.newBuilder().build()) + .addAllZones(new ArrayList()) + .setResources(Resources.newBuilder().build()) + .setRuntime("runtime1550962648") + .setRuntimeChannel("runtimeChannel989413899") + .setThreadsafe(true) + .setVm(true) + .putAllBetaSettings(new HashMap()) + .setEnv("env100589") + .setServingStatus(ServingStatus.forNumber(0)) + .setCreatedBy("createdBy598371679") + .setCreateTime(Timestamp.newBuilder().build()) + .setDiskUsageBytes(1139084459) + .setRuntimeApiVersion("runtimeApiVersion-925808810") + .setRuntimeMainExecutablePath("runtimeMainExecutablePath454707104") + .setServiceAccount("serviceAccount1079137720") + .addAllHandlers(new ArrayList()) + .addAllErrorHandlers(new ArrayList()) + .addAllLibraries(new ArrayList()) + .setApiConfig(ApiConfigHandler.newBuilder().build()) + .putAllEnvVariables(new HashMap()) + .putAllBuildEnvVariables(new HashMap()) + .setDefaultExpiration(Duration.newBuilder().build()) + .setHealthCheck(HealthCheck.newBuilder().build()) + .setReadinessCheck(ReadinessCheck.newBuilder().build()) + .setLivenessCheck(LivenessCheck.newBuilder().build()) + .setNobuildFilesRegex("nobuildFilesRegex1787347261") + .setDeployment(Deployment.newBuilder().build()) + .setVersionUrl("versionUrl-670506633") + .setEndpointsApiService(EndpointsApiService.newBuilder().build()) + .setEntrypoint(Entrypoint.newBuilder().build()) + .setVpcAccessConnector(VpcAccessConnector.newBuilder().build()) + .build(); + mockVersions.addResponse(expectedResponse); + + GetVersionRequest request = + GetVersionRequest.newBuilder() + .setName("name3373707") + .setView(VersionView.forNumber(0)) + .build(); + + Version actualResponse = client.getVersion(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVersions.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetVersionRequest actualRequest = ((GetVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVersions.addException(exception); + + try { + GetVersionRequest request = + GetVersionRequest.newBuilder() + .setName("name3373707") + .setView(VersionView.forNumber(0)) + .build(); + client.getVersion(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createVersionTest() throws Exception { + Version expectedResponse = + Version.newBuilder() + .setName("name3373707") + .setId("id3355") + .addAllInboundServices(new ArrayList()) + .setInstanceClass("instanceClass-1408583197") + .setNetwork(Network.newBuilder().build()) + .addAllZones(new ArrayList()) + .setResources(Resources.newBuilder().build()) + .setRuntime("runtime1550962648") + .setRuntimeChannel("runtimeChannel989413899") + .setThreadsafe(true) + .setVm(true) + .putAllBetaSettings(new HashMap()) + .setEnv("env100589") + .setServingStatus(ServingStatus.forNumber(0)) + .setCreatedBy("createdBy598371679") + .setCreateTime(Timestamp.newBuilder().build()) + .setDiskUsageBytes(1139084459) + .setRuntimeApiVersion("runtimeApiVersion-925808810") + .setRuntimeMainExecutablePath("runtimeMainExecutablePath454707104") + .setServiceAccount("serviceAccount1079137720") + .addAllHandlers(new ArrayList()) + .addAllErrorHandlers(new ArrayList()) + .addAllLibraries(new ArrayList()) + .setApiConfig(ApiConfigHandler.newBuilder().build()) + .putAllEnvVariables(new HashMap()) + .putAllBuildEnvVariables(new HashMap()) + .setDefaultExpiration(Duration.newBuilder().build()) + .setHealthCheck(HealthCheck.newBuilder().build()) + .setReadinessCheck(ReadinessCheck.newBuilder().build()) + .setLivenessCheck(LivenessCheck.newBuilder().build()) + .setNobuildFilesRegex("nobuildFilesRegex1787347261") + .setDeployment(Deployment.newBuilder().build()) + .setVersionUrl("versionUrl-670506633") + .setEndpointsApiService(EndpointsApiService.newBuilder().build()) + .setEntrypoint(Entrypoint.newBuilder().build()) + .setVpcAccessConnector(VpcAccessConnector.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVersions.addResponse(resultOperation); + + CreateVersionRequest request = + CreateVersionRequest.newBuilder() + .setParent("parent-995424086") + .setVersion(Version.newBuilder().build()) + .build(); + + Version actualResponse = client.createVersionAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVersions.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateVersionRequest actualRequest = ((CreateVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getVersion(), actualRequest.getVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVersions.addException(exception); + + try { + CreateVersionRequest request = + CreateVersionRequest.newBuilder() + .setParent("parent-995424086") + .setVersion(Version.newBuilder().build()) + .build(); + client.createVersionAsync(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 updateVersionTest() throws Exception { + Version expectedResponse = + Version.newBuilder() + .setName("name3373707") + .setId("id3355") + .addAllInboundServices(new ArrayList()) + .setInstanceClass("instanceClass-1408583197") + .setNetwork(Network.newBuilder().build()) + .addAllZones(new ArrayList()) + .setResources(Resources.newBuilder().build()) + .setRuntime("runtime1550962648") + .setRuntimeChannel("runtimeChannel989413899") + .setThreadsafe(true) + .setVm(true) + .putAllBetaSettings(new HashMap()) + .setEnv("env100589") + .setServingStatus(ServingStatus.forNumber(0)) + .setCreatedBy("createdBy598371679") + .setCreateTime(Timestamp.newBuilder().build()) + .setDiskUsageBytes(1139084459) + .setRuntimeApiVersion("runtimeApiVersion-925808810") + .setRuntimeMainExecutablePath("runtimeMainExecutablePath454707104") + .setServiceAccount("serviceAccount1079137720") + .addAllHandlers(new ArrayList()) + .addAllErrorHandlers(new ArrayList()) + .addAllLibraries(new ArrayList()) + .setApiConfig(ApiConfigHandler.newBuilder().build()) + .putAllEnvVariables(new HashMap()) + .putAllBuildEnvVariables(new HashMap()) + .setDefaultExpiration(Duration.newBuilder().build()) + .setHealthCheck(HealthCheck.newBuilder().build()) + .setReadinessCheck(ReadinessCheck.newBuilder().build()) + .setLivenessCheck(LivenessCheck.newBuilder().build()) + .setNobuildFilesRegex("nobuildFilesRegex1787347261") + .setDeployment(Deployment.newBuilder().build()) + .setVersionUrl("versionUrl-670506633") + .setEndpointsApiService(EndpointsApiService.newBuilder().build()) + .setEntrypoint(Entrypoint.newBuilder().build()) + .setVpcAccessConnector(VpcAccessConnector.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVersions.addResponse(resultOperation); + + UpdateVersionRequest request = + UpdateVersionRequest.newBuilder() + .setName("name3373707") + .setVersion(Version.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Version actualResponse = client.updateVersionAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVersions.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateVersionRequest actualRequest = ((UpdateVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getVersion(), actualRequest.getVersion()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVersions.addException(exception); + + try { + UpdateVersionRequest request = + UpdateVersionRequest.newBuilder() + .setName("name3373707") + .setVersion(Version.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.updateVersionAsync(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 deleteVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVersions.addResponse(resultOperation); + + DeleteVersionRequest request = DeleteVersionRequest.newBuilder().setName("name3373707").build(); + + client.deleteVersionAsync(request).get(); + + List actualRequests = mockVersions.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteVersionRequest actualRequest = ((DeleteVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVersions.addException(exception); + + try { + DeleteVersionRequest request = + DeleteVersionRequest.newBuilder().setName("name3373707").build(); + client.deleteVersionAsync(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-appengine-admin-v1/pom.xml b/grpc-google-cloud-appengine-admin-v1/pom.xml new file mode 100644 index 00000000..23102b15 --- /dev/null +++ b/grpc-google-cloud-appengine-admin-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-appengine-admin-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-appengine-admin-v1 + GRPC library for google-cloud-appengine-admin + + com.google.cloud + google-cloud-appengine-admin-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-appengine-admin-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-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationsGrpc.java b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationsGrpc.java new file mode 100644 index 00000000..82e1ec9b --- /dev/null +++ b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationsGrpc.java @@ -0,0 +1,752 @@ +/* + * 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.appengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages App Engine applications.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/appengine/v1/appengine.proto") +public final class ApplicationsGrpc { + + private ApplicationsGrpc() {} + + public static final String SERVICE_NAME = "google.appengine.v1.Applications"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.GetApplicationRequest, com.google.appengine.v1.Application> + getGetApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetApplication", + requestType = com.google.appengine.v1.GetApplicationRequest.class, + responseType = com.google.appengine.v1.Application.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.GetApplicationRequest, com.google.appengine.v1.Application> + getGetApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.GetApplicationRequest, com.google.appengine.v1.Application> + getGetApplicationMethod; + if ((getGetApplicationMethod = ApplicationsGrpc.getGetApplicationMethod) == null) { + synchronized (ApplicationsGrpc.class) { + if ((getGetApplicationMethod = ApplicationsGrpc.getGetApplicationMethod) == null) { + ApplicationsGrpc.getGetApplicationMethod = + getGetApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.GetApplicationRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.Application.getDefaultInstance())) + .setSchemaDescriptor( + new ApplicationsMethodDescriptorSupplier("GetApplication")) + .build(); + } + } + } + return getGetApplicationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateApplicationRequest, com.google.longrunning.Operation> + getCreateApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateApplication", + requestType = com.google.appengine.v1.CreateApplicationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateApplicationRequest, com.google.longrunning.Operation> + getCreateApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateApplicationRequest, com.google.longrunning.Operation> + getCreateApplicationMethod; + if ((getCreateApplicationMethod = ApplicationsGrpc.getCreateApplicationMethod) == null) { + synchronized (ApplicationsGrpc.class) { + if ((getCreateApplicationMethod = ApplicationsGrpc.getCreateApplicationMethod) == null) { + ApplicationsGrpc.getCreateApplicationMethod = + getCreateApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.CreateApplicationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ApplicationsMethodDescriptorSupplier("CreateApplication")) + .build(); + } + } + } + return getCreateApplicationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateApplicationRequest, com.google.longrunning.Operation> + getUpdateApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateApplication", + requestType = com.google.appengine.v1.UpdateApplicationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateApplicationRequest, com.google.longrunning.Operation> + getUpdateApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateApplicationRequest, com.google.longrunning.Operation> + getUpdateApplicationMethod; + if ((getUpdateApplicationMethod = ApplicationsGrpc.getUpdateApplicationMethod) == null) { + synchronized (ApplicationsGrpc.class) { + if ((getUpdateApplicationMethod = ApplicationsGrpc.getUpdateApplicationMethod) == null) { + ApplicationsGrpc.getUpdateApplicationMethod = + getUpdateApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.UpdateApplicationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ApplicationsMethodDescriptorSupplier("UpdateApplication")) + .build(); + } + } + } + return getUpdateApplicationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.RepairApplicationRequest, com.google.longrunning.Operation> + getRepairApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RepairApplication", + requestType = com.google.appengine.v1.RepairApplicationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.RepairApplicationRequest, com.google.longrunning.Operation> + getRepairApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.RepairApplicationRequest, com.google.longrunning.Operation> + getRepairApplicationMethod; + if ((getRepairApplicationMethod = ApplicationsGrpc.getRepairApplicationMethod) == null) { + synchronized (ApplicationsGrpc.class) { + if ((getRepairApplicationMethod = ApplicationsGrpc.getRepairApplicationMethod) == null) { + ApplicationsGrpc.getRepairApplicationMethod = + getRepairApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RepairApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.RepairApplicationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ApplicationsMethodDescriptorSupplier("RepairApplication")) + .build(); + } + } + } + return getRepairApplicationMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ApplicationsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ApplicationsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ApplicationsStub(channel, callOptions); + } + }; + return ApplicationsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ApplicationsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ApplicationsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ApplicationsBlockingStub(channel, callOptions); + } + }; + return ApplicationsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ApplicationsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ApplicationsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ApplicationsFutureStub(channel, callOptions); + } + }; + return ApplicationsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages App Engine applications.
+   * 
+ */ + public abstract static class ApplicationsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Gets information about an application.
+     * 
+ */ + public void getApplication( + com.google.appengine.v1.GetApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetApplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an App Engine application for a Google Cloud Platform project.
+     * Required fields:
+     * * `id` - The ID of the target Cloud Platform project.
+     * * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.
+     * For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/).
+     * 
+ */ + public void createApplication( + com.google.appengine.v1.CreateApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateApplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified Application resource.
+     * You can update the following fields:
+     * * `auth_domain` - Google authentication domain for controlling user access to the application.
+     * * `default_cookie_expiration` - Cookie expiration policy for the application.
+     * 
+ */ + public void updateApplication( + com.google.appengine.v1.UpdateApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateApplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Recreates the required App Engine features for the specified App Engine
+     * application, for example a Cloud Storage bucket or App Engine service
+     * account.
+     * Use this method if you receive an error message about a missing feature,
+     * for example, *Error retrieving the App Engine service account*.
+     * If you have deleted your App Engine service account, this will
+     * not be able to recreate it. Instead, you should attempt to use the
+     * IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D .
+     * If the deletion was recent, the numeric ID can be found in the Cloud
+     * Console Activity Log.
+     * 
+ */ + public void repairApplication( + com.google.appengine.v1.RepairApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRepairApplicationMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.GetApplicationRequest, + com.google.appengine.v1.Application>(this, METHODID_GET_APPLICATION))) + .addMethod( + getCreateApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.CreateApplicationRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_APPLICATION))) + .addMethod( + getUpdateApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.UpdateApplicationRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_APPLICATION))) + .addMethod( + getRepairApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.RepairApplicationRequest, + com.google.longrunning.Operation>(this, METHODID_REPAIR_APPLICATION))) + .build(); + } + } + + /** + * + * + *
+   * Manages App Engine applications.
+   * 
+ */ + public static final class ApplicationsStub + extends io.grpc.stub.AbstractAsyncStub { + private ApplicationsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ApplicationsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ApplicationsStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets information about an application.
+     * 
+ */ + public void getApplication( + com.google.appengine.v1.GetApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an App Engine application for a Google Cloud Platform project.
+     * Required fields:
+     * * `id` - The ID of the target Cloud Platform project.
+     * * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.
+     * For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/).
+     * 
+ */ + public void createApplication( + com.google.appengine.v1.CreateApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified Application resource.
+     * You can update the following fields:
+     * * `auth_domain` - Google authentication domain for controlling user access to the application.
+     * * `default_cookie_expiration` - Cookie expiration policy for the application.
+     * 
+ */ + public void updateApplication( + com.google.appengine.v1.UpdateApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Recreates the required App Engine features for the specified App Engine
+     * application, for example a Cloud Storage bucket or App Engine service
+     * account.
+     * Use this method if you receive an error message about a missing feature,
+     * for example, *Error retrieving the App Engine service account*.
+     * If you have deleted your App Engine service account, this will
+     * not be able to recreate it. Instead, you should attempt to use the
+     * IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D .
+     * If the deletion was recent, the numeric ID can be found in the Cloud
+     * Console Activity Log.
+     * 
+ */ + public void repairApplication( + com.google.appengine.v1.RepairApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRepairApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Manages App Engine applications.
+   * 
+ */ + public static final class ApplicationsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ApplicationsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ApplicationsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ApplicationsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets information about an application.
+     * 
+ */ + public com.google.appengine.v1.Application getApplication( + com.google.appengine.v1.GetApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetApplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an App Engine application for a Google Cloud Platform project.
+     * Required fields:
+     * * `id` - The ID of the target Cloud Platform project.
+     * * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.
+     * For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/).
+     * 
+ */ + public com.google.longrunning.Operation createApplication( + com.google.appengine.v1.CreateApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateApplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified Application resource.
+     * You can update the following fields:
+     * * `auth_domain` - Google authentication domain for controlling user access to the application.
+     * * `default_cookie_expiration` - Cookie expiration policy for the application.
+     * 
+ */ + public com.google.longrunning.Operation updateApplication( + com.google.appengine.v1.UpdateApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateApplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Recreates the required App Engine features for the specified App Engine
+     * application, for example a Cloud Storage bucket or App Engine service
+     * account.
+     * Use this method if you receive an error message about a missing feature,
+     * for example, *Error retrieving the App Engine service account*.
+     * If you have deleted your App Engine service account, this will
+     * not be able to recreate it. Instead, you should attempt to use the
+     * IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D .
+     * If the deletion was recent, the numeric ID can be found in the Cloud
+     * Console Activity Log.
+     * 
+ */ + public com.google.longrunning.Operation repairApplication( + com.google.appengine.v1.RepairApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRepairApplicationMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Manages App Engine applications.
+   * 
+ */ + public static final class ApplicationsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ApplicationsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ApplicationsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ApplicationsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets information about an application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getApplication(com.google.appengine.v1.GetApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetApplicationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an App Engine application for a Google Cloud Platform project.
+     * Required fields:
+     * * `id` - The ID of the target Cloud Platform project.
+     * * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.
+     * For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createApplication(com.google.appengine.v1.CreateApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateApplicationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified Application resource.
+     * You can update the following fields:
+     * * `auth_domain` - Google authentication domain for controlling user access to the application.
+     * * `default_cookie_expiration` - Cookie expiration policy for the application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateApplication(com.google.appengine.v1.UpdateApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateApplicationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Recreates the required App Engine features for the specified App Engine
+     * application, for example a Cloud Storage bucket or App Engine service
+     * account.
+     * Use this method if you receive an error message about a missing feature,
+     * for example, *Error retrieving the App Engine service account*.
+     * If you have deleted your App Engine service account, this will
+     * not be able to recreate it. Instead, you should attempt to use the
+     * IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D .
+     * If the deletion was recent, the numeric ID can be found in the Cloud
+     * Console Activity Log.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + repairApplication(com.google.appengine.v1.RepairApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRepairApplicationMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_APPLICATION = 0; + private static final int METHODID_CREATE_APPLICATION = 1; + private static final int METHODID_UPDATE_APPLICATION = 2; + private static final int METHODID_REPAIR_APPLICATION = 3; + + 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 ApplicationsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ApplicationsImplBase 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_GET_APPLICATION: + serviceImpl.getApplication( + (com.google.appengine.v1.GetApplicationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_APPLICATION: + serviceImpl.createApplication( + (com.google.appengine.v1.CreateApplicationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_APPLICATION: + serviceImpl.updateApplication( + (com.google.appengine.v1.UpdateApplicationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REPAIR_APPLICATION: + serviceImpl.repairApplication( + (com.google.appengine.v1.RepairApplicationRequest) 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 ApplicationsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ApplicationsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.appengine.v1.AppengineProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Applications"); + } + } + + private static final class ApplicationsFileDescriptorSupplier + extends ApplicationsBaseDescriptorSupplier { + ApplicationsFileDescriptorSupplier() {} + } + + private static final class ApplicationsMethodDescriptorSupplier + extends ApplicationsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ApplicationsMethodDescriptorSupplier(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 (ApplicationsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ApplicationsFileDescriptorSupplier()) + .addMethod(getGetApplicationMethod()) + .addMethod(getCreateApplicationMethod()) + .addMethod(getUpdateApplicationMethod()) + .addMethod(getRepairApplicationMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificatesGrpc.java b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificatesGrpc.java new file mode 100644 index 00000000..3d394a72 --- /dev/null +++ b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificatesGrpc.java @@ -0,0 +1,893 @@ +/* + * 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.appengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages SSL certificates a user is authorized to administer. A user can
+ * administer any SSL certificates applicable to their authorized domains.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/appengine/v1/appengine.proto") +public final class AuthorizedCertificatesGrpc { + + private AuthorizedCertificatesGrpc() {} + + public static final String SERVICE_NAME = "google.appengine.v1.AuthorizedCertificates"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.ListAuthorizedCertificatesRequest, + com.google.appengine.v1.ListAuthorizedCertificatesResponse> + getListAuthorizedCertificatesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAuthorizedCertificates", + requestType = com.google.appengine.v1.ListAuthorizedCertificatesRequest.class, + responseType = com.google.appengine.v1.ListAuthorizedCertificatesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.ListAuthorizedCertificatesRequest, + com.google.appengine.v1.ListAuthorizedCertificatesResponse> + getListAuthorizedCertificatesMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.ListAuthorizedCertificatesRequest, + com.google.appengine.v1.ListAuthorizedCertificatesResponse> + getListAuthorizedCertificatesMethod; + if ((getListAuthorizedCertificatesMethod = + AuthorizedCertificatesGrpc.getListAuthorizedCertificatesMethod) + == null) { + synchronized (AuthorizedCertificatesGrpc.class) { + if ((getListAuthorizedCertificatesMethod = + AuthorizedCertificatesGrpc.getListAuthorizedCertificatesMethod) + == null) { + AuthorizedCertificatesGrpc.getListAuthorizedCertificatesMethod = + getListAuthorizedCertificatesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAuthorizedCertificates")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListAuthorizedCertificatesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListAuthorizedCertificatesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AuthorizedCertificatesMethodDescriptorSupplier( + "ListAuthorizedCertificates")) + .build(); + } + } + } + return getListAuthorizedCertificatesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.GetAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate> + getGetAuthorizedCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAuthorizedCertificate", + requestType = com.google.appengine.v1.GetAuthorizedCertificateRequest.class, + responseType = com.google.appengine.v1.AuthorizedCertificate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.GetAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate> + getGetAuthorizedCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.GetAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate> + getGetAuthorizedCertificateMethod; + if ((getGetAuthorizedCertificateMethod = + AuthorizedCertificatesGrpc.getGetAuthorizedCertificateMethod) + == null) { + synchronized (AuthorizedCertificatesGrpc.class) { + if ((getGetAuthorizedCertificateMethod = + AuthorizedCertificatesGrpc.getGetAuthorizedCertificateMethod) + == null) { + AuthorizedCertificatesGrpc.getGetAuthorizedCertificateMethod = + getGetAuthorizedCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAuthorizedCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.GetAuthorizedCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance())) + .setSchemaDescriptor( + new AuthorizedCertificatesMethodDescriptorSupplier( + "GetAuthorizedCertificate")) + .build(); + } + } + } + return getGetAuthorizedCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate> + getCreateAuthorizedCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAuthorizedCertificate", + requestType = com.google.appengine.v1.CreateAuthorizedCertificateRequest.class, + responseType = com.google.appengine.v1.AuthorizedCertificate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate> + getCreateAuthorizedCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate> + getCreateAuthorizedCertificateMethod; + if ((getCreateAuthorizedCertificateMethod = + AuthorizedCertificatesGrpc.getCreateAuthorizedCertificateMethod) + == null) { + synchronized (AuthorizedCertificatesGrpc.class) { + if ((getCreateAuthorizedCertificateMethod = + AuthorizedCertificatesGrpc.getCreateAuthorizedCertificateMethod) + == null) { + AuthorizedCertificatesGrpc.getCreateAuthorizedCertificateMethod = + getCreateAuthorizedCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateAuthorizedCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.CreateAuthorizedCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance())) + .setSchemaDescriptor( + new AuthorizedCertificatesMethodDescriptorSupplier( + "CreateAuthorizedCertificate")) + .build(); + } + } + } + return getCreateAuthorizedCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate> + getUpdateAuthorizedCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAuthorizedCertificate", + requestType = com.google.appengine.v1.UpdateAuthorizedCertificateRequest.class, + responseType = com.google.appengine.v1.AuthorizedCertificate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate> + getUpdateAuthorizedCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate> + getUpdateAuthorizedCertificateMethod; + if ((getUpdateAuthorizedCertificateMethod = + AuthorizedCertificatesGrpc.getUpdateAuthorizedCertificateMethod) + == null) { + synchronized (AuthorizedCertificatesGrpc.class) { + if ((getUpdateAuthorizedCertificateMethod = + AuthorizedCertificatesGrpc.getUpdateAuthorizedCertificateMethod) + == null) { + AuthorizedCertificatesGrpc.getUpdateAuthorizedCertificateMethod = + getUpdateAuthorizedCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateAuthorizedCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.UpdateAuthorizedCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance())) + .setSchemaDescriptor( + new AuthorizedCertificatesMethodDescriptorSupplier( + "UpdateAuthorizedCertificate")) + .build(); + } + } + } + return getUpdateAuthorizedCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteAuthorizedCertificateRequest, com.google.protobuf.Empty> + getDeleteAuthorizedCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAuthorizedCertificate", + requestType = com.google.appengine.v1.DeleteAuthorizedCertificateRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteAuthorizedCertificateRequest, com.google.protobuf.Empty> + getDeleteAuthorizedCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteAuthorizedCertificateRequest, com.google.protobuf.Empty> + getDeleteAuthorizedCertificateMethod; + if ((getDeleteAuthorizedCertificateMethod = + AuthorizedCertificatesGrpc.getDeleteAuthorizedCertificateMethod) + == null) { + synchronized (AuthorizedCertificatesGrpc.class) { + if ((getDeleteAuthorizedCertificateMethod = + AuthorizedCertificatesGrpc.getDeleteAuthorizedCertificateMethod) + == null) { + AuthorizedCertificatesGrpc.getDeleteAuthorizedCertificateMethod = + getDeleteAuthorizedCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteAuthorizedCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.DeleteAuthorizedCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AuthorizedCertificatesMethodDescriptorSupplier( + "DeleteAuthorizedCertificate")) + .build(); + } + } + } + return getDeleteAuthorizedCertificateMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AuthorizedCertificatesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AuthorizedCertificatesStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedCertificatesStub(channel, callOptions); + } + }; + return AuthorizedCertificatesStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AuthorizedCertificatesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AuthorizedCertificatesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedCertificatesBlockingStub(channel, callOptions); + } + }; + return AuthorizedCertificatesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AuthorizedCertificatesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AuthorizedCertificatesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedCertificatesFutureStub(channel, callOptions); + } + }; + return AuthorizedCertificatesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages SSL certificates a user is authorized to administer. A user can
+   * administer any SSL certificates applicable to their authorized domains.
+   * 
+ */ + public abstract static class AuthorizedCertificatesImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists all SSL certificates the user is authorized to administer.
+     * 
+ */ + public void listAuthorizedCertificates( + com.google.appengine.v1.ListAuthorizedCertificatesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAuthorizedCertificatesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the specified SSL certificate.
+     * 
+ */ + public void getAuthorizedCertificate( + com.google.appengine.v1.GetAuthorizedCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAuthorizedCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Uploads the specified SSL certificate.
+     * 
+ */ + public void createAuthorizedCertificate( + com.google.appengine.v1.CreateAuthorizedCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAuthorizedCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified SSL certificate. To renew a certificate and maintain
+     * its existing domain mappings, update `certificate_data` with a new
+     * certificate. The new certificate must be applicable to the same domains as
+     * the original certificate. The certificate `display_name` may also be
+     * updated.
+     * 
+ */ + public void updateAuthorizedCertificate( + com.google.appengine.v1.UpdateAuthorizedCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAuthorizedCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified SSL certificate.
+     * 
+ */ + public void deleteAuthorizedCertificate( + com.google.appengine.v1.DeleteAuthorizedCertificateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAuthorizedCertificateMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListAuthorizedCertificatesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.ListAuthorizedCertificatesRequest, + com.google.appengine.v1.ListAuthorizedCertificatesResponse>( + this, METHODID_LIST_AUTHORIZED_CERTIFICATES))) + .addMethod( + getGetAuthorizedCertificateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.GetAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate>( + this, METHODID_GET_AUTHORIZED_CERTIFICATE))) + .addMethod( + getCreateAuthorizedCertificateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.CreateAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate>( + this, METHODID_CREATE_AUTHORIZED_CERTIFICATE))) + .addMethod( + getUpdateAuthorizedCertificateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.UpdateAuthorizedCertificateRequest, + com.google.appengine.v1.AuthorizedCertificate>( + this, METHODID_UPDATE_AUTHORIZED_CERTIFICATE))) + .addMethod( + getDeleteAuthorizedCertificateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.DeleteAuthorizedCertificateRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_AUTHORIZED_CERTIFICATE))) + .build(); + } + } + + /** + * + * + *
+   * Manages SSL certificates a user is authorized to administer. A user can
+   * administer any SSL certificates applicable to their authorized domains.
+   * 
+ */ + public static final class AuthorizedCertificatesStub + extends io.grpc.stub.AbstractAsyncStub { + private AuthorizedCertificatesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AuthorizedCertificatesStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedCertificatesStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all SSL certificates the user is authorized to administer.
+     * 
+ */ + public void listAuthorizedCertificates( + com.google.appengine.v1.ListAuthorizedCertificatesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAuthorizedCertificatesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the specified SSL certificate.
+     * 
+ */ + public void getAuthorizedCertificate( + com.google.appengine.v1.GetAuthorizedCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAuthorizedCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Uploads the specified SSL certificate.
+     * 
+ */ + public void createAuthorizedCertificate( + com.google.appengine.v1.CreateAuthorizedCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAuthorizedCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified SSL certificate. To renew a certificate and maintain
+     * its existing domain mappings, update `certificate_data` with a new
+     * certificate. The new certificate must be applicable to the same domains as
+     * the original certificate. The certificate `display_name` may also be
+     * updated.
+     * 
+ */ + public void updateAuthorizedCertificate( + com.google.appengine.v1.UpdateAuthorizedCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAuthorizedCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified SSL certificate.
+     * 
+ */ + public void deleteAuthorizedCertificate( + com.google.appengine.v1.DeleteAuthorizedCertificateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAuthorizedCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Manages SSL certificates a user is authorized to administer. A user can
+   * administer any SSL certificates applicable to their authorized domains.
+   * 
+ */ + public static final class AuthorizedCertificatesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AuthorizedCertificatesBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AuthorizedCertificatesBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedCertificatesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all SSL certificates the user is authorized to administer.
+     * 
+ */ + public com.google.appengine.v1.ListAuthorizedCertificatesResponse listAuthorizedCertificates( + com.google.appengine.v1.ListAuthorizedCertificatesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAuthorizedCertificatesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the specified SSL certificate.
+     * 
+ */ + public com.google.appengine.v1.AuthorizedCertificate getAuthorizedCertificate( + com.google.appengine.v1.GetAuthorizedCertificateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAuthorizedCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Uploads the specified SSL certificate.
+     * 
+ */ + public com.google.appengine.v1.AuthorizedCertificate createAuthorizedCertificate( + com.google.appengine.v1.CreateAuthorizedCertificateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAuthorizedCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified SSL certificate. To renew a certificate and maintain
+     * its existing domain mappings, update `certificate_data` with a new
+     * certificate. The new certificate must be applicable to the same domains as
+     * the original certificate. The certificate `display_name` may also be
+     * updated.
+     * 
+ */ + public com.google.appengine.v1.AuthorizedCertificate updateAuthorizedCertificate( + com.google.appengine.v1.UpdateAuthorizedCertificateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAuthorizedCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified SSL certificate.
+     * 
+ */ + public com.google.protobuf.Empty deleteAuthorizedCertificate( + com.google.appengine.v1.DeleteAuthorizedCertificateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAuthorizedCertificateMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Manages SSL certificates a user is authorized to administer. A user can
+   * administer any SSL certificates applicable to their authorized domains.
+   * 
+ */ + public static final class AuthorizedCertificatesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AuthorizedCertificatesFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AuthorizedCertificatesFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedCertificatesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all SSL certificates the user is authorized to administer.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.ListAuthorizedCertificatesResponse> + listAuthorizedCertificates( + com.google.appengine.v1.ListAuthorizedCertificatesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAuthorizedCertificatesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the specified SSL certificate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.AuthorizedCertificate> + getAuthorizedCertificate(com.google.appengine.v1.GetAuthorizedCertificateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAuthorizedCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Uploads the specified SSL certificate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.AuthorizedCertificate> + createAuthorizedCertificate( + com.google.appengine.v1.CreateAuthorizedCertificateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAuthorizedCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified SSL certificate. To renew a certificate and maintain
+     * its existing domain mappings, update `certificate_data` with a new
+     * certificate. The new certificate must be applicable to the same domains as
+     * the original certificate. The certificate `display_name` may also be
+     * updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.AuthorizedCertificate> + updateAuthorizedCertificate( + com.google.appengine.v1.UpdateAuthorizedCertificateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAuthorizedCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified SSL certificate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAuthorizedCertificate( + com.google.appengine.v1.DeleteAuthorizedCertificateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAuthorizedCertificateMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_AUTHORIZED_CERTIFICATES = 0; + private static final int METHODID_GET_AUTHORIZED_CERTIFICATE = 1; + private static final int METHODID_CREATE_AUTHORIZED_CERTIFICATE = 2; + private static final int METHODID_UPDATE_AUTHORIZED_CERTIFICATE = 3; + private static final int METHODID_DELETE_AUTHORIZED_CERTIFICATE = 4; + + 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 AuthorizedCertificatesImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AuthorizedCertificatesImplBase 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_AUTHORIZED_CERTIFICATES: + serviceImpl.listAuthorizedCertificates( + (com.google.appengine.v1.ListAuthorizedCertificatesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.appengine.v1.ListAuthorizedCertificatesResponse>) + responseObserver); + break; + case METHODID_GET_AUTHORIZED_CERTIFICATE: + serviceImpl.getAuthorizedCertificate( + (com.google.appengine.v1.GetAuthorizedCertificateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_AUTHORIZED_CERTIFICATE: + serviceImpl.createAuthorizedCertificate( + (com.google.appengine.v1.CreateAuthorizedCertificateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_AUTHORIZED_CERTIFICATE: + serviceImpl.updateAuthorizedCertificate( + (com.google.appengine.v1.UpdateAuthorizedCertificateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_AUTHORIZED_CERTIFICATE: + serviceImpl.deleteAuthorizedCertificate( + (com.google.appengine.v1.DeleteAuthorizedCertificateRequest) 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 AuthorizedCertificatesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AuthorizedCertificatesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.appengine.v1.AppengineProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AuthorizedCertificates"); + } + } + + private static final class AuthorizedCertificatesFileDescriptorSupplier + extends AuthorizedCertificatesBaseDescriptorSupplier { + AuthorizedCertificatesFileDescriptorSupplier() {} + } + + private static final class AuthorizedCertificatesMethodDescriptorSupplier + extends AuthorizedCertificatesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + AuthorizedCertificatesMethodDescriptorSupplier(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 (AuthorizedCertificatesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AuthorizedCertificatesFileDescriptorSupplier()) + .addMethod(getListAuthorizedCertificatesMethod()) + .addMethod(getGetAuthorizedCertificateMethod()) + .addMethod(getCreateAuthorizedCertificateMethod()) + .addMethod(getUpdateAuthorizedCertificateMethod()) + .addMethod(getDeleteAuthorizedCertificateMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomainsGrpc.java b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomainsGrpc.java new file mode 100644 index 00000000..c9afa3bd --- /dev/null +++ b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomainsGrpc.java @@ -0,0 +1,377 @@ +/* + * 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.appengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages domains a user is authorized to administer. To authorize use of a
+ * domain, verify ownership via
+ * [Webmaster Central](https://www.google.com/webmasters/verification/home).
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/appengine/v1/appengine.proto") +public final class AuthorizedDomainsGrpc { + + private AuthorizedDomainsGrpc() {} + + public static final String SERVICE_NAME = "google.appengine.v1.AuthorizedDomains"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.ListAuthorizedDomainsRequest, + com.google.appengine.v1.ListAuthorizedDomainsResponse> + getListAuthorizedDomainsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAuthorizedDomains", + requestType = com.google.appengine.v1.ListAuthorizedDomainsRequest.class, + responseType = com.google.appengine.v1.ListAuthorizedDomainsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.ListAuthorizedDomainsRequest, + com.google.appengine.v1.ListAuthorizedDomainsResponse> + getListAuthorizedDomainsMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.ListAuthorizedDomainsRequest, + com.google.appengine.v1.ListAuthorizedDomainsResponse> + getListAuthorizedDomainsMethod; + if ((getListAuthorizedDomainsMethod = AuthorizedDomainsGrpc.getListAuthorizedDomainsMethod) + == null) { + synchronized (AuthorizedDomainsGrpc.class) { + if ((getListAuthorizedDomainsMethod = AuthorizedDomainsGrpc.getListAuthorizedDomainsMethod) + == null) { + AuthorizedDomainsGrpc.getListAuthorizedDomainsMethod = + getListAuthorizedDomainsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAuthorizedDomains")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListAuthorizedDomainsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListAuthorizedDomainsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AuthorizedDomainsMethodDescriptorSupplier("ListAuthorizedDomains")) + .build(); + } + } + } + return getListAuthorizedDomainsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AuthorizedDomainsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AuthorizedDomainsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedDomainsStub(channel, callOptions); + } + }; + return AuthorizedDomainsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AuthorizedDomainsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AuthorizedDomainsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedDomainsBlockingStub(channel, callOptions); + } + }; + return AuthorizedDomainsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AuthorizedDomainsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AuthorizedDomainsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedDomainsFutureStub(channel, callOptions); + } + }; + return AuthorizedDomainsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages domains a user is authorized to administer. To authorize use of a
+   * domain, verify ownership via
+   * [Webmaster Central](https://www.google.com/webmasters/verification/home).
+   * 
+ */ + public abstract static class AuthorizedDomainsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists all domains the user is authorized to administer.
+     * 
+ */ + public void listAuthorizedDomains( + com.google.appengine.v1.ListAuthorizedDomainsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAuthorizedDomainsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListAuthorizedDomainsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.ListAuthorizedDomainsRequest, + com.google.appengine.v1.ListAuthorizedDomainsResponse>( + this, METHODID_LIST_AUTHORIZED_DOMAINS))) + .build(); + } + } + + /** + * + * + *
+   * Manages domains a user is authorized to administer. To authorize use of a
+   * domain, verify ownership via
+   * [Webmaster Central](https://www.google.com/webmasters/verification/home).
+   * 
+ */ + public static final class AuthorizedDomainsStub + extends io.grpc.stub.AbstractAsyncStub { + private AuthorizedDomainsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AuthorizedDomainsStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedDomainsStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all domains the user is authorized to administer.
+     * 
+ */ + public void listAuthorizedDomains( + com.google.appengine.v1.ListAuthorizedDomainsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAuthorizedDomainsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Manages domains a user is authorized to administer. To authorize use of a
+   * domain, verify ownership via
+   * [Webmaster Central](https://www.google.com/webmasters/verification/home).
+   * 
+ */ + public static final class AuthorizedDomainsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AuthorizedDomainsBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AuthorizedDomainsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedDomainsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all domains the user is authorized to administer.
+     * 
+ */ + public com.google.appengine.v1.ListAuthorizedDomainsResponse listAuthorizedDomains( + com.google.appengine.v1.ListAuthorizedDomainsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAuthorizedDomainsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Manages domains a user is authorized to administer. To authorize use of a
+   * domain, verify ownership via
+   * [Webmaster Central](https://www.google.com/webmasters/verification/home).
+   * 
+ */ + public static final class AuthorizedDomainsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AuthorizedDomainsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AuthorizedDomainsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizedDomainsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all domains the user is authorized to administer.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.ListAuthorizedDomainsResponse> + listAuthorizedDomains(com.google.appengine.v1.ListAuthorizedDomainsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAuthorizedDomainsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_AUTHORIZED_DOMAINS = 0; + + 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 AuthorizedDomainsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AuthorizedDomainsImplBase 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_AUTHORIZED_DOMAINS: + serviceImpl.listAuthorizedDomains( + (com.google.appengine.v1.ListAuthorizedDomainsRequest) 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 AuthorizedDomainsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AuthorizedDomainsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.appengine.v1.AppengineProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AuthorizedDomains"); + } + } + + private static final class AuthorizedDomainsFileDescriptorSupplier + extends AuthorizedDomainsBaseDescriptorSupplier { + AuthorizedDomainsFileDescriptorSupplier() {} + } + + private static final class AuthorizedDomainsMethodDescriptorSupplier + extends AuthorizedDomainsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + AuthorizedDomainsMethodDescriptorSupplier(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 (AuthorizedDomainsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AuthorizedDomainsFileDescriptorSupplier()) + .addMethod(getListAuthorizedDomainsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingsGrpc.java b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingsGrpc.java new file mode 100644 index 00000000..03e71a67 --- /dev/null +++ b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingsGrpc.java @@ -0,0 +1,845 @@ +/* + * 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.appengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages domains serving an application.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/appengine/v1/appengine.proto") +public final class DomainMappingsGrpc { + + private DomainMappingsGrpc() {} + + public static final String SERVICE_NAME = "google.appengine.v1.DomainMappings"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.ListDomainMappingsRequest, + com.google.appengine.v1.ListDomainMappingsResponse> + getListDomainMappingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDomainMappings", + requestType = com.google.appengine.v1.ListDomainMappingsRequest.class, + responseType = com.google.appengine.v1.ListDomainMappingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.ListDomainMappingsRequest, + com.google.appengine.v1.ListDomainMappingsResponse> + getListDomainMappingsMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.ListDomainMappingsRequest, + com.google.appengine.v1.ListDomainMappingsResponse> + getListDomainMappingsMethod; + if ((getListDomainMappingsMethod = DomainMappingsGrpc.getListDomainMappingsMethod) == null) { + synchronized (DomainMappingsGrpc.class) { + if ((getListDomainMappingsMethod = DomainMappingsGrpc.getListDomainMappingsMethod) + == null) { + DomainMappingsGrpc.getListDomainMappingsMethod = + getListDomainMappingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDomainMappings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListDomainMappingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListDomainMappingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DomainMappingsMethodDescriptorSupplier("ListDomainMappings")) + .build(); + } + } + } + return getListDomainMappingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.GetDomainMappingRequest, com.google.appengine.v1.DomainMapping> + getGetDomainMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDomainMapping", + requestType = com.google.appengine.v1.GetDomainMappingRequest.class, + responseType = com.google.appengine.v1.DomainMapping.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.GetDomainMappingRequest, com.google.appengine.v1.DomainMapping> + getGetDomainMappingMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.GetDomainMappingRequest, com.google.appengine.v1.DomainMapping> + getGetDomainMappingMethod; + if ((getGetDomainMappingMethod = DomainMappingsGrpc.getGetDomainMappingMethod) == null) { + synchronized (DomainMappingsGrpc.class) { + if ((getGetDomainMappingMethod = DomainMappingsGrpc.getGetDomainMappingMethod) == null) { + DomainMappingsGrpc.getGetDomainMappingMethod = + getGetDomainMappingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDomainMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.GetDomainMappingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.DomainMapping.getDefaultInstance())) + .setSchemaDescriptor( + new DomainMappingsMethodDescriptorSupplier("GetDomainMapping")) + .build(); + } + } + } + return getGetDomainMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateDomainMappingRequest, com.google.longrunning.Operation> + getCreateDomainMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDomainMapping", + requestType = com.google.appengine.v1.CreateDomainMappingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateDomainMappingRequest, com.google.longrunning.Operation> + getCreateDomainMappingMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateDomainMappingRequest, com.google.longrunning.Operation> + getCreateDomainMappingMethod; + if ((getCreateDomainMappingMethod = DomainMappingsGrpc.getCreateDomainMappingMethod) == null) { + synchronized (DomainMappingsGrpc.class) { + if ((getCreateDomainMappingMethod = DomainMappingsGrpc.getCreateDomainMappingMethod) + == null) { + DomainMappingsGrpc.getCreateDomainMappingMethod = + getCreateDomainMappingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateDomainMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.CreateDomainMappingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DomainMappingsMethodDescriptorSupplier("CreateDomainMapping")) + .build(); + } + } + } + return getCreateDomainMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateDomainMappingRequest, com.google.longrunning.Operation> + getUpdateDomainMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDomainMapping", + requestType = com.google.appengine.v1.UpdateDomainMappingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateDomainMappingRequest, com.google.longrunning.Operation> + getUpdateDomainMappingMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateDomainMappingRequest, com.google.longrunning.Operation> + getUpdateDomainMappingMethod; + if ((getUpdateDomainMappingMethod = DomainMappingsGrpc.getUpdateDomainMappingMethod) == null) { + synchronized (DomainMappingsGrpc.class) { + if ((getUpdateDomainMappingMethod = DomainMappingsGrpc.getUpdateDomainMappingMethod) + == null) { + DomainMappingsGrpc.getUpdateDomainMappingMethod = + getUpdateDomainMappingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateDomainMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.UpdateDomainMappingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DomainMappingsMethodDescriptorSupplier("UpdateDomainMapping")) + .build(); + } + } + } + return getUpdateDomainMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteDomainMappingRequest, com.google.longrunning.Operation> + getDeleteDomainMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDomainMapping", + requestType = com.google.appengine.v1.DeleteDomainMappingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteDomainMappingRequest, com.google.longrunning.Operation> + getDeleteDomainMappingMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteDomainMappingRequest, com.google.longrunning.Operation> + getDeleteDomainMappingMethod; + if ((getDeleteDomainMappingMethod = DomainMappingsGrpc.getDeleteDomainMappingMethod) == null) { + synchronized (DomainMappingsGrpc.class) { + if ((getDeleteDomainMappingMethod = DomainMappingsGrpc.getDeleteDomainMappingMethod) + == null) { + DomainMappingsGrpc.getDeleteDomainMappingMethod = + getDeleteDomainMappingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteDomainMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.DeleteDomainMappingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DomainMappingsMethodDescriptorSupplier("DeleteDomainMapping")) + .build(); + } + } + } + return getDeleteDomainMappingMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DomainMappingsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DomainMappingsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DomainMappingsStub(channel, callOptions); + } + }; + return DomainMappingsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DomainMappingsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DomainMappingsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DomainMappingsBlockingStub(channel, callOptions); + } + }; + return DomainMappingsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DomainMappingsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DomainMappingsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DomainMappingsFutureStub(channel, callOptions); + } + }; + return DomainMappingsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages domains serving an application.
+   * 
+ */ + public abstract static class DomainMappingsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists the domain mappings on an application.
+     * 
+ */ + public void listDomainMappings( + com.google.appengine.v1.ListDomainMappingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDomainMappingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the specified domain mapping.
+     * 
+ */ + public void getDomainMapping( + com.google.appengine.v1.GetDomainMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDomainMappingMethod(), responseObserver); + } + + /** + * + * + *
+     * Maps a domain to an application. A user must be authorized to administer a
+     * domain in order to map it to an application. For a list of available
+     * authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`]().
+     * 
+ */ + public void createDomainMapping( + com.google.appengine.v1.CreateDomainMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDomainMappingMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified domain mapping. To map an SSL certificate to a
+     * domain mapping, update `certificate_id` to point to an `AuthorizedCertificate`
+     * resource. A user must be authorized to administer the associated domain
+     * in order to update a `DomainMapping` resource.
+     * 
+ */ + public void updateDomainMapping( + com.google.appengine.v1.UpdateDomainMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDomainMappingMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified domain mapping. A user must be authorized to
+     * administer the associated domain in order to delete a `DomainMapping`
+     * resource.
+     * 
+ */ + public void deleteDomainMapping( + com.google.appengine.v1.DeleteDomainMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDomainMappingMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListDomainMappingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.ListDomainMappingsRequest, + com.google.appengine.v1.ListDomainMappingsResponse>( + this, METHODID_LIST_DOMAIN_MAPPINGS))) + .addMethod( + getGetDomainMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.GetDomainMappingRequest, + com.google.appengine.v1.DomainMapping>(this, METHODID_GET_DOMAIN_MAPPING))) + .addMethod( + getCreateDomainMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.CreateDomainMappingRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_DOMAIN_MAPPING))) + .addMethod( + getUpdateDomainMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.UpdateDomainMappingRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_DOMAIN_MAPPING))) + .addMethod( + getDeleteDomainMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.DeleteDomainMappingRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_DOMAIN_MAPPING))) + .build(); + } + } + + /** + * + * + *
+   * Manages domains serving an application.
+   * 
+ */ + public static final class DomainMappingsStub + extends io.grpc.stub.AbstractAsyncStub { + private DomainMappingsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DomainMappingsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DomainMappingsStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the domain mappings on an application.
+     * 
+ */ + public void listDomainMappings( + com.google.appengine.v1.ListDomainMappingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDomainMappingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the specified domain mapping.
+     * 
+ */ + public void getDomainMapping( + com.google.appengine.v1.GetDomainMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDomainMappingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Maps a domain to an application. A user must be authorized to administer a
+     * domain in order to map it to an application. For a list of available
+     * authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`]().
+     * 
+ */ + public void createDomainMapping( + com.google.appengine.v1.CreateDomainMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDomainMappingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified domain mapping. To map an SSL certificate to a
+     * domain mapping, update `certificate_id` to point to an `AuthorizedCertificate`
+     * resource. A user must be authorized to administer the associated domain
+     * in order to update a `DomainMapping` resource.
+     * 
+ */ + public void updateDomainMapping( + com.google.appengine.v1.UpdateDomainMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDomainMappingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified domain mapping. A user must be authorized to
+     * administer the associated domain in order to delete a `DomainMapping`
+     * resource.
+     * 
+ */ + public void deleteDomainMapping( + com.google.appengine.v1.DeleteDomainMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDomainMappingMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Manages domains serving an application.
+   * 
+ */ + public static final class DomainMappingsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DomainMappingsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DomainMappingsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DomainMappingsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the domain mappings on an application.
+     * 
+ */ + public com.google.appengine.v1.ListDomainMappingsResponse listDomainMappings( + com.google.appengine.v1.ListDomainMappingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDomainMappingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the specified domain mapping.
+     * 
+ */ + public com.google.appengine.v1.DomainMapping getDomainMapping( + com.google.appengine.v1.GetDomainMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDomainMappingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Maps a domain to an application. A user must be authorized to administer a
+     * domain in order to map it to an application. For a list of available
+     * authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`]().
+     * 
+ */ + public com.google.longrunning.Operation createDomainMapping( + com.google.appengine.v1.CreateDomainMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDomainMappingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified domain mapping. To map an SSL certificate to a
+     * domain mapping, update `certificate_id` to point to an `AuthorizedCertificate`
+     * resource. A user must be authorized to administer the associated domain
+     * in order to update a `DomainMapping` resource.
+     * 
+ */ + public com.google.longrunning.Operation updateDomainMapping( + com.google.appengine.v1.UpdateDomainMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDomainMappingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified domain mapping. A user must be authorized to
+     * administer the associated domain in order to delete a `DomainMapping`
+     * resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteDomainMapping( + com.google.appengine.v1.DeleteDomainMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDomainMappingMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Manages domains serving an application.
+   * 
+ */ + public static final class DomainMappingsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DomainMappingsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DomainMappingsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DomainMappingsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the domain mappings on an application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.ListDomainMappingsResponse> + listDomainMappings(com.google.appengine.v1.ListDomainMappingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDomainMappingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the specified domain mapping.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getDomainMapping(com.google.appengine.v1.GetDomainMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDomainMappingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Maps a domain to an application. A user must be authorized to administer a
+     * domain in order to map it to an application. For a list of available
+     * authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`]().
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDomainMapping(com.google.appengine.v1.CreateDomainMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDomainMappingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified domain mapping. To map an SSL certificate to a
+     * domain mapping, update `certificate_id` to point to an `AuthorizedCertificate`
+     * resource. A user must be authorized to administer the associated domain
+     * in order to update a `DomainMapping` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDomainMapping(com.google.appengine.v1.UpdateDomainMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDomainMappingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified domain mapping. A user must be authorized to
+     * administer the associated domain in order to delete a `DomainMapping`
+     * resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDomainMapping(com.google.appengine.v1.DeleteDomainMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDomainMappingMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_DOMAIN_MAPPINGS = 0; + private static final int METHODID_GET_DOMAIN_MAPPING = 1; + private static final int METHODID_CREATE_DOMAIN_MAPPING = 2; + private static final int METHODID_UPDATE_DOMAIN_MAPPING = 3; + private static final int METHODID_DELETE_DOMAIN_MAPPING = 4; + + 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 DomainMappingsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DomainMappingsImplBase 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_DOMAIN_MAPPINGS: + serviceImpl.listDomainMappings( + (com.google.appengine.v1.ListDomainMappingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DOMAIN_MAPPING: + serviceImpl.getDomainMapping( + (com.google.appengine.v1.GetDomainMappingRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_DOMAIN_MAPPING: + serviceImpl.createDomainMapping( + (com.google.appengine.v1.CreateDomainMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DOMAIN_MAPPING: + serviceImpl.updateDomainMapping( + (com.google.appengine.v1.UpdateDomainMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DOMAIN_MAPPING: + serviceImpl.deleteDomainMapping( + (com.google.appengine.v1.DeleteDomainMappingRequest) 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 DomainMappingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DomainMappingsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.appengine.v1.AppengineProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DomainMappings"); + } + } + + private static final class DomainMappingsFileDescriptorSupplier + extends DomainMappingsBaseDescriptorSupplier { + DomainMappingsFileDescriptorSupplier() {} + } + + private static final class DomainMappingsMethodDescriptorSupplier + extends DomainMappingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DomainMappingsMethodDescriptorSupplier(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 (DomainMappingsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DomainMappingsFileDescriptorSupplier()) + .addMethod(getListDomainMappingsMethod()) + .addMethod(getGetDomainMappingMethod()) + .addMethod(getCreateDomainMappingMethod()) + .addMethod(getUpdateDomainMappingMethod()) + .addMethod(getDeleteDomainMappingMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FirewallGrpc.java b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FirewallGrpc.java new file mode 100644 index 00000000..4a2df790 --- /dev/null +++ b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FirewallGrpc.java @@ -0,0 +1,999 @@ +/* + * 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.appengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Firewall resources are used to define a collection of access control rules
+ * for an Application. Each rule is defined with a position which specifies
+ * the rule's order in the sequence of rules, an IP range to be matched against
+ * requests, and an action to take upon matching requests.
+ * Every request is evaluated against the Firewall rules in priority order.
+ * Processesing stops at the first rule which matches the request's IP address.
+ * A final rule always specifies an action that applies to all remaining
+ * IP addresses. The default final rule for a newly-created application will be
+ * set to "allow" if not otherwise specified by the user.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/appengine/v1/appengine.proto") +public final class FirewallGrpc { + + private FirewallGrpc() {} + + public static final String SERVICE_NAME = "google.appengine.v1.Firewall"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.ListIngressRulesRequest, + com.google.appengine.v1.ListIngressRulesResponse> + getListIngressRulesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListIngressRules", + requestType = com.google.appengine.v1.ListIngressRulesRequest.class, + responseType = com.google.appengine.v1.ListIngressRulesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.ListIngressRulesRequest, + com.google.appengine.v1.ListIngressRulesResponse> + getListIngressRulesMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.ListIngressRulesRequest, + com.google.appengine.v1.ListIngressRulesResponse> + getListIngressRulesMethod; + if ((getListIngressRulesMethod = FirewallGrpc.getListIngressRulesMethod) == null) { + synchronized (FirewallGrpc.class) { + if ((getListIngressRulesMethod = FirewallGrpc.getListIngressRulesMethod) == null) { + FirewallGrpc.getListIngressRulesMethod = + getListIngressRulesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListIngressRules")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListIngressRulesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListIngressRulesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new FirewallMethodDescriptorSupplier("ListIngressRules")) + .build(); + } + } + } + return getListIngressRulesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.BatchUpdateIngressRulesRequest, + com.google.appengine.v1.BatchUpdateIngressRulesResponse> + getBatchUpdateIngressRulesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchUpdateIngressRules", + requestType = com.google.appengine.v1.BatchUpdateIngressRulesRequest.class, + responseType = com.google.appengine.v1.BatchUpdateIngressRulesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.BatchUpdateIngressRulesRequest, + com.google.appengine.v1.BatchUpdateIngressRulesResponse> + getBatchUpdateIngressRulesMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.BatchUpdateIngressRulesRequest, + com.google.appengine.v1.BatchUpdateIngressRulesResponse> + getBatchUpdateIngressRulesMethod; + if ((getBatchUpdateIngressRulesMethod = FirewallGrpc.getBatchUpdateIngressRulesMethod) + == null) { + synchronized (FirewallGrpc.class) { + if ((getBatchUpdateIngressRulesMethod = FirewallGrpc.getBatchUpdateIngressRulesMethod) + == null) { + FirewallGrpc.getBatchUpdateIngressRulesMethod = + getBatchUpdateIngressRulesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchUpdateIngressRules")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.BatchUpdateIngressRulesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.BatchUpdateIngressRulesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new FirewallMethodDescriptorSupplier("BatchUpdateIngressRules")) + .build(); + } + } + } + return getBatchUpdateIngressRulesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule> + getCreateIngressRuleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateIngressRule", + requestType = com.google.appengine.v1.CreateIngressRuleRequest.class, + responseType = com.google.appengine.v1.firewall.FirewallRule.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule> + getCreateIngressRuleMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule> + getCreateIngressRuleMethod; + if ((getCreateIngressRuleMethod = FirewallGrpc.getCreateIngressRuleMethod) == null) { + synchronized (FirewallGrpc.class) { + if ((getCreateIngressRuleMethod = FirewallGrpc.getCreateIngressRuleMethod) == null) { + FirewallGrpc.getCreateIngressRuleMethod = + getCreateIngressRuleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateIngressRule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.CreateIngressRuleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance())) + .setSchemaDescriptor( + new FirewallMethodDescriptorSupplier("CreateIngressRule")) + .build(); + } + } + } + return getCreateIngressRuleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.GetIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule> + getGetIngressRuleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIngressRule", + requestType = com.google.appengine.v1.GetIngressRuleRequest.class, + responseType = com.google.appengine.v1.firewall.FirewallRule.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.GetIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule> + getGetIngressRuleMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.GetIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule> + getGetIngressRuleMethod; + if ((getGetIngressRuleMethod = FirewallGrpc.getGetIngressRuleMethod) == null) { + synchronized (FirewallGrpc.class) { + if ((getGetIngressRuleMethod = FirewallGrpc.getGetIngressRuleMethod) == null) { + FirewallGrpc.getGetIngressRuleMethod = + getGetIngressRuleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIngressRule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.GetIngressRuleRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance())) + .setSchemaDescriptor(new FirewallMethodDescriptorSupplier("GetIngressRule")) + .build(); + } + } + } + return getGetIngressRuleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule> + getUpdateIngressRuleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateIngressRule", + requestType = com.google.appengine.v1.UpdateIngressRuleRequest.class, + responseType = com.google.appengine.v1.firewall.FirewallRule.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule> + getUpdateIngressRuleMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule> + getUpdateIngressRuleMethod; + if ((getUpdateIngressRuleMethod = FirewallGrpc.getUpdateIngressRuleMethod) == null) { + synchronized (FirewallGrpc.class) { + if ((getUpdateIngressRuleMethod = FirewallGrpc.getUpdateIngressRuleMethod) == null) { + FirewallGrpc.getUpdateIngressRuleMethod = + getUpdateIngressRuleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateIngressRule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.UpdateIngressRuleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance())) + .setSchemaDescriptor( + new FirewallMethodDescriptorSupplier("UpdateIngressRule")) + .build(); + } + } + } + return getUpdateIngressRuleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteIngressRuleRequest, com.google.protobuf.Empty> + getDeleteIngressRuleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteIngressRule", + requestType = com.google.appengine.v1.DeleteIngressRuleRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteIngressRuleRequest, com.google.protobuf.Empty> + getDeleteIngressRuleMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteIngressRuleRequest, com.google.protobuf.Empty> + getDeleteIngressRuleMethod; + if ((getDeleteIngressRuleMethod = FirewallGrpc.getDeleteIngressRuleMethod) == null) { + synchronized (FirewallGrpc.class) { + if ((getDeleteIngressRuleMethod = FirewallGrpc.getDeleteIngressRuleMethod) == null) { + FirewallGrpc.getDeleteIngressRuleMethod = + getDeleteIngressRuleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteIngressRule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.DeleteIngressRuleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new FirewallMethodDescriptorSupplier("DeleteIngressRule")) + .build(); + } + } + } + return getDeleteIngressRuleMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static FirewallStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FirewallStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirewallStub(channel, callOptions); + } + }; + return FirewallStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static FirewallBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FirewallBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirewallBlockingStub(channel, callOptions); + } + }; + return FirewallBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static FirewallFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public FirewallFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirewallFutureStub(channel, callOptions); + } + }; + return FirewallFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Firewall resources are used to define a collection of access control rules
+   * for an Application. Each rule is defined with a position which specifies
+   * the rule's order in the sequence of rules, an IP range to be matched against
+   * requests, and an action to take upon matching requests.
+   * Every request is evaluated against the Firewall rules in priority order.
+   * Processesing stops at the first rule which matches the request's IP address.
+   * A final rule always specifies an action that applies to all remaining
+   * IP addresses. The default final rule for a newly-created application will be
+   * set to "allow" if not otherwise specified by the user.
+   * 
+ */ + public abstract static class FirewallImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists the firewall rules of an application.
+     * 
+ */ + public void listIngressRules( + com.google.appengine.v1.ListIngressRulesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListIngressRulesMethod(), responseObserver); + } + + /** + * + * + *
+     * Replaces the entire firewall ruleset in one bulk operation. This overrides
+     * and replaces the rules of an existing firewall with the new rules.
+     * If the final rule does not match traffic with the '*' wildcard IP range,
+     * then an "allow all" rule is explicitly added to the end of the list.
+     * 
+ */ + public void batchUpdateIngressRules( + com.google.appengine.v1.BatchUpdateIngressRulesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchUpdateIngressRulesMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a firewall rule for the application.
+     * 
+ */ + public void createIngressRule( + com.google.appengine.v1.CreateIngressRuleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateIngressRuleMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the specified firewall rule.
+     * 
+ */ + public void getIngressRule( + com.google.appengine.v1.GetIngressRuleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIngressRuleMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified firewall rule.
+     * 
+ */ + public void updateIngressRule( + com.google.appengine.v1.UpdateIngressRuleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateIngressRuleMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified firewall rule.
+     * 
+ */ + public void deleteIngressRule( + com.google.appengine.v1.DeleteIngressRuleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteIngressRuleMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListIngressRulesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.ListIngressRulesRequest, + com.google.appengine.v1.ListIngressRulesResponse>( + this, METHODID_LIST_INGRESS_RULES))) + .addMethod( + getBatchUpdateIngressRulesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.BatchUpdateIngressRulesRequest, + com.google.appengine.v1.BatchUpdateIngressRulesResponse>( + this, METHODID_BATCH_UPDATE_INGRESS_RULES))) + .addMethod( + getCreateIngressRuleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.CreateIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule>( + this, METHODID_CREATE_INGRESS_RULE))) + .addMethod( + getGetIngressRuleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.GetIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule>( + this, METHODID_GET_INGRESS_RULE))) + .addMethod( + getUpdateIngressRuleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.UpdateIngressRuleRequest, + com.google.appengine.v1.firewall.FirewallRule>( + this, METHODID_UPDATE_INGRESS_RULE))) + .addMethod( + getDeleteIngressRuleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.DeleteIngressRuleRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_INGRESS_RULE))) + .build(); + } + } + + /** + * + * + *
+   * Firewall resources are used to define a collection of access control rules
+   * for an Application. Each rule is defined with a position which specifies
+   * the rule's order in the sequence of rules, an IP range to be matched against
+   * requests, and an action to take upon matching requests.
+   * Every request is evaluated against the Firewall rules in priority order.
+   * Processesing stops at the first rule which matches the request's IP address.
+   * A final rule always specifies an action that applies to all remaining
+   * IP addresses. The default final rule for a newly-created application will be
+   * set to "allow" if not otherwise specified by the user.
+   * 
+ */ + public static final class FirewallStub extends io.grpc.stub.AbstractAsyncStub { + private FirewallStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FirewallStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirewallStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the firewall rules of an application.
+     * 
+ */ + public void listIngressRules( + com.google.appengine.v1.ListIngressRulesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListIngressRulesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Replaces the entire firewall ruleset in one bulk operation. This overrides
+     * and replaces the rules of an existing firewall with the new rules.
+     * If the final rule does not match traffic with the '*' wildcard IP range,
+     * then an "allow all" rule is explicitly added to the end of the list.
+     * 
+ */ + public void batchUpdateIngressRules( + com.google.appengine.v1.BatchUpdateIngressRulesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchUpdateIngressRulesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a firewall rule for the application.
+     * 
+ */ + public void createIngressRule( + com.google.appengine.v1.CreateIngressRuleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateIngressRuleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the specified firewall rule.
+     * 
+ */ + public void getIngressRule( + com.google.appengine.v1.GetIngressRuleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIngressRuleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified firewall rule.
+     * 
+ */ + public void updateIngressRule( + com.google.appengine.v1.UpdateIngressRuleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateIngressRuleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified firewall rule.
+     * 
+ */ + public void deleteIngressRule( + com.google.appengine.v1.DeleteIngressRuleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteIngressRuleMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Firewall resources are used to define a collection of access control rules
+   * for an Application. Each rule is defined with a position which specifies
+   * the rule's order in the sequence of rules, an IP range to be matched against
+   * requests, and an action to take upon matching requests.
+   * Every request is evaluated against the Firewall rules in priority order.
+   * Processesing stops at the first rule which matches the request's IP address.
+   * A final rule always specifies an action that applies to all remaining
+   * IP addresses. The default final rule for a newly-created application will be
+   * set to "allow" if not otherwise specified by the user.
+   * 
+ */ + public static final class FirewallBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private FirewallBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FirewallBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirewallBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the firewall rules of an application.
+     * 
+ */ + public com.google.appengine.v1.ListIngressRulesResponse listIngressRules( + com.google.appengine.v1.ListIngressRulesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListIngressRulesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Replaces the entire firewall ruleset in one bulk operation. This overrides
+     * and replaces the rules of an existing firewall with the new rules.
+     * If the final rule does not match traffic with the '*' wildcard IP range,
+     * then an "allow all" rule is explicitly added to the end of the list.
+     * 
+ */ + public com.google.appengine.v1.BatchUpdateIngressRulesResponse batchUpdateIngressRules( + com.google.appengine.v1.BatchUpdateIngressRulesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchUpdateIngressRulesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a firewall rule for the application.
+     * 
+ */ + public com.google.appengine.v1.firewall.FirewallRule createIngressRule( + com.google.appengine.v1.CreateIngressRuleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateIngressRuleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the specified firewall rule.
+     * 
+ */ + public com.google.appengine.v1.firewall.FirewallRule getIngressRule( + com.google.appengine.v1.GetIngressRuleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIngressRuleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified firewall rule.
+     * 
+ */ + public com.google.appengine.v1.firewall.FirewallRule updateIngressRule( + com.google.appengine.v1.UpdateIngressRuleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateIngressRuleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified firewall rule.
+     * 
+ */ + public com.google.protobuf.Empty deleteIngressRule( + com.google.appengine.v1.DeleteIngressRuleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteIngressRuleMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Firewall resources are used to define a collection of access control rules
+   * for an Application. Each rule is defined with a position which specifies
+   * the rule's order in the sequence of rules, an IP range to be matched against
+   * requests, and an action to take upon matching requests.
+   * Every request is evaluated against the Firewall rules in priority order.
+   * Processesing stops at the first rule which matches the request's IP address.
+   * A final rule always specifies an action that applies to all remaining
+   * IP addresses. The default final rule for a newly-created application will be
+   * set to "allow" if not otherwise specified by the user.
+   * 
+ */ + public static final class FirewallFutureStub + extends io.grpc.stub.AbstractFutureStub { + private FirewallFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected FirewallFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new FirewallFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the firewall rules of an application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.ListIngressRulesResponse> + listIngressRules(com.google.appengine.v1.ListIngressRulesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListIngressRulesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Replaces the entire firewall ruleset in one bulk operation. This overrides
+     * and replaces the rules of an existing firewall with the new rules.
+     * If the final rule does not match traffic with the '*' wildcard IP range,
+     * then an "allow all" rule is explicitly added to the end of the list.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.BatchUpdateIngressRulesResponse> + batchUpdateIngressRules(com.google.appengine.v1.BatchUpdateIngressRulesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchUpdateIngressRulesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a firewall rule for the application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.firewall.FirewallRule> + createIngressRule(com.google.appengine.v1.CreateIngressRuleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateIngressRuleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the specified firewall rule.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.firewall.FirewallRule> + getIngressRule(com.google.appengine.v1.GetIngressRuleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIngressRuleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified firewall rule.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.firewall.FirewallRule> + updateIngressRule(com.google.appengine.v1.UpdateIngressRuleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateIngressRuleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified firewall rule.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteIngressRule(com.google.appengine.v1.DeleteIngressRuleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteIngressRuleMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_INGRESS_RULES = 0; + private static final int METHODID_BATCH_UPDATE_INGRESS_RULES = 1; + private static final int METHODID_CREATE_INGRESS_RULE = 2; + private static final int METHODID_GET_INGRESS_RULE = 3; + private static final int METHODID_UPDATE_INGRESS_RULE = 4; + private static final int METHODID_DELETE_INGRESS_RULE = 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 FirewallImplBase serviceImpl; + private final int methodId; + + MethodHandlers(FirewallImplBase 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_INGRESS_RULES: + serviceImpl.listIngressRules( + (com.google.appengine.v1.ListIngressRulesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_BATCH_UPDATE_INGRESS_RULES: + serviceImpl.batchUpdateIngressRules( + (com.google.appengine.v1.BatchUpdateIngressRulesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_INGRESS_RULE: + serviceImpl.createIngressRule( + (com.google.appengine.v1.CreateIngressRuleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_INGRESS_RULE: + serviceImpl.getIngressRule( + (com.google.appengine.v1.GetIngressRuleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_INGRESS_RULE: + serviceImpl.updateIngressRule( + (com.google.appengine.v1.UpdateIngressRuleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_INGRESS_RULE: + serviceImpl.deleteIngressRule( + (com.google.appengine.v1.DeleteIngressRuleRequest) 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 FirewallBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + FirewallBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.appengine.v1.AppengineProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Firewall"); + } + } + + private static final class FirewallFileDescriptorSupplier extends FirewallBaseDescriptorSupplier { + FirewallFileDescriptorSupplier() {} + } + + private static final class FirewallMethodDescriptorSupplier extends FirewallBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + FirewallMethodDescriptorSupplier(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 (FirewallGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new FirewallFileDescriptorSupplier()) + .addMethod(getListIngressRulesMethod()) + .addMethod(getBatchUpdateIngressRulesMethod()) + .addMethod(getCreateIngressRuleMethod()) + .addMethod(getGetIngressRuleMethod()) + .addMethod(getUpdateIngressRuleMethod()) + .addMethod(getDeleteIngressRuleMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstancesGrpc.java b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstancesGrpc.java new file mode 100644 index 00000000..c734f963 --- /dev/null +++ b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstancesGrpc.java @@ -0,0 +1,754 @@ +/* + * 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.appengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages instances of a version.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/appengine/v1/appengine.proto") +public final class InstancesGrpc { + + private InstancesGrpc() {} + + public static final String SERVICE_NAME = "google.appengine.v1.Instances"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.ListInstancesRequest, + com.google.appengine.v1.ListInstancesResponse> + getListInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstances", + requestType = com.google.appengine.v1.ListInstancesRequest.class, + responseType = com.google.appengine.v1.ListInstancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.ListInstancesRequest, + com.google.appengine.v1.ListInstancesResponse> + getListInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.ListInstancesRequest, + com.google.appengine.v1.ListInstancesResponse> + getListInstancesMethod; + if ((getListInstancesMethod = InstancesGrpc.getListInstancesMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getListInstancesMethod = InstancesGrpc.getListInstancesMethod) == null) { + InstancesGrpc.getListInstancesMethod = + getListInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListInstancesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListInstancesResponse.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("ListInstances")) + .build(); + } + } + } + return getListInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.GetInstanceRequest, com.google.appengine.v1.Instance> + getGetInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstance", + requestType = com.google.appengine.v1.GetInstanceRequest.class, + responseType = com.google.appengine.v1.Instance.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.GetInstanceRequest, com.google.appengine.v1.Instance> + getGetInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.GetInstanceRequest, com.google.appengine.v1.Instance> + getGetInstanceMethod; + if ((getGetInstanceMethod = InstancesGrpc.getGetInstanceMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getGetInstanceMethod = InstancesGrpc.getGetInstanceMethod) == null) { + InstancesGrpc.getGetInstanceMethod = + getGetInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.Instance.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("GetInstance")) + .build(); + } + } + } + return getGetInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", + requestType = com.google.appengine.v1.DeleteInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod; + if ((getDeleteInstanceMethod = InstancesGrpc.getDeleteInstanceMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getDeleteInstanceMethod = InstancesGrpc.getDeleteInstanceMethod) == null) { + InstancesGrpc.getDeleteInstanceMethod = + getDeleteInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.DeleteInstanceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("DeleteInstance")) + .build(); + } + } + } + return getDeleteInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.DebugInstanceRequest, com.google.longrunning.Operation> + getDebugInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DebugInstance", + requestType = com.google.appengine.v1.DebugInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.DebugInstanceRequest, com.google.longrunning.Operation> + getDebugInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.DebugInstanceRequest, com.google.longrunning.Operation> + getDebugInstanceMethod; + if ((getDebugInstanceMethod = InstancesGrpc.getDebugInstanceMethod) == null) { + synchronized (InstancesGrpc.class) { + if ((getDebugInstanceMethod = InstancesGrpc.getDebugInstanceMethod) == null) { + InstancesGrpc.getDebugInstanceMethod = + getDebugInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DebugInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.DebugInstanceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new InstancesMethodDescriptorSupplier("DebugInstance")) + .build(); + } + } + } + return getDebugInstanceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static InstancesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InstancesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesStub(channel, callOptions); + } + }; + return InstancesStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static InstancesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InstancesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesBlockingStub(channel, callOptions); + } + }; + return InstancesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static InstancesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InstancesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesFutureStub(channel, callOptions); + } + }; + return InstancesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages instances of a version.
+   * 
+ */ + public abstract static class InstancesImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists the instances of a version.
+     * Tip: To aggregate details about instances over time, see the
+     * [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
+     * 
+ */ + public void listInstances( + com.google.appengine.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets instance information.
+     * 
+ */ + public void getInstance( + com.google.appengine.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Stops a running instance.
+     * The instance might be automatically recreated based on the scaling settings
+     * of the version. For more information, see "How Instances are Managed"
+     * ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) |
+     * [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).
+     * To ensure that instances are not re-created and avoid getting billed, you
+     * can stop all instances within the target version by changing the serving
+     * status of the version to `STOPPED` with the
+     * [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)
+     * method.
+     * 
+ */ + public void deleteInstance( + com.google.appengine.v1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Enables debugging on a VM instance. This allows you to use the SSH
+     * command to connect to the virtual machine where the instance lives.
+     * While in "debug mode", the instance continues to serve live traffic.
+     * You should delete the instance when you are done debugging and then
+     * allow the system to take over and determine if another instance
+     * should be started.
+     * Only applicable for instances in App Engine flexible environment.
+     * 
+ */ + public void debugInstance( + com.google.appengine.v1.DebugInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDebugInstanceMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.ListInstancesRequest, + com.google.appengine.v1.ListInstancesResponse>( + this, METHODID_LIST_INSTANCES))) + .addMethod( + getGetInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.GetInstanceRequest, com.google.appengine.v1.Instance>( + this, METHODID_GET_INSTANCE))) + .addMethod( + getDeleteInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.DeleteInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_INSTANCE))) + .addMethod( + getDebugInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.DebugInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_DEBUG_INSTANCE))) + .build(); + } + } + + /** + * + * + *
+   * Manages instances of a version.
+   * 
+ */ + public static final class InstancesStub extends io.grpc.stub.AbstractAsyncStub { + private InstancesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InstancesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the instances of a version.
+     * Tip: To aggregate details about instances over time, see the
+     * [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
+     * 
+ */ + public void listInstances( + com.google.appengine.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets instance information.
+     * 
+ */ + public void getInstance( + com.google.appengine.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stops a running instance.
+     * The instance might be automatically recreated based on the scaling settings
+     * of the version. For more information, see "How Instances are Managed"
+     * ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) |
+     * [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).
+     * To ensure that instances are not re-created and avoid getting billed, you
+     * can stop all instances within the target version by changing the serving
+     * status of the version to `STOPPED` with the
+     * [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)
+     * method.
+     * 
+ */ + public void deleteInstance( + com.google.appengine.v1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Enables debugging on a VM instance. This allows you to use the SSH
+     * command to connect to the virtual machine where the instance lives.
+     * While in "debug mode", the instance continues to serve live traffic.
+     * You should delete the instance when you are done debugging and then
+     * allow the system to take over and determine if another instance
+     * should be started.
+     * Only applicable for instances in App Engine flexible environment.
+     * 
+ */ + public void debugInstance( + com.google.appengine.v1.DebugInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDebugInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Manages instances of a version.
+   * 
+ */ + public static final class InstancesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private InstancesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InstancesBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the instances of a version.
+     * Tip: To aggregate details about instances over time, see the
+     * [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
+     * 
+ */ + public com.google.appengine.v1.ListInstancesResponse listInstances( + com.google.appengine.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets instance information.
+     * 
+ */ + public com.google.appengine.v1.Instance getInstance( + com.google.appengine.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops a running instance.
+     * The instance might be automatically recreated based on the scaling settings
+     * of the version. For more information, see "How Instances are Managed"
+     * ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) |
+     * [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).
+     * To ensure that instances are not re-created and avoid getting billed, you
+     * can stop all instances within the target version by changing the serving
+     * status of the version to `STOPPED` with the
+     * [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)
+     * method.
+     * 
+ */ + public com.google.longrunning.Operation deleteInstance( + com.google.appengine.v1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Enables debugging on a VM instance. This allows you to use the SSH
+     * command to connect to the virtual machine where the instance lives.
+     * While in "debug mode", the instance continues to serve live traffic.
+     * You should delete the instance when you are done debugging and then
+     * allow the system to take over and determine if another instance
+     * should be started.
+     * Only applicable for instances in App Engine flexible environment.
+     * 
+ */ + public com.google.longrunning.Operation debugInstance( + com.google.appengine.v1.DebugInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDebugInstanceMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Manages instances of a version.
+   * 
+ */ + public static final class InstancesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private InstancesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InstancesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InstancesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the instances of a version.
+     * Tip: To aggregate details about instances over time, see the
+     * [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.ListInstancesResponse> + listInstances(com.google.appengine.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets instance information.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getInstance(com.google.appengine.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Stops a running instance.
+     * The instance might be automatically recreated based on the scaling settings
+     * of the version. For more information, see "How Instances are Managed"
+     * ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) |
+     * [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).
+     * To ensure that instances are not re-created and avoid getting billed, you
+     * can stop all instances within the target version by changing the serving
+     * status of the version to `STOPPED` with the
+     * [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)
+     * method.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteInstance(com.google.appengine.v1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Enables debugging on a VM instance. This allows you to use the SSH
+     * command to connect to the virtual machine where the instance lives.
+     * While in "debug mode", the instance continues to serve live traffic.
+     * You should delete the instance when you are done debugging and then
+     * allow the system to take over and determine if another instance
+     * should be started.
+     * Only applicable for instances in App Engine flexible environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + debugInstance(com.google.appengine.v1.DebugInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDebugInstanceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_INSTANCES = 0; + private static final int METHODID_GET_INSTANCE = 1; + private static final int METHODID_DELETE_INSTANCE = 2; + private static final int METHODID_DEBUG_INSTANCE = 3; + + 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 InstancesImplBase serviceImpl; + private final int methodId; + + MethodHandlers(InstancesImplBase 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_INSTANCES: + serviceImpl.listInstances( + (com.google.appengine.v1.ListInstancesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_INSTANCE: + serviceImpl.getInstance( + (com.google.appengine.v1.GetInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INSTANCE: + serviceImpl.deleteInstance( + (com.google.appengine.v1.DeleteInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DEBUG_INSTANCE: + serviceImpl.debugInstance( + (com.google.appengine.v1.DebugInstanceRequest) 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 InstancesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + InstancesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.appengine.v1.AppengineProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Instances"); + } + } + + private static final class InstancesFileDescriptorSupplier + extends InstancesBaseDescriptorSupplier { + InstancesFileDescriptorSupplier() {} + } + + private static final class InstancesMethodDescriptorSupplier + extends InstancesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + InstancesMethodDescriptorSupplier(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 (InstancesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new InstancesFileDescriptorSupplier()) + .addMethod(getListInstancesMethod()) + .addMethod(getGetInstanceMethod()) + .addMethod(getDeleteInstanceMethod()) + .addMethod(getDebugInstanceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServicesGrpc.java b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServicesGrpc.java new file mode 100644 index 00000000..d0f39b97 --- /dev/null +++ b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServicesGrpc.java @@ -0,0 +1,676 @@ +/* + * 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.appengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages services of an application.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/appengine/v1/appengine.proto") +public final class ServicesGrpc { + + private ServicesGrpc() {} + + public static final String SERVICE_NAME = "google.appengine.v1.Services"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.ListServicesRequest, com.google.appengine.v1.ListServicesResponse> + getListServicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListServices", + requestType = com.google.appengine.v1.ListServicesRequest.class, + responseType = com.google.appengine.v1.ListServicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.ListServicesRequest, com.google.appengine.v1.ListServicesResponse> + getListServicesMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.ListServicesRequest, + com.google.appengine.v1.ListServicesResponse> + getListServicesMethod; + if ((getListServicesMethod = ServicesGrpc.getListServicesMethod) == null) { + synchronized (ServicesGrpc.class) { + if ((getListServicesMethod = ServicesGrpc.getListServicesMethod) == null) { + ServicesGrpc.getListServicesMethod = + getListServicesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListServicesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ServicesMethodDescriptorSupplier("ListServices")) + .build(); + } + } + } + return getListServicesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.GetServiceRequest, com.google.appengine.v1.Service> + getGetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetService", + requestType = com.google.appengine.v1.GetServiceRequest.class, + responseType = com.google.appengine.v1.Service.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.GetServiceRequest, com.google.appengine.v1.Service> + getGetServiceMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.GetServiceRequest, com.google.appengine.v1.Service> + getGetServiceMethod; + if ((getGetServiceMethod = ServicesGrpc.getGetServiceMethod) == null) { + synchronized (ServicesGrpc.class) { + if ((getGetServiceMethod = ServicesGrpc.getGetServiceMethod) == null) { + ServicesGrpc.getGetServiceMethod = + getGetServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.Service.getDefaultInstance())) + .setSchemaDescriptor(new ServicesMethodDescriptorSupplier("GetService")) + .build(); + } + } + } + return getGetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateServiceRequest, com.google.longrunning.Operation> + getUpdateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateService", + requestType = com.google.appengine.v1.UpdateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateServiceRequest, com.google.longrunning.Operation> + getUpdateServiceMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateServiceRequest, com.google.longrunning.Operation> + getUpdateServiceMethod; + if ((getUpdateServiceMethod = ServicesGrpc.getUpdateServiceMethod) == null) { + synchronized (ServicesGrpc.class) { + if ((getUpdateServiceMethod = ServicesGrpc.getUpdateServiceMethod) == null) { + ServicesGrpc.getUpdateServiceMethod = + getUpdateServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.UpdateServiceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ServicesMethodDescriptorSupplier("UpdateService")) + .build(); + } + } + } + return getUpdateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteServiceRequest, com.google.longrunning.Operation> + getDeleteServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteService", + requestType = com.google.appengine.v1.DeleteServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteServiceRequest, com.google.longrunning.Operation> + getDeleteServiceMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteServiceRequest, com.google.longrunning.Operation> + getDeleteServiceMethod; + if ((getDeleteServiceMethod = ServicesGrpc.getDeleteServiceMethod) == null) { + synchronized (ServicesGrpc.class) { + if ((getDeleteServiceMethod = ServicesGrpc.getDeleteServiceMethod) == null) { + ServicesGrpc.getDeleteServiceMethod = + getDeleteServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ServicesMethodDescriptorSupplier("DeleteService")) + .build(); + } + } + } + return getDeleteServiceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ServicesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ServicesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServicesStub(channel, callOptions); + } + }; + return ServicesStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ServicesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ServicesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServicesBlockingStub(channel, callOptions); + } + }; + return ServicesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ServicesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ServicesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServicesFutureStub(channel, callOptions); + } + }; + return ServicesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages services of an application.
+   * 
+ */ + public abstract static class ServicesImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists all the services in the application.
+     * 
+ */ + public void listServices( + com.google.appengine.v1.ListServicesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListServicesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the current configuration of the specified service.
+     * 
+ */ + public void getService( + com.google.appengine.v1.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the configuration of the specified service.
+     * 
+ */ + public void updateService( + com.google.appengine.v1.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified service and all enclosed versions.
+     * 
+ */ + public void deleteService( + com.google.appengine.v1.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteServiceMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListServicesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.ListServicesRequest, + com.google.appengine.v1.ListServicesResponse>(this, METHODID_LIST_SERVICES))) + .addMethod( + getGetServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.GetServiceRequest, com.google.appengine.v1.Service>( + this, METHODID_GET_SERVICE))) + .addMethod( + getUpdateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.UpdateServiceRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_SERVICE))) + .addMethod( + getDeleteServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.DeleteServiceRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_SERVICE))) + .build(); + } + } + + /** + * + * + *
+   * Manages services of an application.
+   * 
+ */ + public static final class ServicesStub extends io.grpc.stub.AbstractAsyncStub { + private ServicesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ServicesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServicesStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all the services in the application.
+     * 
+ */ + public void listServices( + com.google.appengine.v1.ListServicesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the current configuration of the specified service.
+     * 
+ */ + public void getService( + com.google.appengine.v1.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the configuration of the specified service.
+     * 
+ */ + public void updateService( + com.google.appengine.v1.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified service and all enclosed versions.
+     * 
+ */ + public void deleteService( + com.google.appengine.v1.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Manages services of an application.
+   * 
+ */ + public static final class ServicesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ServicesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ServicesBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServicesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all the services in the application.
+     * 
+ */ + public com.google.appengine.v1.ListServicesResponse listServices( + com.google.appengine.v1.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListServicesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the current configuration of the specified service.
+     * 
+ */ + public com.google.appengine.v1.Service getService( + com.google.appengine.v1.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the configuration of the specified service.
+     * 
+ */ + public com.google.longrunning.Operation updateService( + com.google.appengine.v1.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified service and all enclosed versions.
+     * 
+ */ + public com.google.longrunning.Operation deleteService( + com.google.appengine.v1.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteServiceMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Manages services of an application.
+   * 
+ */ + public static final class ServicesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ServicesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ServicesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServicesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all the services in the application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.ListServicesResponse> + listServices(com.google.appengine.v1.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the current configuration of the specified service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getService(com.google.appengine.v1.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the configuration of the specified service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateService(com.google.appengine.v1.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified service and all enclosed versions.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteService(com.google.appengine.v1.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_SERVICES = 0; + private static final int METHODID_GET_SERVICE = 1; + private static final int METHODID_UPDATE_SERVICE = 2; + private static final int METHODID_DELETE_SERVICE = 3; + + 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 ServicesImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ServicesImplBase 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_SERVICES: + serviceImpl.listServices( + (com.google.appengine.v1.ListServicesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SERVICE: + serviceImpl.getService( + (com.google.appengine.v1.GetServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SERVICE: + serviceImpl.updateService( + (com.google.appengine.v1.UpdateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SERVICE: + serviceImpl.deleteService( + (com.google.appengine.v1.DeleteServiceRequest) 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 ServicesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ServicesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.appengine.v1.AppengineProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Services"); + } + } + + private static final class ServicesFileDescriptorSupplier extends ServicesBaseDescriptorSupplier { + ServicesFileDescriptorSupplier() {} + } + + private static final class ServicesMethodDescriptorSupplier extends ServicesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ServicesMethodDescriptorSupplier(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 (ServicesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ServicesFileDescriptorSupplier()) + .addMethod(getListServicesMethod()) + .addMethod(getGetServiceMethod()) + .addMethod(getUpdateServiceMethod()) + .addMethod(getDeleteServiceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionsGrpc.java b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionsGrpc.java new file mode 100644 index 00000000..f21a7aee --- /dev/null +++ b/grpc-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionsGrpc.java @@ -0,0 +1,886 @@ +/* + * 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.appengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages versions of a service.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/appengine/v1/appengine.proto") +public final class VersionsGrpc { + + private VersionsGrpc() {} + + public static final String SERVICE_NAME = "google.appengine.v1.Versions"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.ListVersionsRequest, com.google.appengine.v1.ListVersionsResponse> + getListVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListVersions", + requestType = com.google.appengine.v1.ListVersionsRequest.class, + responseType = com.google.appengine.v1.ListVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.ListVersionsRequest, com.google.appengine.v1.ListVersionsResponse> + getListVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.ListVersionsRequest, + com.google.appengine.v1.ListVersionsResponse> + getListVersionsMethod; + if ((getListVersionsMethod = VersionsGrpc.getListVersionsMethod) == null) { + synchronized (VersionsGrpc.class) { + if ((getListVersionsMethod = VersionsGrpc.getListVersionsMethod) == null) { + VersionsGrpc.getListVersionsMethod = + getListVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.ListVersionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new VersionsMethodDescriptorSupplier("ListVersions")) + .build(); + } + } + } + return getListVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.GetVersionRequest, com.google.appengine.v1.Version> + getGetVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetVersion", + requestType = com.google.appengine.v1.GetVersionRequest.class, + responseType = com.google.appengine.v1.Version.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.GetVersionRequest, com.google.appengine.v1.Version> + getGetVersionMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.GetVersionRequest, com.google.appengine.v1.Version> + getGetVersionMethod; + if ((getGetVersionMethod = VersionsGrpc.getGetVersionMethod) == null) { + synchronized (VersionsGrpc.class) { + if ((getGetVersionMethod = VersionsGrpc.getGetVersionMethod) == null) { + VersionsGrpc.getGetVersionMethod = + getGetVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.GetVersionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.Version.getDefaultInstance())) + .setSchemaDescriptor(new VersionsMethodDescriptorSupplier("GetVersion")) + .build(); + } + } + } + return getGetVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateVersionRequest, com.google.longrunning.Operation> + getCreateVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateVersion", + requestType = com.google.appengine.v1.CreateVersionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateVersionRequest, com.google.longrunning.Operation> + getCreateVersionMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.CreateVersionRequest, com.google.longrunning.Operation> + getCreateVersionMethod; + if ((getCreateVersionMethod = VersionsGrpc.getCreateVersionMethod) == null) { + synchronized (VersionsGrpc.class) { + if ((getCreateVersionMethod = VersionsGrpc.getCreateVersionMethod) == null) { + VersionsGrpc.getCreateVersionMethod = + getCreateVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.CreateVersionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new VersionsMethodDescriptorSupplier("CreateVersion")) + .build(); + } + } + } + return getCreateVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateVersionRequest, com.google.longrunning.Operation> + getUpdateVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateVersion", + requestType = com.google.appengine.v1.UpdateVersionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateVersionRequest, com.google.longrunning.Operation> + getUpdateVersionMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.UpdateVersionRequest, com.google.longrunning.Operation> + getUpdateVersionMethod; + if ((getUpdateVersionMethod = VersionsGrpc.getUpdateVersionMethod) == null) { + synchronized (VersionsGrpc.class) { + if ((getUpdateVersionMethod = VersionsGrpc.getUpdateVersionMethod) == null) { + VersionsGrpc.getUpdateVersionMethod = + getUpdateVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.UpdateVersionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new VersionsMethodDescriptorSupplier("UpdateVersion")) + .build(); + } + } + } + return getUpdateVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteVersionRequest, com.google.longrunning.Operation> + getDeleteVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteVersion", + requestType = com.google.appengine.v1.DeleteVersionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteVersionRequest, com.google.longrunning.Operation> + getDeleteVersionMethod() { + io.grpc.MethodDescriptor< + com.google.appengine.v1.DeleteVersionRequest, com.google.longrunning.Operation> + getDeleteVersionMethod; + if ((getDeleteVersionMethod = VersionsGrpc.getDeleteVersionMethod) == null) { + synchronized (VersionsGrpc.class) { + if ((getDeleteVersionMethod = VersionsGrpc.getDeleteVersionMethod) == null) { + VersionsGrpc.getDeleteVersionMethod = + getDeleteVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.appengine.v1.DeleteVersionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new VersionsMethodDescriptorSupplier("DeleteVersion")) + .build(); + } + } + } + return getDeleteVersionMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static VersionsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VersionsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VersionsStub(channel, callOptions); + } + }; + return VersionsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static VersionsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VersionsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VersionsBlockingStub(channel, callOptions); + } + }; + return VersionsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static VersionsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VersionsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VersionsFutureStub(channel, callOptions); + } + }; + return VersionsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages versions of a service.
+   * 
+ */ + public abstract static class VersionsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists the versions of a service.
+     * 
+ */ + public void listVersions( + com.google.appengine.v1.ListVersionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListVersionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the specified Version resource.
+     * By default, only a `BASIC_VIEW` will be returned.
+     * Specify the `FULL_VIEW` parameter to get the full resource.
+     * 
+ */ + public void getVersion( + com.google.appengine.v1.GetVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Deploys code and resource files to a new version.
+     * 
+ */ + public void createVersion( + com.google.appengine.v1.CreateVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified Version resource.
+     * You can specify the following fields depending on the App Engine
+     * environment and type of scaling that the version resource uses:
+     * **Standard environment**
+     * * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)
+     * *automatic scaling* in the standard environment:
+     * * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * *basic scaling* or *manual scaling* in the standard environment:
+     * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
+     * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
+     * **Flexible environment**
+     * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
+     * *automatic scaling* in the flexible environment:
+     * * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * *manual scaling* in the flexible environment:
+     * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
+     * 
+ */ + public void updateVersion( + com.google.appengine.v1.UpdateVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an existing Version resource.
+     * 
+ */ + public void deleteVersion( + com.google.appengine.v1.DeleteVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteVersionMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.ListVersionsRequest, + com.google.appengine.v1.ListVersionsResponse>(this, METHODID_LIST_VERSIONS))) + .addMethod( + getGetVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.GetVersionRequest, com.google.appengine.v1.Version>( + this, METHODID_GET_VERSION))) + .addMethod( + getCreateVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.CreateVersionRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_VERSION))) + .addMethod( + getUpdateVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.UpdateVersionRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_VERSION))) + .addMethod( + getDeleteVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.appengine.v1.DeleteVersionRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_VERSION))) + .build(); + } + } + + /** + * + * + *
+   * Manages versions of a service.
+   * 
+ */ + public static final class VersionsStub extends io.grpc.stub.AbstractAsyncStub { + private VersionsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VersionsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VersionsStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the versions of a service.
+     * 
+ */ + public void listVersions( + com.google.appengine.v1.ListVersionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the specified Version resource.
+     * By default, only a `BASIC_VIEW` will be returned.
+     * Specify the `FULL_VIEW` parameter to get the full resource.
+     * 
+ */ + public void getVersion( + com.google.appengine.v1.GetVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetVersionMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deploys code and resource files to a new version.
+     * 
+ */ + public void createVersion( + com.google.appengine.v1.CreateVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified Version resource.
+     * You can specify the following fields depending on the App Engine
+     * environment and type of scaling that the version resource uses:
+     * **Standard environment**
+     * * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)
+     * *automatic scaling* in the standard environment:
+     * * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * *basic scaling* or *manual scaling* in the standard environment:
+     * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
+     * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
+     * **Flexible environment**
+     * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
+     * *automatic scaling* in the flexible environment:
+     * * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * *manual scaling* in the flexible environment:
+     * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
+     * 
+ */ + public void updateVersion( + com.google.appengine.v1.UpdateVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an existing Version resource.
+     * 
+ */ + public void deleteVersion( + com.google.appengine.v1.DeleteVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteVersionMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Manages versions of a service.
+   * 
+ */ + public static final class VersionsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private VersionsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VersionsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VersionsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the versions of a service.
+     * 
+ */ + public com.google.appengine.v1.ListVersionsResponse listVersions( + com.google.appengine.v1.ListVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the specified Version resource.
+     * By default, only a `BASIC_VIEW` will be returned.
+     * Specify the `FULL_VIEW` parameter to get the full resource.
+     * 
+ */ + public com.google.appengine.v1.Version getVersion( + com.google.appengine.v1.GetVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deploys code and resource files to a new version.
+     * 
+ */ + public com.google.longrunning.Operation createVersion( + com.google.appengine.v1.CreateVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified Version resource.
+     * You can specify the following fields depending on the App Engine
+     * environment and type of scaling that the version resource uses:
+     * **Standard environment**
+     * * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)
+     * *automatic scaling* in the standard environment:
+     * * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * *basic scaling* or *manual scaling* in the standard environment:
+     * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
+     * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
+     * **Flexible environment**
+     * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
+     * *automatic scaling* in the flexible environment:
+     * * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * *manual scaling* in the flexible environment:
+     * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
+     * 
+ */ + public com.google.longrunning.Operation updateVersion( + com.google.appengine.v1.UpdateVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an existing Version resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteVersion( + com.google.appengine.v1.DeleteVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteVersionMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Manages versions of a service.
+   * 
+ */ + public static final class VersionsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private VersionsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VersionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VersionsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the versions of a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.appengine.v1.ListVersionsResponse> + listVersions(com.google.appengine.v1.ListVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListVersionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the specified Version resource.
+     * By default, only a `BASIC_VIEW` will be returned.
+     * Specify the `FULL_VIEW` parameter to get the full resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getVersion(com.google.appengine.v1.GetVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deploys code and resource files to a new version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createVersion(com.google.appengine.v1.CreateVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified Version resource.
+     * You can specify the following fields depending on the App Engine
+     * environment and type of scaling that the version resource uses:
+     * **Standard environment**
+     * * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)
+     * *automatic scaling* in the standard environment:
+     * * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
+     * *basic scaling* or *manual scaling* in the standard environment:
+     * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
+     * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
+     * **Flexible environment**
+     * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
+     * *automatic scaling* in the flexible environment:
+     * * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+     * *manual scaling* in the flexible environment:
+     * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateVersion(com.google.appengine.v1.UpdateVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an existing Version resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteVersion(com.google.appengine.v1.DeleteVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteVersionMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_VERSIONS = 0; + private static final int METHODID_GET_VERSION = 1; + private static final int METHODID_CREATE_VERSION = 2; + private static final int METHODID_UPDATE_VERSION = 3; + private static final int METHODID_DELETE_VERSION = 4; + + 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 VersionsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(VersionsImplBase 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_VERSIONS: + serviceImpl.listVersions( + (com.google.appengine.v1.ListVersionsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_VERSION: + serviceImpl.getVersion( + (com.google.appengine.v1.GetVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_VERSION: + serviceImpl.createVersion( + (com.google.appengine.v1.CreateVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_VERSION: + serviceImpl.updateVersion( + (com.google.appengine.v1.UpdateVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_VERSION: + serviceImpl.deleteVersion( + (com.google.appengine.v1.DeleteVersionRequest) 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 VersionsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + VersionsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.appengine.v1.AppengineProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Versions"); + } + } + + private static final class VersionsFileDescriptorSupplier extends VersionsBaseDescriptorSupplier { + VersionsFileDescriptorSupplier() {} + } + + private static final class VersionsMethodDescriptorSupplier extends VersionsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + VersionsMethodDescriptorSupplier(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 (VersionsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new VersionsFileDescriptorSupplier()) + .addMethod(getListVersionsMethod()) + .addMethod(getGetVersionMethod()) + .addMethod(getCreateVersionMethod()) + .addMethod(getUpdateVersionMethod()) + .addMethod(getDeleteVersionMethod()) + .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/pom.xml b/pom.xml new file mode 100644 index 00000000..2d7dfa58 --- /dev/null +++ b/pom.xml @@ -0,0 +1,179 @@ + + + 4.0.0 + com.google.cloud + google-cloud-appengine-admin-parent + pom + 0.0.1-SNAPSHOT + Google App Engine Admin API Parent + https://github.com/googleapis/java-appengine-admin + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.11.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-appengine-admin.git + scm:git:git@github.com:googleapis/java-appengine-admin.git + https://github.com/googleapis/java-appengine-admin + HEAD + + + https://github.com/googleapis/java-appengine-admin/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-appengine-admin-parent + + + + + + com.google.cloud + google-cloud-appengine-admin + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-appengine-admin-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-appengine-admin-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 0.20.1 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-appengine-admin + grpc-google-cloud-appengine-admin-v1 + proto-google-cloud-appengine-admin-v1 + google-cloud-appengine-admin-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/ + + + + + + \ No newline at end of file diff --git a/proto-google-cloud-appengine-admin-v1/clirr-ignored-differences.xml b/proto-google-cloud-appengine-admin-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000..ad53691e --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/clirr-ignored-differences.xml @@ -0,0 +1,33 @@ + + + + + 7012 + com/google/appengine/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/appengine/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/appengine/v1/*OrBuilder + boolean has*(*) + + 7012 + com/google/appengine/v1/firewall/*OrBuilder + * get*(*) + + + 7012 + com/google/appengine/v1/firewall/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/appengine/v1/firewall/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-appengine-admin-v1/pom.xml b/proto-google-cloud-appengine-admin-v1/pom.xml new file mode 100644 index 00000000..ba13603f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-appengine-admin-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-appengine-admin-v1 + Proto library for google-cloud-appengine-admin + + com.google.cloud + google-cloud-appengine-admin-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-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiConfigHandler.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiConfigHandler.java new file mode 100644 index 00000000..674c996e --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiConfigHandler.java @@ -0,0 +1,1280 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/)
+ * configuration for API handlers.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ApiConfigHandler} + */ +public final class ApiConfigHandler extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ApiConfigHandler) + ApiConfigHandlerOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiConfigHandler.newBuilder() to construct. + private ApiConfigHandler(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApiConfigHandler() { + authFailAction_ = 0; + login_ = 0; + script_ = ""; + securityLevel_ = 0; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApiConfigHandler(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ApiConfigHandler( + 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(); + + authFailAction_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + login_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + script_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + securityLevel_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiConfigHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiConfigHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ApiConfigHandler.class, + com.google.appengine.v1.ApiConfigHandler.Builder.class); + } + + public static final int AUTH_FAIL_ACTION_FIELD_NUMBER = 1; + private int authFailAction_; + /** + * + * + *
+   * Action to take when users access resources that require
+   * authentication. Defaults to `redirect`.
+   * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 1; + * + * @return The enum numeric value on the wire for authFailAction. + */ + @java.lang.Override + public int getAuthFailActionValue() { + return authFailAction_; + } + /** + * + * + *
+   * Action to take when users access resources that require
+   * authentication. Defaults to `redirect`.
+   * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 1; + * + * @return The authFailAction. + */ + @java.lang.Override + public com.google.appengine.v1.AuthFailAction getAuthFailAction() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.AuthFailAction result = + com.google.appengine.v1.AuthFailAction.valueOf(authFailAction_); + return result == null ? com.google.appengine.v1.AuthFailAction.UNRECOGNIZED : result; + } + + public static final int LOGIN_FIELD_NUMBER = 2; + private int login_; + /** + * + * + *
+   * Level of login required to access this resource. Defaults to
+   * `optional`.
+   * 
+ * + * .google.appengine.v1.LoginRequirement login = 2; + * + * @return The enum numeric value on the wire for login. + */ + @java.lang.Override + public int getLoginValue() { + return login_; + } + /** + * + * + *
+   * Level of login required to access this resource. Defaults to
+   * `optional`.
+   * 
+ * + * .google.appengine.v1.LoginRequirement login = 2; + * + * @return The login. + */ + @java.lang.Override + public com.google.appengine.v1.LoginRequirement getLogin() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.LoginRequirement result = + com.google.appengine.v1.LoginRequirement.valueOf(login_); + return result == null ? com.google.appengine.v1.LoginRequirement.UNRECOGNIZED : result; + } + + public static final int SCRIPT_FIELD_NUMBER = 3; + private volatile java.lang.Object script_; + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script = 3; + * + * @return The script. + */ + @java.lang.Override + public java.lang.String getScript() { + java.lang.Object ref = script_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + script_ = s; + return s; + } + } + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script = 3; + * + * @return The bytes for script. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScriptBytes() { + java.lang.Object ref = script_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + script_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECURITY_LEVEL_FIELD_NUMBER = 4; + private int securityLevel_; + /** + * + * + *
+   * Security (HTTPS) enforcement for this URL.
+   * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 4; + * + * @return The enum numeric value on the wire for securityLevel. + */ + @java.lang.Override + public int getSecurityLevelValue() { + return securityLevel_; + } + /** + * + * + *
+   * Security (HTTPS) enforcement for this URL.
+   * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 4; + * + * @return The securityLevel. + */ + @java.lang.Override + public com.google.appengine.v1.SecurityLevel getSecurityLevel() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.SecurityLevel result = + com.google.appengine.v1.SecurityLevel.valueOf(securityLevel_); + return result == null ? com.google.appengine.v1.SecurityLevel.UNRECOGNIZED : result; + } + + public static final int URL_FIELD_NUMBER = 5; + private volatile java.lang.Object url_; + /** + * + * + *
+   * URL to serve the endpoint at.
+   * 
+ * + * string url = 5; + * + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + * + * + *
+   * URL to serve the endpoint at.
+   * 
+ * + * string url = 5; + * + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = 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 (authFailAction_ + != com.google.appengine.v1.AuthFailAction.AUTH_FAIL_ACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(1, authFailAction_); + } + if (login_ != com.google.appengine.v1.LoginRequirement.LOGIN_UNSPECIFIED.getNumber()) { + output.writeEnum(2, login_); + } + if (!getScriptBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, script_); + } + if (securityLevel_ != com.google.appengine.v1.SecurityLevel.SECURE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, securityLevel_); + } + if (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, url_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (authFailAction_ + != com.google.appengine.v1.AuthFailAction.AUTH_FAIL_ACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, authFailAction_); + } + if (login_ != com.google.appengine.v1.LoginRequirement.LOGIN_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, login_); + } + if (!getScriptBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, script_); + } + if (securityLevel_ != com.google.appengine.v1.SecurityLevel.SECURE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, securityLevel_); + } + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, url_); + } + 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.appengine.v1.ApiConfigHandler)) { + return super.equals(obj); + } + com.google.appengine.v1.ApiConfigHandler other = (com.google.appengine.v1.ApiConfigHandler) obj; + + if (authFailAction_ != other.authFailAction_) return false; + if (login_ != other.login_) return false; + if (!getScript().equals(other.getScript())) return false; + if (securityLevel_ != other.securityLevel_) return false; + if (!getUrl().equals(other.getUrl())) 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) + AUTH_FAIL_ACTION_FIELD_NUMBER; + hash = (53 * hash) + authFailAction_; + hash = (37 * hash) + LOGIN_FIELD_NUMBER; + hash = (53 * hash) + login_; + hash = (37 * hash) + SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getScript().hashCode(); + hash = (37 * hash) + SECURITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + securityLevel_; + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ApiConfigHandler parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ApiConfigHandler parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ApiConfigHandler parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ApiConfigHandler 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.appengine.v1.ApiConfigHandler parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ApiConfigHandler parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ApiConfigHandler parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ApiConfigHandler 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.appengine.v1.ApiConfigHandler parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ApiConfigHandler 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.appengine.v1.ApiConfigHandler parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ApiConfigHandler 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.appengine.v1.ApiConfigHandler 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; + } + /** + * + * + *
+   * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/)
+   * configuration for API handlers.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ApiConfigHandler} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ApiConfigHandler) + com.google.appengine.v1.ApiConfigHandlerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiConfigHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiConfigHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ApiConfigHandler.class, + com.google.appengine.v1.ApiConfigHandler.Builder.class); + } + + // Construct using com.google.appengine.v1.ApiConfigHandler.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(); + authFailAction_ = 0; + + login_ = 0; + + script_ = ""; + + securityLevel_ = 0; + + url_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiConfigHandler_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ApiConfigHandler getDefaultInstanceForType() { + return com.google.appengine.v1.ApiConfigHandler.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ApiConfigHandler build() { + com.google.appengine.v1.ApiConfigHandler result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ApiConfigHandler buildPartial() { + com.google.appengine.v1.ApiConfigHandler result = + new com.google.appengine.v1.ApiConfigHandler(this); + result.authFailAction_ = authFailAction_; + result.login_ = login_; + result.script_ = script_; + result.securityLevel_ = securityLevel_; + result.url_ = url_; + 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.appengine.v1.ApiConfigHandler) { + return mergeFrom((com.google.appengine.v1.ApiConfigHandler) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ApiConfigHandler other) { + if (other == com.google.appengine.v1.ApiConfigHandler.getDefaultInstance()) return this; + if (other.authFailAction_ != 0) { + setAuthFailActionValue(other.getAuthFailActionValue()); + } + if (other.login_ != 0) { + setLoginValue(other.getLoginValue()); + } + if (!other.getScript().isEmpty()) { + script_ = other.script_; + onChanged(); + } + if (other.securityLevel_ != 0) { + setSecurityLevelValue(other.getSecurityLevelValue()); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + 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.appengine.v1.ApiConfigHandler parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ApiConfigHandler) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int authFailAction_ = 0; + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 1; + * + * @return The enum numeric value on the wire for authFailAction. + */ + @java.lang.Override + public int getAuthFailActionValue() { + return authFailAction_; + } + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 1; + * + * @param value The enum numeric value on the wire for authFailAction to set. + * @return This builder for chaining. + */ + public Builder setAuthFailActionValue(int value) { + + authFailAction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 1; + * + * @return The authFailAction. + */ + @java.lang.Override + public com.google.appengine.v1.AuthFailAction getAuthFailAction() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.AuthFailAction result = + com.google.appengine.v1.AuthFailAction.valueOf(authFailAction_); + return result == null ? com.google.appengine.v1.AuthFailAction.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 1; + * + * @param value The authFailAction to set. + * @return This builder for chaining. + */ + public Builder setAuthFailAction(com.google.appengine.v1.AuthFailAction value) { + if (value == null) { + throw new NullPointerException(); + } + + authFailAction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 1; + * + * @return This builder for chaining. + */ + public Builder clearAuthFailAction() { + + authFailAction_ = 0; + onChanged(); + return this; + } + + private int login_ = 0; + /** + * + * + *
+     * Level of login required to access this resource. Defaults to
+     * `optional`.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 2; + * + * @return The enum numeric value on the wire for login. + */ + @java.lang.Override + public int getLoginValue() { + return login_; + } + /** + * + * + *
+     * Level of login required to access this resource. Defaults to
+     * `optional`.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 2; + * + * @param value The enum numeric value on the wire for login to set. + * @return This builder for chaining. + */ + public Builder setLoginValue(int value) { + + login_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Level of login required to access this resource. Defaults to
+     * `optional`.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 2; + * + * @return The login. + */ + @java.lang.Override + public com.google.appengine.v1.LoginRequirement getLogin() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.LoginRequirement result = + com.google.appengine.v1.LoginRequirement.valueOf(login_); + return result == null ? com.google.appengine.v1.LoginRequirement.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Level of login required to access this resource. Defaults to
+     * `optional`.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 2; + * + * @param value The login to set. + * @return This builder for chaining. + */ + public Builder setLogin(com.google.appengine.v1.LoginRequirement value) { + if (value == null) { + throw new NullPointerException(); + } + + login_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Level of login required to access this resource. Defaults to
+     * `optional`.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 2; + * + * @return This builder for chaining. + */ + public Builder clearLogin() { + + login_ = 0; + onChanged(); + return this; + } + + private java.lang.Object script_ = ""; + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script = 3; + * + * @return The script. + */ + public java.lang.String getScript() { + java.lang.Object ref = script_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + script_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script = 3; + * + * @return The bytes for script. + */ + public com.google.protobuf.ByteString getScriptBytes() { + java.lang.Object ref = script_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + script_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script = 3; + * + * @param value The script to set. + * @return This builder for chaining. + */ + public Builder setScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + script_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script = 3; + * + * @return This builder for chaining. + */ + public Builder clearScript() { + + script_ = getDefaultInstance().getScript(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script = 3; + * + * @param value The bytes for script to set. + * @return This builder for chaining. + */ + public Builder setScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + script_ = value; + onChanged(); + return this; + } + + private int securityLevel_ = 0; + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 4; + * + * @return The enum numeric value on the wire for securityLevel. + */ + @java.lang.Override + public int getSecurityLevelValue() { + return securityLevel_; + } + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 4; + * + * @param value The enum numeric value on the wire for securityLevel to set. + * @return This builder for chaining. + */ + public Builder setSecurityLevelValue(int value) { + + securityLevel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 4; + * + * @return The securityLevel. + */ + @java.lang.Override + public com.google.appengine.v1.SecurityLevel getSecurityLevel() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.SecurityLevel result = + com.google.appengine.v1.SecurityLevel.valueOf(securityLevel_); + return result == null ? com.google.appengine.v1.SecurityLevel.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 4; + * + * @param value The securityLevel to set. + * @return This builder for chaining. + */ + public Builder setSecurityLevel(com.google.appengine.v1.SecurityLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + securityLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 4; + * + * @return This builder for chaining. + */ + public Builder clearSecurityLevel() { + + securityLevel_ = 0; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + * + * + *
+     * URL to serve the endpoint at.
+     * 
+ * + * string url = 5; + * + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URL to serve the endpoint at.
+     * 
+ * + * string url = 5; + * + * @return The bytes for url. + */ + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URL to serve the endpoint at.
+     * 
+ * + * string url = 5; + * + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URL to serve the endpoint at.
+     * 
+ * + * string url = 5; + * + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + * + * + *
+     * URL to serve the endpoint at.
+     * 
+ * + * string url = 5; + * + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = 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.appengine.v1.ApiConfigHandler) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ApiConfigHandler) + private static final com.google.appengine.v1.ApiConfigHandler DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ApiConfigHandler(); + } + + public static com.google.appengine.v1.ApiConfigHandler getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiConfigHandler parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiConfigHandler(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.appengine.v1.ApiConfigHandler getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiConfigHandlerOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiConfigHandlerOrBuilder.java new file mode 100644 index 00000000..a04991c3 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiConfigHandlerOrBuilder.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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface ApiConfigHandlerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ApiConfigHandler) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Action to take when users access resources that require
+   * authentication. Defaults to `redirect`.
+   * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 1; + * + * @return The enum numeric value on the wire for authFailAction. + */ + int getAuthFailActionValue(); + /** + * + * + *
+   * Action to take when users access resources that require
+   * authentication. Defaults to `redirect`.
+   * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 1; + * + * @return The authFailAction. + */ + com.google.appengine.v1.AuthFailAction getAuthFailAction(); + + /** + * + * + *
+   * Level of login required to access this resource. Defaults to
+   * `optional`.
+   * 
+ * + * .google.appengine.v1.LoginRequirement login = 2; + * + * @return The enum numeric value on the wire for login. + */ + int getLoginValue(); + /** + * + * + *
+   * Level of login required to access this resource. Defaults to
+   * `optional`.
+   * 
+ * + * .google.appengine.v1.LoginRequirement login = 2; + * + * @return The login. + */ + com.google.appengine.v1.LoginRequirement getLogin(); + + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script = 3; + * + * @return The script. + */ + java.lang.String getScript(); + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script = 3; + * + * @return The bytes for script. + */ + com.google.protobuf.ByteString getScriptBytes(); + + /** + * + * + *
+   * Security (HTTPS) enforcement for this URL.
+   * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 4; + * + * @return The enum numeric value on the wire for securityLevel. + */ + int getSecurityLevelValue(); + /** + * + * + *
+   * Security (HTTPS) enforcement for this URL.
+   * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 4; + * + * @return The securityLevel. + */ + com.google.appengine.v1.SecurityLevel getSecurityLevel(); + + /** + * + * + *
+   * URL to serve the endpoint at.
+   * 
+ * + * string url = 5; + * + * @return The url. + */ + java.lang.String getUrl(); + /** + * + * + *
+   * URL to serve the endpoint at.
+   * 
+ * + * string url = 5; + * + * @return The bytes for url. + */ + com.google.protobuf.ByteString getUrlBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiEndpointHandler.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiEndpointHandler.java new file mode 100644 index 00000000..f0a9800a --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiEndpointHandler.java @@ -0,0 +1,634 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Uses Google Cloud Endpoints to handle requests.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ApiEndpointHandler} + */ +public final class ApiEndpointHandler extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ApiEndpointHandler) + ApiEndpointHandlerOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiEndpointHandler.newBuilder() to construct. + private ApiEndpointHandler(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApiEndpointHandler() { + scriptPath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApiEndpointHandler(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ApiEndpointHandler( + 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(); + + scriptPath_ = 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiEndpointHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiEndpointHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ApiEndpointHandler.class, + com.google.appengine.v1.ApiEndpointHandler.Builder.class); + } + + public static final int SCRIPT_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object scriptPath_; + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script_path = 1; + * + * @return The scriptPath. + */ + @java.lang.Override + public java.lang.String getScriptPath() { + java.lang.Object ref = scriptPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scriptPath_ = s; + return s; + } + } + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script_path = 1; + * + * @return The bytes for scriptPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScriptPathBytes() { + java.lang.Object ref = scriptPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scriptPath_ = 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 (!getScriptPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scriptPath_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getScriptPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scriptPath_); + } + 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.appengine.v1.ApiEndpointHandler)) { + return super.equals(obj); + } + com.google.appengine.v1.ApiEndpointHandler other = + (com.google.appengine.v1.ApiEndpointHandler) obj; + + if (!getScriptPath().equals(other.getScriptPath())) 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) + SCRIPT_PATH_FIELD_NUMBER; + hash = (53 * hash) + getScriptPath().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ApiEndpointHandler parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ApiEndpointHandler parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ApiEndpointHandler parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ApiEndpointHandler 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.appengine.v1.ApiEndpointHandler parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ApiEndpointHandler parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ApiEndpointHandler parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ApiEndpointHandler 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.appengine.v1.ApiEndpointHandler parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ApiEndpointHandler 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.appengine.v1.ApiEndpointHandler parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ApiEndpointHandler 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.appengine.v1.ApiEndpointHandler 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; + } + /** + * + * + *
+   * Uses Google Cloud Endpoints to handle requests.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ApiEndpointHandler} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ApiEndpointHandler) + com.google.appengine.v1.ApiEndpointHandlerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiEndpointHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiEndpointHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ApiEndpointHandler.class, + com.google.appengine.v1.ApiEndpointHandler.Builder.class); + } + + // Construct using com.google.appengine.v1.ApiEndpointHandler.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(); + scriptPath_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ApiEndpointHandler_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ApiEndpointHandler getDefaultInstanceForType() { + return com.google.appengine.v1.ApiEndpointHandler.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ApiEndpointHandler build() { + com.google.appengine.v1.ApiEndpointHandler result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ApiEndpointHandler buildPartial() { + com.google.appengine.v1.ApiEndpointHandler result = + new com.google.appengine.v1.ApiEndpointHandler(this); + result.scriptPath_ = scriptPath_; + 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.appengine.v1.ApiEndpointHandler) { + return mergeFrom((com.google.appengine.v1.ApiEndpointHandler) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ApiEndpointHandler other) { + if (other == com.google.appengine.v1.ApiEndpointHandler.getDefaultInstance()) return this; + if (!other.getScriptPath().isEmpty()) { + scriptPath_ = other.scriptPath_; + 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.appengine.v1.ApiEndpointHandler parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ApiEndpointHandler) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object scriptPath_ = ""; + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @return The scriptPath. + */ + public java.lang.String getScriptPath() { + java.lang.Object ref = scriptPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scriptPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @return The bytes for scriptPath. + */ + public com.google.protobuf.ByteString getScriptPathBytes() { + java.lang.Object ref = scriptPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scriptPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @param value The scriptPath to set. + * @return This builder for chaining. + */ + public Builder setScriptPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scriptPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearScriptPath() { + + scriptPath_ = getDefaultInstance().getScriptPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @param value The bytes for scriptPath to set. + * @return This builder for chaining. + */ + public Builder setScriptPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scriptPath_ = 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.appengine.v1.ApiEndpointHandler) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ApiEndpointHandler) + private static final com.google.appengine.v1.ApiEndpointHandler DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ApiEndpointHandler(); + } + + public static com.google.appengine.v1.ApiEndpointHandler getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiEndpointHandler parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiEndpointHandler(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.appengine.v1.ApiEndpointHandler getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiEndpointHandlerOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiEndpointHandlerOrBuilder.java new file mode 100644 index 00000000..b9160aaf --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApiEndpointHandlerOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface ApiEndpointHandlerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ApiEndpointHandler) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script_path = 1; + * + * @return The scriptPath. + */ + java.lang.String getScriptPath(); + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script_path = 1; + * + * @return The bytes for scriptPath. + */ + com.google.protobuf.ByteString getScriptPathBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AppYamlProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AppYamlProto.java new file mode 100644 index 00000000..baf79907 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AppYamlProto.java @@ -0,0 +1,293 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public final class AppYamlProto { + private AppYamlProto() {} + + 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_appengine_v1_ApiConfigHandler_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ApiConfigHandler_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_ErrorHandler_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ErrorHandler_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_UrlMap_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_UrlMap_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_StaticFilesHandler_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_StaticFilesHandler_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_StaticFilesHandler_HttpHeadersEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_StaticFilesHandler_HttpHeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_ScriptHandler_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ScriptHandler_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_ApiEndpointHandler_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ApiEndpointHandler_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_HealthCheck_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_HealthCheck_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_ReadinessCheck_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ReadinessCheck_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_LivenessCheck_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_LivenessCheck_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Library_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Library_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/appengine/v1/app_yaml.proto\022\023go" + + "ogle.appengine.v1\032\036google/protobuf/durat" + + "ion.proto\032\034google/api/annotations.proto\"" + + "\340\001\n\020ApiConfigHandler\022=\n\020auth_fail_action" + + "\030\001 \001(\0162#.google.appengine.v1.AuthFailAct" + + "ion\0224\n\005login\030\002 \001(\0162%.google.appengine.v1" + + ".LoginRequirement\022\016\n\006script\030\003 \001(\t\022:\n\016sec" + + "urity_level\030\004 \001(\0162\".google.appengine.v1." + + "SecurityLevel\022\013\n\003url\030\005 \001(\t\"\217\002\n\014ErrorHand" + + "ler\022?\n\nerror_code\030\001 \001(\0162+.google.appengi" + + "ne.v1.ErrorHandler.ErrorCode\022\023\n\013static_f" + + "ile\030\002 \001(\t\022\021\n\tmime_type\030\003 \001(\t\"\225\001\n\tErrorCo" + + "de\022\032\n\026ERROR_CODE_UNSPECIFIED\020\000\022\026\n\022ERROR_" + + "CODE_DEFAULT\020\000\022\031\n\025ERROR_CODE_OVER_QUOTA\020" + + "\001\022\035\n\031ERROR_CODE_DOS_API_DENIAL\020\002\022\026\n\022ERRO" + + "R_CODE_TIMEOUT\020\003\032\002\020\001\"\315\005\n\006UrlMap\022\021\n\turl_r" + + "egex\030\001 \001(\t\022?\n\014static_files\030\002 \001(\0132\'.googl" + + "e.appengine.v1.StaticFilesHandlerH\000\0224\n\006s" + + "cript\030\003 \001(\0132\".google.appengine.v1.Script" + + "HandlerH\000\022?\n\014api_endpoint\030\004 \001(\0132\'.google" + + ".appengine.v1.ApiEndpointHandlerH\000\022:\n\016se" + + "curity_level\030\005 \001(\0162\".google.appengine.v1" + + ".SecurityLevel\0224\n\005login\030\006 \001(\0162%.google.a" + + "ppengine.v1.LoginRequirement\022=\n\020auth_fai" + + "l_action\030\007 \001(\0162#.google.appengine.v1.Aut" + + "hFailAction\022Y\n\033redirect_http_response_co" + + "de\030\010 \001(\01624.google.appengine.v1.UrlMap.Re" + + "directHttpResponseCode\"\333\001\n\030RedirectHttpR" + + "esponseCode\022+\n\'REDIRECT_HTTP_RESPONSE_CO" + + "DE_UNSPECIFIED\020\000\022#\n\037REDIRECT_HTTP_RESPON" + + "SE_CODE_301\020\001\022#\n\037REDIRECT_HTTP_RESPONSE_" + + "CODE_302\020\002\022#\n\037REDIRECT_HTTP_RESPONSE_COD" + + "E_303\020\003\022#\n\037REDIRECT_HTTP_RESPONSE_CODE_3" + + "07\020\004B\016\n\014handler_type\"\300\002\n\022StaticFilesHand" + + "ler\022\014\n\004path\030\001 \001(\t\022\031\n\021upload_path_regex\030\002" + + " \001(\t\022N\n\014http_headers\030\003 \003(\01328.google.appe" + + "ngine.v1.StaticFilesHandler.HttpHeadersE" + + "ntry\022\021\n\tmime_type\030\004 \001(\t\022-\n\nexpiration\030\005 " + + "\001(\0132\031.google.protobuf.Duration\022\035\n\025requir" + + "e_matching_file\030\006 \001(\010\022\034\n\024application_rea" + + "dable\030\007 \001(\010\0322\n\020HttpHeadersEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"$\n\rScriptHandler" + + "\022\023\n\013script_path\030\001 \001(\t\")\n\022ApiEndpointHand" + + "ler\022\023\n\013script_path\030\001 \001(\t\"\353\001\n\013HealthCheck" + + "\022\034\n\024disable_health_check\030\001 \001(\010\022\014\n\004host\030\002" + + " \001(\t\022\031\n\021healthy_threshold\030\003 \001(\r\022\033\n\023unhea" + + "lthy_threshold\030\004 \001(\r\022\031\n\021restart_threshol" + + "d\030\005 \001(\r\0221\n\016check_interval\030\006 \001(\0132\031.google" + + ".protobuf.Duration\022*\n\007timeout\030\007 \001(\0132\031.go" + + "ogle.protobuf.Duration\"\367\001\n\016ReadinessChec" + + "k\022\014\n\004path\030\001 \001(\t\022\014\n\004host\030\002 \001(\t\022\031\n\021failure" + + "_threshold\030\003 \001(\r\022\031\n\021success_threshold\030\004 " + + "\001(\r\0221\n\016check_interval\030\005 \001(\0132\031.google.pro" + + "tobuf.Duration\022*\n\007timeout\030\006 \001(\0132\031.google" + + ".protobuf.Duration\0224\n\021app_start_timeout\030" + + "\007 \001(\0132\031.google.protobuf.Duration\"\362\001\n\rLiv" + + "enessCheck\022\014\n\004path\030\001 \001(\t\022\014\n\004host\030\002 \001(\t\022\031" + + "\n\021failure_threshold\030\003 \001(\r\022\031\n\021success_thr" + + "eshold\030\004 \001(\r\0221\n\016check_interval\030\005 \001(\0132\031.g" + + "oogle.protobuf.Duration\022*\n\007timeout\030\006 \001(\013" + + "2\031.google.protobuf.Duration\0220\n\rinitial_d" + + "elay\030\007 \001(\0132\031.google.protobuf.Duration\"(\n" + + "\007Library\022\014\n\004name\030\001 \001(\t\022\017\n\007version\030\002 \001(\t*" + + "t\n\016AuthFailAction\022 \n\034AUTH_FAIL_ACTION_UN" + + "SPECIFIED\020\000\022\035\n\031AUTH_FAIL_ACTION_REDIRECT" + + "\020\001\022!\n\035AUTH_FAIL_ACTION_UNAUTHORIZED\020\002*b\n" + + "\020LoginRequirement\022\025\n\021LOGIN_UNSPECIFIED\020\000" + + "\022\022\n\016LOGIN_OPTIONAL\020\001\022\017\n\013LOGIN_ADMIN\020\002\022\022\n" + + "\016LOGIN_REQUIRED\020\003*y\n\rSecurityLevel\022\026\n\022SE" + + "CURE_UNSPECIFIED\020\000\022\022\n\016SECURE_DEFAULT\020\000\022\020" + + "\n\014SECURE_NEVER\020\001\022\023\n\017SECURE_OPTIONAL\020\002\022\021\n" + + "\rSECURE_ALWAYS\020\003\032\002\020\001B\276\001\n\027com.google.appe" + + "ngine.v1B\014AppYamlProtoP\001Z\"9/" + + "v1/{name=apps/*/services/*/versions/*/in" + + "stances/*}:debug:\001*\312A\037\n\010Instance\022\023Operat" + + "ionMetadataV1\032\266\001\312A\030appengine.googleapis." + + "com\322A\227\001https://www.googleapis.com/auth/a" + + "ppengine.admin,https://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/cloud-platform.read-only2\226" + + "\t\n\010Firewall\022\242\001\n\020ListIngressRules\022,.googl" + + "e.appengine.v1.ListIngressRulesRequest\032-" + + ".google.appengine.v1.ListIngressRulesRes" + + "ponse\"1\202\323\344\223\002+\022)/v1/{parent=apps/*}/firew" + + "all/ingressRules\022\304\001\n\027BatchUpdateIngressR" + + "ules\0223.google.appengine.v1.BatchUpdateIn" + + "gressRulesRequest\0324.google.appengine.v1." + + "BatchUpdateIngressRulesResponse\">\202\323\344\223\0028\"" + + "3/v1/{name=apps/*/firewall/ingressRules}" + + ":batchUpdate:\001*\022\236\001\n\021CreateIngressRule\022-." + + "google.appengine.v1.CreateIngressRuleReq" + + "uest\032!.google.appengine.v1.FirewallRule\"" + + "7\202\323\344\223\0021\")/v1/{parent=apps/*}/firewall/in" + + "gressRules:\004rule\022\222\001\n\016GetIngressRule\022*.go" + + "ogle.appengine.v1.GetIngressRuleRequest\032" + + "!.google.appengine.v1.FirewallRule\"1\202\323\344\223" + + "\002+\022)/v1/{name=apps/*/firewall/ingressRul" + + "es/*}\022\236\001\n\021UpdateIngressRule\022-.google.app" + + "engine.v1.UpdateIngressRuleRequest\032!.goo" + + "gle.appengine.v1.FirewallRule\"7\202\323\344\223\00212)/" + + "v1/{name=apps/*/firewall/ingressRules/*}" + + ":\004rule\022\215\001\n\021DeleteIngressRule\022-.google.ap" + + "pengine.v1.DeleteIngressRuleRequest\032\026.go" + + "ogle.protobuf.Empty\"1\202\323\344\223\002+*)/v1/{name=a" + + "pps/*/firewall/ingressRules/*}\032\266\001\312A\030appe" + + "ngine.googleapis.com\322A\227\001https://www.goog" + + "leapis.com/auth/appengine.admin,https://" + + "www.googleapis.com/auth/cloud-platform,h" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tform.read-only2\374\002\n\021AuthorizedDomains\022\255\001" + + "\n\025ListAuthorizedDomains\0221.google.appengi" + + "ne.v1.ListAuthorizedDomainsRequest\0322.goo" + + "gle.appengine.v1.ListAuthorizedDomainsRe" + + "sponse\"-\202\323\344\223\002\'\022%/v1/{parent=apps/*}/auth" + + "orizedDomains\032\266\001\312A\030appengine.googleapis." + + "com\322A\227\001https://www.googleapis.com/auth/a" + + "ppengine.admin,https://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/cloud-platform.read-only2\371" + + "\010\n\026AuthorizedCertificates\022\301\001\n\032ListAuthor" + + "izedCertificates\0226.google.appengine.v1.L" + + "istAuthorizedCertificatesRequest\0327.googl" + + "e.appengine.v1.ListAuthorizedCertificate" + + "sResponse\"2\202\323\344\223\002,\022*/v1/{parent=apps/*}/a" + + "uthorizedCertificates\022\260\001\n\030GetAuthorizedC" + + "ertificate\0224.google.appengine.v1.GetAuth" + + "orizedCertificateRequest\032*.google.appeng" + + "ine.v1.AuthorizedCertificate\"2\202\323\344\223\002,\022*/v" + + "1/{name=apps/*/authorizedCertificates/*}" + + "\022\303\001\n\033CreateAuthorizedCertificate\0227.googl" + + "e.appengine.v1.CreateAuthorizedCertifica" + + "teRequest\032*.google.appengine.v1.Authoriz" + + "edCertificate\"?\202\323\344\223\0029\"*/v1/{parent=apps/" + + "*}/authorizedCertificates:\013certificate\022\303" + + "\001\n\033UpdateAuthorizedCertificate\0227.google." + + "appengine.v1.UpdateAuthorizedCertificate" + + "Request\032*.google.appengine.v1.Authorized" + + "Certificate\"?\202\323\344\223\00292*/v1/{name=apps/*/au" + + "thorizedCertificates/*}:\013certificate\022\242\001\n" + + "\033DeleteAuthorizedCertificate\0227.google.ap" + + "pengine.v1.DeleteAuthorizedCertificateRe" + + "quest\032\026.google.protobuf.Empty\"2\202\323\344\223\002,**/" + + "v1/{name=apps/*/authorizedCertificates/*" + + "}\032\266\001\312A\030appengine.googleapis.com\322A\227\001https" + + "://www.googleapis.com/auth/appengine.adm" + + "in,https://www.googleapis.com/auth/cloud" + + "-platform,https://www.googleapis.com/aut" + + "h/cloud-platform.read-only2\331\010\n\016DomainMap" + + "pings\022\241\001\n\022ListDomainMappings\022..google.ap" + + "pengine.v1.ListDomainMappingsRequest\032/.g" + + "oogle.appengine.v1.ListDomainMappingsRes" + + "ponse\"*\202\323\344\223\002$\022\"/v1/{parent=apps/*}/domai" + + "nMappings\022\220\001\n\020GetDomainMapping\022,.google." + + "appengine.v1.GetDomainMappingRequest\032\".g" + + "oogle.appengine.v1.DomainMapping\"*\202\323\344\223\002$" + + "\022\"/v1/{name=apps/*/domainMappings/*}\022\310\001\n" + + "\023CreateDomainMapping\022/.google.appengine." + + "v1.CreateDomainMappingRequest\032\035.google.l" + + "ongrunning.Operation\"a\202\323\344\223\0024\"\"/v1/{paren" + + "t=apps/*}/domainMappings:\016domain_mapping" + + "\312A$\n\rDomainMapping\022\023OperationMetadataV1\022" + + "\310\001\n\023UpdateDomainMapping\022/.google.appengi" + + "ne.v1.UpdateDomainMappingRequest\032\035.googl" + + "e.longrunning.Operation\"a\202\323\344\223\00242\"/v1/{na" + + "me=apps/*/domainMappings/*}:\016domain_mapp" + + "ing\312A$\n\rDomainMapping\022\023OperationMetadata" + + "V1\022\300\001\n\023DeleteDomainMapping\022/.google.appe" + + "ngine.v1.DeleteDomainMappingRequest\032\035.go" + + "ogle.longrunning.Operation\"Y\202\323\344\223\002$*\"/v1/" + + "{name=apps/*/domainMappings/*}\312A,\n\025googl" + + "e.protobuf.Empty\022\023OperationMetadataV1\032\266\001" + + "\312A\030appengine.googleapis.com\322A\227\001https://w" + + "ww.googleapis.com/auth/appengine.admin,h" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tform,https://www.googleapis.com/auth/cl" + + "oud-platform.read-onlyB\300\001\n\027com.google.ap" + + "pengine.v1B\016AppengineProtoP\001Z + * An Application resource contains the top-level configuration of an App + * Engine application. + * + * + * Protobuf type {@code google.appengine.v1.Application} + */ +public final class Application extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Application) + ApplicationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Application.newBuilder() to construct. + private Application(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Application() { + name_ = ""; + id_ = ""; + dispatchRules_ = java.util.Collections.emptyList(); + authDomain_ = ""; + locationId_ = ""; + codeBucket_ = ""; + servingStatus_ = 0; + defaultHostname_ = ""; + defaultBucket_ = ""; + gcrDomain_ = ""; + databaseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Application(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Application( + 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(); + + id_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dispatchRules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dispatchRules_.add( + input.readMessage( + com.google.appengine.v1.UrlDispatchRule.parser(), extensionRegistry)); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + authDomain_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + codeBucket_ = s; + break; + } + case 74: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (defaultCookieExpiration_ != null) { + subBuilder = defaultCookieExpiration_.toBuilder(); + } + defaultCookieExpiration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(defaultCookieExpiration_); + defaultCookieExpiration_ = subBuilder.buildPartial(); + } + + break; + } + case 80: + { + int rawValue = input.readEnum(); + + servingStatus_ = rawValue; + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + defaultHostname_ = s; + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + defaultBucket_ = s; + break; + } + case 114: + { + com.google.appengine.v1.Application.IdentityAwareProxy.Builder subBuilder = null; + if (iap_ != null) { + subBuilder = iap_.toBuilder(); + } + iap_ = + input.readMessage( + com.google.appengine.v1.Application.IdentityAwareProxy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(iap_); + iap_ = subBuilder.buildPartial(); + } + + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + gcrDomain_ = s; + break; + } + case 136: + { + int rawValue = input.readEnum(); + + databaseType_ = rawValue; + break; + } + case 146: + { + com.google.appengine.v1.Application.FeatureSettings.Builder subBuilder = null; + if (featureSettings_ != null) { + subBuilder = featureSettings_.toBuilder(); + } + featureSettings_ = + input.readMessage( + com.google.appengine.v1.Application.FeatureSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(featureSettings_); + featureSettings_ = 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)) { + dispatchRules_ = java.util.Collections.unmodifiableList(dispatchRules_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Application.class, + com.google.appengine.v1.Application.Builder.class); + } + + /** Protobuf enum {@code google.appengine.v1.Application.ServingStatus} */ + public enum ServingStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Serving status is unspecified.
+     * 
+ * + * UNSPECIFIED = 0; + */ + UNSPECIFIED(0), + /** + * + * + *
+     * Application is serving.
+     * 
+ * + * SERVING = 1; + */ + SERVING(1), + /** + * + * + *
+     * Application has been disabled by the user.
+     * 
+ * + * USER_DISABLED = 2; + */ + USER_DISABLED(2), + /** + * + * + *
+     * Application has been disabled by the system.
+     * 
+ * + * SYSTEM_DISABLED = 3; + */ + SYSTEM_DISABLED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Serving status is unspecified.
+     * 
+ * + * UNSPECIFIED = 0; + */ + public static final int UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Application is serving.
+     * 
+ * + * SERVING = 1; + */ + public static final int SERVING_VALUE = 1; + /** + * + * + *
+     * Application has been disabled by the user.
+     * 
+ * + * USER_DISABLED = 2; + */ + public static final int USER_DISABLED_VALUE = 2; + /** + * + * + *
+     * Application has been disabled by the system.
+     * 
+ * + * SYSTEM_DISABLED = 3; + */ + public static final int SYSTEM_DISABLED_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 ServingStatus 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 ServingStatus forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED; + case 1: + return SERVING; + case 2: + return USER_DISABLED; + case 3: + return SYSTEM_DISABLED; + 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 ServingStatus findValueByNumber(int number) { + return ServingStatus.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.appengine.v1.Application.getDescriptor().getEnumTypes().get(0); + } + + private static final ServingStatus[] VALUES = values(); + + public static ServingStatus 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 ServingStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.Application.ServingStatus) + } + + /** Protobuf enum {@code google.appengine.v1.Application.DatabaseType} */ + public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Database type is unspecified.
+     * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + DATABASE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Cloud Datastore
+     * 
+ * + * CLOUD_DATASTORE = 1; + */ + CLOUD_DATASTORE(1), + /** + * + * + *
+     * Cloud Firestore Native
+     * 
+ * + * CLOUD_FIRESTORE = 2; + */ + CLOUD_FIRESTORE(2), + /** + * + * + *
+     * Cloud Firestore in Datastore Mode
+     * 
+ * + * CLOUD_DATASTORE_COMPATIBILITY = 3; + */ + CLOUD_DATASTORE_COMPATIBILITY(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Database type is unspecified.
+     * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Cloud Datastore
+     * 
+ * + * CLOUD_DATASTORE = 1; + */ + public static final int CLOUD_DATASTORE_VALUE = 1; + /** + * + * + *
+     * Cloud Firestore Native
+     * 
+ * + * CLOUD_FIRESTORE = 2; + */ + public static final int CLOUD_FIRESTORE_VALUE = 2; + /** + * + * + *
+     * Cloud Firestore in Datastore Mode
+     * 
+ * + * CLOUD_DATASTORE_COMPATIBILITY = 3; + */ + public static final int CLOUD_DATASTORE_COMPATIBILITY_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 DatabaseType 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 DatabaseType forNumber(int value) { + switch (value) { + case 0: + return DATABASE_TYPE_UNSPECIFIED; + case 1: + return CLOUD_DATASTORE; + case 2: + return CLOUD_FIRESTORE; + case 3: + return CLOUD_DATASTORE_COMPATIBILITY; + 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 DatabaseType findValueByNumber(int number) { + return DatabaseType.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.appengine.v1.Application.getDescriptor().getEnumTypes().get(1); + } + + private static final DatabaseType[] VALUES = values(); + + public static DatabaseType 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 DatabaseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.Application.DatabaseType) + } + + public interface IdentityAwareProxyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Application.IdentityAwareProxy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Whether the serving infrastructure will authenticate and
+     * authorize all incoming requests.
+     * If true, the `oauth2_client_id` and `oauth2_client_secret`
+     * fields must be non-empty.
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + boolean getEnabled(); + + /** + * + * + *
+     * OAuth2 client ID to use for the authentication flow.
+     * 
+ * + * string oauth2_client_id = 2; + * + * @return The oauth2ClientId. + */ + java.lang.String getOauth2ClientId(); + /** + * + * + *
+     * OAuth2 client ID to use for the authentication flow.
+     * 
+ * + * string oauth2_client_id = 2; + * + * @return The bytes for oauth2ClientId. + */ + com.google.protobuf.ByteString getOauth2ClientIdBytes(); + + /** + * + * + *
+     * OAuth2 client secret to use for the authentication flow.
+     * For security reasons, this value cannot be retrieved via the API.
+     * Instead, the SHA-256 hash of the value is returned in the
+     * `oauth2_client_secret_sha256` field.
+     * @InputOnly
+     * 
+ * + * string oauth2_client_secret = 3; + * + * @return The oauth2ClientSecret. + */ + java.lang.String getOauth2ClientSecret(); + /** + * + * + *
+     * OAuth2 client secret to use for the authentication flow.
+     * For security reasons, this value cannot be retrieved via the API.
+     * Instead, the SHA-256 hash of the value is returned in the
+     * `oauth2_client_secret_sha256` field.
+     * @InputOnly
+     * 
+ * + * string oauth2_client_secret = 3; + * + * @return The bytes for oauth2ClientSecret. + */ + com.google.protobuf.ByteString getOauth2ClientSecretBytes(); + + /** + * + * + *
+     * Hex-encoded SHA-256 hash of the client secret.
+     * @OutputOnly
+     * 
+ * + * string oauth2_client_secret_sha256 = 4; + * + * @return The oauth2ClientSecretSha256. + */ + java.lang.String getOauth2ClientSecretSha256(); + /** + * + * + *
+     * Hex-encoded SHA-256 hash of the client secret.
+     * @OutputOnly
+     * 
+ * + * string oauth2_client_secret_sha256 = 4; + * + * @return The bytes for oauth2ClientSecretSha256. + */ + com.google.protobuf.ByteString getOauth2ClientSecretSha256Bytes(); + } + /** + * + * + *
+   * Identity-Aware Proxy
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Application.IdentityAwareProxy} + */ + public static final class IdentityAwareProxy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Application.IdentityAwareProxy) + IdentityAwareProxyOrBuilder { + private static final long serialVersionUID = 0L; + // Use IdentityAwareProxy.newBuilder() to construct. + private IdentityAwareProxy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IdentityAwareProxy() { + oauth2ClientId_ = ""; + oauth2ClientSecret_ = ""; + oauth2ClientSecretSha256_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IdentityAwareProxy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IdentityAwareProxy( + 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: + { + enabled_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + oauth2ClientId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + oauth2ClientSecret_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + oauth2ClientSecretSha256_ = 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.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_IdentityAwareProxy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_IdentityAwareProxy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Application.IdentityAwareProxy.class, + com.google.appengine.v1.Application.IdentityAwareProxy.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_; + /** + * + * + *
+     * Whether the serving infrastructure will authenticate and
+     * authorize all incoming requests.
+     * If true, the `oauth2_client_id` and `oauth2_client_secret`
+     * fields must be non-empty.
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + public static final int OAUTH2_CLIENT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object oauth2ClientId_; + /** + * + * + *
+     * OAuth2 client ID to use for the authentication flow.
+     * 
+ * + * string oauth2_client_id = 2; + * + * @return The oauth2ClientId. + */ + @java.lang.Override + public java.lang.String getOauth2ClientId() { + java.lang.Object ref = oauth2ClientId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauth2ClientId_ = s; + return s; + } + } + /** + * + * + *
+     * OAuth2 client ID to use for the authentication flow.
+     * 
+ * + * string oauth2_client_id = 2; + * + * @return The bytes for oauth2ClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOauth2ClientIdBytes() { + java.lang.Object ref = oauth2ClientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauth2ClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OAUTH2_CLIENT_SECRET_FIELD_NUMBER = 3; + private volatile java.lang.Object oauth2ClientSecret_; + /** + * + * + *
+     * OAuth2 client secret to use for the authentication flow.
+     * For security reasons, this value cannot be retrieved via the API.
+     * Instead, the SHA-256 hash of the value is returned in the
+     * `oauth2_client_secret_sha256` field.
+     * @InputOnly
+     * 
+ * + * string oauth2_client_secret = 3; + * + * @return The oauth2ClientSecret. + */ + @java.lang.Override + public java.lang.String getOauth2ClientSecret() { + java.lang.Object ref = oauth2ClientSecret_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauth2ClientSecret_ = s; + return s; + } + } + /** + * + * + *
+     * OAuth2 client secret to use for the authentication flow.
+     * For security reasons, this value cannot be retrieved via the API.
+     * Instead, the SHA-256 hash of the value is returned in the
+     * `oauth2_client_secret_sha256` field.
+     * @InputOnly
+     * 
+ * + * string oauth2_client_secret = 3; + * + * @return The bytes for oauth2ClientSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOauth2ClientSecretBytes() { + java.lang.Object ref = oauth2ClientSecret_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauth2ClientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OAUTH2_CLIENT_SECRET_SHA256_FIELD_NUMBER = 4; + private volatile java.lang.Object oauth2ClientSecretSha256_; + /** + * + * + *
+     * Hex-encoded SHA-256 hash of the client secret.
+     * @OutputOnly
+     * 
+ * + * string oauth2_client_secret_sha256 = 4; + * + * @return The oauth2ClientSecretSha256. + */ + @java.lang.Override + public java.lang.String getOauth2ClientSecretSha256() { + java.lang.Object ref = oauth2ClientSecretSha256_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauth2ClientSecretSha256_ = s; + return s; + } + } + /** + * + * + *
+     * Hex-encoded SHA-256 hash of the client secret.
+     * @OutputOnly
+     * 
+ * + * string oauth2_client_secret_sha256 = 4; + * + * @return The bytes for oauth2ClientSecretSha256. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOauth2ClientSecretSha256Bytes() { + java.lang.Object ref = oauth2ClientSecretSha256_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauth2ClientSecretSha256_ = 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 (enabled_ != false) { + output.writeBool(1, enabled_); + } + if (!getOauth2ClientIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, oauth2ClientId_); + } + if (!getOauth2ClientSecretBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, oauth2ClientSecret_); + } + if (!getOauth2ClientSecretSha256Bytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, oauth2ClientSecretSha256_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); + } + if (!getOauth2ClientIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, oauth2ClientId_); + } + if (!getOauth2ClientSecretBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, oauth2ClientSecret_); + } + if (!getOauth2ClientSecretSha256Bytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(4, oauth2ClientSecretSha256_); + } + 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.appengine.v1.Application.IdentityAwareProxy)) { + return super.equals(obj); + } + com.google.appengine.v1.Application.IdentityAwareProxy other = + (com.google.appengine.v1.Application.IdentityAwareProxy) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (!getOauth2ClientId().equals(other.getOauth2ClientId())) return false; + if (!getOauth2ClientSecret().equals(other.getOauth2ClientSecret())) return false; + if (!getOauth2ClientSecretSha256().equals(other.getOauth2ClientSecretSha256())) 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) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + hash = (37 * hash) + OAUTH2_CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getOauth2ClientId().hashCode(); + hash = (37 * hash) + OAUTH2_CLIENT_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getOauth2ClientSecret().hashCode(); + hash = (37 * hash) + OAUTH2_CLIENT_SECRET_SHA256_FIELD_NUMBER; + hash = (53 * hash) + getOauth2ClientSecretSha256().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy 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.appengine.v1.Application.IdentityAwareProxy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy 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.appengine.v1.Application.IdentityAwareProxy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy 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.appengine.v1.Application.IdentityAwareProxy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy 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.appengine.v1.Application.IdentityAwareProxy 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; + } + /** + * + * + *
+     * Identity-Aware Proxy
+     * 
+ * + * Protobuf type {@code google.appengine.v1.Application.IdentityAwareProxy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Application.IdentityAwareProxy) + com.google.appengine.v1.Application.IdentityAwareProxyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_IdentityAwareProxy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_IdentityAwareProxy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Application.IdentityAwareProxy.class, + com.google.appengine.v1.Application.IdentityAwareProxy.Builder.class); + } + + // Construct using com.google.appengine.v1.Application.IdentityAwareProxy.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(); + enabled_ = false; + + oauth2ClientId_ = ""; + + oauth2ClientSecret_ = ""; + + oauth2ClientSecretSha256_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_IdentityAwareProxy_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Application.IdentityAwareProxy getDefaultInstanceForType() { + return com.google.appengine.v1.Application.IdentityAwareProxy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Application.IdentityAwareProxy build() { + com.google.appengine.v1.Application.IdentityAwareProxy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Application.IdentityAwareProxy buildPartial() { + com.google.appengine.v1.Application.IdentityAwareProxy result = + new com.google.appengine.v1.Application.IdentityAwareProxy(this); + result.enabled_ = enabled_; + result.oauth2ClientId_ = oauth2ClientId_; + result.oauth2ClientSecret_ = oauth2ClientSecret_; + result.oauth2ClientSecretSha256_ = oauth2ClientSecretSha256_; + 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.appengine.v1.Application.IdentityAwareProxy) { + return mergeFrom((com.google.appengine.v1.Application.IdentityAwareProxy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Application.IdentityAwareProxy other) { + if (other == com.google.appengine.v1.Application.IdentityAwareProxy.getDefaultInstance()) + return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + if (!other.getOauth2ClientId().isEmpty()) { + oauth2ClientId_ = other.oauth2ClientId_; + onChanged(); + } + if (!other.getOauth2ClientSecret().isEmpty()) { + oauth2ClientSecret_ = other.oauth2ClientSecret_; + onChanged(); + } + if (!other.getOauth2ClientSecretSha256().isEmpty()) { + oauth2ClientSecretSha256_ = other.oauth2ClientSecretSha256_; + 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.appengine.v1.Application.IdentityAwareProxy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.Application.IdentityAwareProxy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enabled_; + /** + * + * + *
+       * Whether the serving infrastructure will authenticate and
+       * authorize all incoming requests.
+       * If true, the `oauth2_client_id` and `oauth2_client_secret`
+       * fields must be non-empty.
+       * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * + * + *
+       * Whether the serving infrastructure will authenticate and
+       * authorize all incoming requests.
+       * If true, the `oauth2_client_id` and `oauth2_client_secret`
+       * fields must be non-empty.
+       * 
+ * + * bool enabled = 1; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the serving infrastructure will authenticate and
+       * authorize all incoming requests.
+       * If true, the `oauth2_client_id` and `oauth2_client_secret`
+       * fields must be non-empty.
+       * 
+ * + * bool enabled = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + + enabled_ = false; + onChanged(); + return this; + } + + private java.lang.Object oauth2ClientId_ = ""; + /** + * + * + *
+       * OAuth2 client ID to use for the authentication flow.
+       * 
+ * + * string oauth2_client_id = 2; + * + * @return The oauth2ClientId. + */ + public java.lang.String getOauth2ClientId() { + java.lang.Object ref = oauth2ClientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauth2ClientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * OAuth2 client ID to use for the authentication flow.
+       * 
+ * + * string oauth2_client_id = 2; + * + * @return The bytes for oauth2ClientId. + */ + public com.google.protobuf.ByteString getOauth2ClientIdBytes() { + java.lang.Object ref = oauth2ClientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauth2ClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * OAuth2 client ID to use for the authentication flow.
+       * 
+ * + * string oauth2_client_id = 2; + * + * @param value The oauth2ClientId to set. + * @return This builder for chaining. + */ + public Builder setOauth2ClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + oauth2ClientId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * OAuth2 client ID to use for the authentication flow.
+       * 
+ * + * string oauth2_client_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearOauth2ClientId() { + + oauth2ClientId_ = getDefaultInstance().getOauth2ClientId(); + onChanged(); + return this; + } + /** + * + * + *
+       * OAuth2 client ID to use for the authentication flow.
+       * 
+ * + * string oauth2_client_id = 2; + * + * @param value The bytes for oauth2ClientId to set. + * @return This builder for chaining. + */ + public Builder setOauth2ClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + oauth2ClientId_ = value; + onChanged(); + return this; + } + + private java.lang.Object oauth2ClientSecret_ = ""; + /** + * + * + *
+       * OAuth2 client secret to use for the authentication flow.
+       * For security reasons, this value cannot be retrieved via the API.
+       * Instead, the SHA-256 hash of the value is returned in the
+       * `oauth2_client_secret_sha256` field.
+       * @InputOnly
+       * 
+ * + * string oauth2_client_secret = 3; + * + * @return The oauth2ClientSecret. + */ + public java.lang.String getOauth2ClientSecret() { + java.lang.Object ref = oauth2ClientSecret_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauth2ClientSecret_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * OAuth2 client secret to use for the authentication flow.
+       * For security reasons, this value cannot be retrieved via the API.
+       * Instead, the SHA-256 hash of the value is returned in the
+       * `oauth2_client_secret_sha256` field.
+       * @InputOnly
+       * 
+ * + * string oauth2_client_secret = 3; + * + * @return The bytes for oauth2ClientSecret. + */ + public com.google.protobuf.ByteString getOauth2ClientSecretBytes() { + java.lang.Object ref = oauth2ClientSecret_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauth2ClientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * OAuth2 client secret to use for the authentication flow.
+       * For security reasons, this value cannot be retrieved via the API.
+       * Instead, the SHA-256 hash of the value is returned in the
+       * `oauth2_client_secret_sha256` field.
+       * @InputOnly
+       * 
+ * + * string oauth2_client_secret = 3; + * + * @param value The oauth2ClientSecret to set. + * @return This builder for chaining. + */ + public Builder setOauth2ClientSecret(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + oauth2ClientSecret_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * OAuth2 client secret to use for the authentication flow.
+       * For security reasons, this value cannot be retrieved via the API.
+       * Instead, the SHA-256 hash of the value is returned in the
+       * `oauth2_client_secret_sha256` field.
+       * @InputOnly
+       * 
+ * + * string oauth2_client_secret = 3; + * + * @return This builder for chaining. + */ + public Builder clearOauth2ClientSecret() { + + oauth2ClientSecret_ = getDefaultInstance().getOauth2ClientSecret(); + onChanged(); + return this; + } + /** + * + * + *
+       * OAuth2 client secret to use for the authentication flow.
+       * For security reasons, this value cannot be retrieved via the API.
+       * Instead, the SHA-256 hash of the value is returned in the
+       * `oauth2_client_secret_sha256` field.
+       * @InputOnly
+       * 
+ * + * string oauth2_client_secret = 3; + * + * @param value The bytes for oauth2ClientSecret to set. + * @return This builder for chaining. + */ + public Builder setOauth2ClientSecretBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + oauth2ClientSecret_ = value; + onChanged(); + return this; + } + + private java.lang.Object oauth2ClientSecretSha256_ = ""; + /** + * + * + *
+       * Hex-encoded SHA-256 hash of the client secret.
+       * @OutputOnly
+       * 
+ * + * string oauth2_client_secret_sha256 = 4; + * + * @return The oauth2ClientSecretSha256. + */ + public java.lang.String getOauth2ClientSecretSha256() { + java.lang.Object ref = oauth2ClientSecretSha256_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauth2ClientSecretSha256_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Hex-encoded SHA-256 hash of the client secret.
+       * @OutputOnly
+       * 
+ * + * string oauth2_client_secret_sha256 = 4; + * + * @return The bytes for oauth2ClientSecretSha256. + */ + public com.google.protobuf.ByteString getOauth2ClientSecretSha256Bytes() { + java.lang.Object ref = oauth2ClientSecretSha256_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauth2ClientSecretSha256_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Hex-encoded SHA-256 hash of the client secret.
+       * @OutputOnly
+       * 
+ * + * string oauth2_client_secret_sha256 = 4; + * + * @param value The oauth2ClientSecretSha256 to set. + * @return This builder for chaining. + */ + public Builder setOauth2ClientSecretSha256(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + oauth2ClientSecretSha256_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Hex-encoded SHA-256 hash of the client secret.
+       * @OutputOnly
+       * 
+ * + * string oauth2_client_secret_sha256 = 4; + * + * @return This builder for chaining. + */ + public Builder clearOauth2ClientSecretSha256() { + + oauth2ClientSecretSha256_ = getDefaultInstance().getOauth2ClientSecretSha256(); + onChanged(); + return this; + } + /** + * + * + *
+       * Hex-encoded SHA-256 hash of the client secret.
+       * @OutputOnly
+       * 
+ * + * string oauth2_client_secret_sha256 = 4; + * + * @param value The bytes for oauth2ClientSecretSha256 to set. + * @return This builder for chaining. + */ + public Builder setOauth2ClientSecretSha256Bytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + oauth2ClientSecretSha256_ = 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.appengine.v1.Application.IdentityAwareProxy) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Application.IdentityAwareProxy) + private static final com.google.appengine.v1.Application.IdentityAwareProxy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Application.IdentityAwareProxy(); + } + + public static com.google.appengine.v1.Application.IdentityAwareProxy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentityAwareProxy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IdentityAwareProxy(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.appengine.v1.Application.IdentityAwareProxy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FeatureSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Application.FeatureSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Boolean value indicating if split health checks should be used instead
+     * of the legacy health checks. At an app.yaml level, this means defaulting
+     * to 'readiness_check' and 'liveness_check' values instead of
+     * 'health_check' ones. Once the legacy 'health_check' behavior is
+     * deprecated, and this value is always true, this setting can
+     * be removed.
+     * 
+ * + * bool split_health_checks = 1; + * + * @return The splitHealthChecks. + */ + boolean getSplitHealthChecks(); + + /** + * + * + *
+     * If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/)
+     * base image for VMs, rather than a base Debian image.
+     * 
+ * + * bool use_container_optimized_os = 2; + * + * @return The useContainerOptimizedOs. + */ + boolean getUseContainerOptimizedOs(); + } + /** + * + * + *
+   * The feature specific settings to be used in the application. These define
+   * behaviors that are user configurable.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Application.FeatureSettings} + */ + public static final class FeatureSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Application.FeatureSettings) + FeatureSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureSettings.newBuilder() to construct. + private FeatureSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FeatureSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FeatureSettings( + 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: + { + splitHealthChecks_ = input.readBool(); + break; + } + case 16: + { + useContainerOptimizedOs_ = input.readBool(); + 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.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_FeatureSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_FeatureSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Application.FeatureSettings.class, + com.google.appengine.v1.Application.FeatureSettings.Builder.class); + } + + public static final int SPLIT_HEALTH_CHECKS_FIELD_NUMBER = 1; + private boolean splitHealthChecks_; + /** + * + * + *
+     * Boolean value indicating if split health checks should be used instead
+     * of the legacy health checks. At an app.yaml level, this means defaulting
+     * to 'readiness_check' and 'liveness_check' values instead of
+     * 'health_check' ones. Once the legacy 'health_check' behavior is
+     * deprecated, and this value is always true, this setting can
+     * be removed.
+     * 
+ * + * bool split_health_checks = 1; + * + * @return The splitHealthChecks. + */ + @java.lang.Override + public boolean getSplitHealthChecks() { + return splitHealthChecks_; + } + + public static final int USE_CONTAINER_OPTIMIZED_OS_FIELD_NUMBER = 2; + private boolean useContainerOptimizedOs_; + /** + * + * + *
+     * If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/)
+     * base image for VMs, rather than a base Debian image.
+     * 
+ * + * bool use_container_optimized_os = 2; + * + * @return The useContainerOptimizedOs. + */ + @java.lang.Override + public boolean getUseContainerOptimizedOs() { + return useContainerOptimizedOs_; + } + + 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 (splitHealthChecks_ != false) { + output.writeBool(1, splitHealthChecks_); + } + if (useContainerOptimizedOs_ != false) { + output.writeBool(2, useContainerOptimizedOs_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (splitHealthChecks_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, splitHealthChecks_); + } + if (useContainerOptimizedOs_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, useContainerOptimizedOs_); + } + 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.appengine.v1.Application.FeatureSettings)) { + return super.equals(obj); + } + com.google.appengine.v1.Application.FeatureSettings other = + (com.google.appengine.v1.Application.FeatureSettings) obj; + + if (getSplitHealthChecks() != other.getSplitHealthChecks()) return false; + if (getUseContainerOptimizedOs() != other.getUseContainerOptimizedOs()) 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) + SPLIT_HEALTH_CHECKS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSplitHealthChecks()); + hash = (37 * hash) + USE_CONTAINER_OPTIMIZED_OS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseContainerOptimizedOs()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Application.FeatureSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Application.FeatureSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Application.FeatureSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Application.FeatureSettings 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.appengine.v1.Application.FeatureSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Application.FeatureSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Application.FeatureSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Application.FeatureSettings 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.appengine.v1.Application.FeatureSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Application.FeatureSettings 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.appengine.v1.Application.FeatureSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Application.FeatureSettings 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.appengine.v1.Application.FeatureSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The feature specific settings to be used in the application. These define
+     * behaviors that are user configurable.
+     * 
+ * + * Protobuf type {@code google.appengine.v1.Application.FeatureSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Application.FeatureSettings) + com.google.appengine.v1.Application.FeatureSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_FeatureSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_FeatureSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Application.FeatureSettings.class, + com.google.appengine.v1.Application.FeatureSettings.Builder.class); + } + + // Construct using com.google.appengine.v1.Application.FeatureSettings.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(); + splitHealthChecks_ = false; + + useContainerOptimizedOs_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_FeatureSettings_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Application.FeatureSettings getDefaultInstanceForType() { + return com.google.appengine.v1.Application.FeatureSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Application.FeatureSettings build() { + com.google.appengine.v1.Application.FeatureSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Application.FeatureSettings buildPartial() { + com.google.appengine.v1.Application.FeatureSettings result = + new com.google.appengine.v1.Application.FeatureSettings(this); + result.splitHealthChecks_ = splitHealthChecks_; + result.useContainerOptimizedOs_ = useContainerOptimizedOs_; + 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.appengine.v1.Application.FeatureSettings) { + return mergeFrom((com.google.appengine.v1.Application.FeatureSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Application.FeatureSettings other) { + if (other == com.google.appengine.v1.Application.FeatureSettings.getDefaultInstance()) + return this; + if (other.getSplitHealthChecks() != false) { + setSplitHealthChecks(other.getSplitHealthChecks()); + } + if (other.getUseContainerOptimizedOs() != false) { + setUseContainerOptimizedOs(other.getUseContainerOptimizedOs()); + } + 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.appengine.v1.Application.FeatureSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.Application.FeatureSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean splitHealthChecks_; + /** + * + * + *
+       * Boolean value indicating if split health checks should be used instead
+       * of the legacy health checks. At an app.yaml level, this means defaulting
+       * to 'readiness_check' and 'liveness_check' values instead of
+       * 'health_check' ones. Once the legacy 'health_check' behavior is
+       * deprecated, and this value is always true, this setting can
+       * be removed.
+       * 
+ * + * bool split_health_checks = 1; + * + * @return The splitHealthChecks. + */ + @java.lang.Override + public boolean getSplitHealthChecks() { + return splitHealthChecks_; + } + /** + * + * + *
+       * Boolean value indicating if split health checks should be used instead
+       * of the legacy health checks. At an app.yaml level, this means defaulting
+       * to 'readiness_check' and 'liveness_check' values instead of
+       * 'health_check' ones. Once the legacy 'health_check' behavior is
+       * deprecated, and this value is always true, this setting can
+       * be removed.
+       * 
+ * + * bool split_health_checks = 1; + * + * @param value The splitHealthChecks to set. + * @return This builder for chaining. + */ + public Builder setSplitHealthChecks(boolean value) { + + splitHealthChecks_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Boolean value indicating if split health checks should be used instead
+       * of the legacy health checks. At an app.yaml level, this means defaulting
+       * to 'readiness_check' and 'liveness_check' values instead of
+       * 'health_check' ones. Once the legacy 'health_check' behavior is
+       * deprecated, and this value is always true, this setting can
+       * be removed.
+       * 
+ * + * bool split_health_checks = 1; + * + * @return This builder for chaining. + */ + public Builder clearSplitHealthChecks() { + + splitHealthChecks_ = false; + onChanged(); + return this; + } + + private boolean useContainerOptimizedOs_; + /** + * + * + *
+       * If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/)
+       * base image for VMs, rather than a base Debian image.
+       * 
+ * + * bool use_container_optimized_os = 2; + * + * @return The useContainerOptimizedOs. + */ + @java.lang.Override + public boolean getUseContainerOptimizedOs() { + return useContainerOptimizedOs_; + } + /** + * + * + *
+       * If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/)
+       * base image for VMs, rather than a base Debian image.
+       * 
+ * + * bool use_container_optimized_os = 2; + * + * @param value The useContainerOptimizedOs to set. + * @return This builder for chaining. + */ + public Builder setUseContainerOptimizedOs(boolean value) { + + useContainerOptimizedOs_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/)
+       * base image for VMs, rather than a base Debian image.
+       * 
+ * + * bool use_container_optimized_os = 2; + * + * @return This builder for chaining. + */ + public Builder clearUseContainerOptimizedOs() { + + useContainerOptimizedOs_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.appengine.v1.Application.FeatureSettings) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Application.FeatureSettings) + private static final com.google.appengine.v1.Application.FeatureSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Application.FeatureSettings(); + } + + public static com.google.appengine.v1.Application.FeatureSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FeatureSettings(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.appengine.v1.Application.FeatureSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Full path to the Application resource in the API.
+   * Example: `apps/myapp`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Full path to the Application resource in the API.
+   * Example: `apps/myapp`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Identifier of the Application resource. This identifier is equivalent
+   * to the project ID of the Google Cloud Platform project where you want to
+   * deploy your application.
+   * Example: `myapp`.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier of the Application resource. This identifier is equivalent
+   * to the project ID of the Google Cloud Platform project where you want to
+   * deploy your application.
+   * Example: `myapp`.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPATCH_RULES_FIELD_NUMBER = 3; + private java.util.List dispatchRules_; + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + @java.lang.Override + public java.util.List getDispatchRulesList() { + return dispatchRules_; + } + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + @java.lang.Override + public java.util.List + getDispatchRulesOrBuilderList() { + return dispatchRules_; + } + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + @java.lang.Override + public int getDispatchRulesCount() { + return dispatchRules_.size(); + } + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + @java.lang.Override + public com.google.appengine.v1.UrlDispatchRule getDispatchRules(int index) { + return dispatchRules_.get(index); + } + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + @java.lang.Override + public com.google.appengine.v1.UrlDispatchRuleOrBuilder getDispatchRulesOrBuilder(int index) { + return dispatchRules_.get(index); + } + + public static final int AUTH_DOMAIN_FIELD_NUMBER = 6; + private volatile java.lang.Object authDomain_; + /** + * + * + *
+   * Google Apps authentication domain that controls which users can access
+   * this application.
+   * Defaults to open access for any Google Account.
+   * 
+ * + * string auth_domain = 6; + * + * @return The authDomain. + */ + @java.lang.Override + public java.lang.String getAuthDomain() { + java.lang.Object ref = authDomain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authDomain_ = s; + return s; + } + } + /** + * + * + *
+   * Google Apps authentication domain that controls which users can access
+   * this application.
+   * Defaults to open access for any Google Account.
+   * 
+ * + * string auth_domain = 6; + * + * @return The bytes for authDomain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthDomainBytes() { + java.lang.Object ref = authDomain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authDomain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object locationId_; + /** + * + * + *
+   * Location from which this application runs. Application instances
+   * run out of the data centers in the specified location, which is also where
+   * all of the application's end user content is stored.
+   * Defaults to `us-central`.
+   * View the list of
+   * [supported locations](https://cloud.google.com/appengine/docs/locations).
+   * 
+ * + * string location_id = 7; + * + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + * + * + *
+   * Location from which this application runs. Application instances
+   * run out of the data centers in the specified location, which is also where
+   * all of the application's end user content is stored.
+   * Defaults to `us-central`.
+   * View the list of
+   * [supported locations](https://cloud.google.com/appengine/docs/locations).
+   * 
+ * + * string location_id = 7; + * + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_BUCKET_FIELD_NUMBER = 8; + private volatile java.lang.Object codeBucket_; + /** + * + * + *
+   * Google Cloud Storage bucket that can be used for storing files
+   * associated with this application. This bucket is associated with the
+   * application and can be used by the gcloud deployment commands.
+   * @OutputOnly
+   * 
+ * + * string code_bucket = 8; + * + * @return The codeBucket. + */ + @java.lang.Override + public java.lang.String getCodeBucket() { + java.lang.Object ref = codeBucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + codeBucket_ = s; + return s; + } + } + /** + * + * + *
+   * Google Cloud Storage bucket that can be used for storing files
+   * associated with this application. This bucket is associated with the
+   * application and can be used by the gcloud deployment commands.
+   * @OutputOnly
+   * 
+ * + * string code_bucket = 8; + * + * @return The bytes for codeBucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeBucketBytes() { + java.lang.Object ref = codeBucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + codeBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_COOKIE_EXPIRATION_FIELD_NUMBER = 9; + private com.google.protobuf.Duration defaultCookieExpiration_; + /** + * + * + *
+   * Cookie expiration policy for this application.
+   * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + * + * @return Whether the defaultCookieExpiration field is set. + */ + @java.lang.Override + public boolean hasDefaultCookieExpiration() { + return defaultCookieExpiration_ != null; + } + /** + * + * + *
+   * Cookie expiration policy for this application.
+   * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + * + * @return The defaultCookieExpiration. + */ + @java.lang.Override + public com.google.protobuf.Duration getDefaultCookieExpiration() { + return defaultCookieExpiration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : defaultCookieExpiration_; + } + /** + * + * + *
+   * Cookie expiration policy for this application.
+   * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDefaultCookieExpirationOrBuilder() { + return getDefaultCookieExpiration(); + } + + public static final int SERVING_STATUS_FIELD_NUMBER = 10; + private int servingStatus_; + /** + * + * + *
+   * Serving status of this application.
+   * 
+ * + * .google.appengine.v1.Application.ServingStatus serving_status = 10; + * + * @return The enum numeric value on the wire for servingStatus. + */ + @java.lang.Override + public int getServingStatusValue() { + return servingStatus_; + } + /** + * + * + *
+   * Serving status of this application.
+   * 
+ * + * .google.appengine.v1.Application.ServingStatus serving_status = 10; + * + * @return The servingStatus. + */ + @java.lang.Override + public com.google.appengine.v1.Application.ServingStatus getServingStatus() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.Application.ServingStatus result = + com.google.appengine.v1.Application.ServingStatus.valueOf(servingStatus_); + return result == null ? com.google.appengine.v1.Application.ServingStatus.UNRECOGNIZED : result; + } + + public static final int DEFAULT_HOSTNAME_FIELD_NUMBER = 11; + private volatile java.lang.Object defaultHostname_; + /** + * + * + *
+   * Hostname used to reach this application, as resolved by App Engine.
+   * @OutputOnly
+   * 
+ * + * string default_hostname = 11; + * + * @return The defaultHostname. + */ + @java.lang.Override + public java.lang.String getDefaultHostname() { + java.lang.Object ref = defaultHostname_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultHostname_ = s; + return s; + } + } + /** + * + * + *
+   * Hostname used to reach this application, as resolved by App Engine.
+   * @OutputOnly
+   * 
+ * + * string default_hostname = 11; + * + * @return The bytes for defaultHostname. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultHostnameBytes() { + java.lang.Object ref = defaultHostname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultHostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_BUCKET_FIELD_NUMBER = 12; + private volatile java.lang.Object defaultBucket_; + /** + * + * + *
+   * Google Cloud Storage bucket that can be used by this application to store
+   * content.
+   * @OutputOnly
+   * 
+ * + * string default_bucket = 12; + * + * @return The defaultBucket. + */ + @java.lang.Override + public java.lang.String getDefaultBucket() { + java.lang.Object ref = defaultBucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultBucket_ = s; + return s; + } + } + /** + * + * + *
+   * Google Cloud Storage bucket that can be used by this application to store
+   * content.
+   * @OutputOnly
+   * 
+ * + * string default_bucket = 12; + * + * @return The bytes for defaultBucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultBucketBytes() { + java.lang.Object ref = defaultBucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IAP_FIELD_NUMBER = 14; + private com.google.appengine.v1.Application.IdentityAwareProxy iap_; + /** + * .google.appengine.v1.Application.IdentityAwareProxy iap = 14; + * + * @return Whether the iap field is set. + */ + @java.lang.Override + public boolean hasIap() { + return iap_ != null; + } + /** + * .google.appengine.v1.Application.IdentityAwareProxy iap = 14; + * + * @return The iap. + */ + @java.lang.Override + public com.google.appengine.v1.Application.IdentityAwareProxy getIap() { + return iap_ == null + ? com.google.appengine.v1.Application.IdentityAwareProxy.getDefaultInstance() + : iap_; + } + /** .google.appengine.v1.Application.IdentityAwareProxy iap = 14; */ + @java.lang.Override + public com.google.appengine.v1.Application.IdentityAwareProxyOrBuilder getIapOrBuilder() { + return getIap(); + } + + public static final int GCR_DOMAIN_FIELD_NUMBER = 16; + private volatile java.lang.Object gcrDomain_; + /** + * + * + *
+   * The Google Container Registry domain used for storing managed build docker
+   * images for this application.
+   * 
+ * + * string gcr_domain = 16; + * + * @return The gcrDomain. + */ + @java.lang.Override + public java.lang.String getGcrDomain() { + java.lang.Object ref = gcrDomain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcrDomain_ = s; + return s; + } + } + /** + * + * + *
+   * The Google Container Registry domain used for storing managed build docker
+   * images for this application.
+   * 
+ * + * string gcr_domain = 16; + * + * @return The bytes for gcrDomain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcrDomainBytes() { + java.lang.Object ref = gcrDomain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcrDomain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_TYPE_FIELD_NUMBER = 17; + private int databaseType_; + /** + * + * + *
+   * The type of the Cloud Firestore or Cloud Datastore database associated with
+   * this application.
+   * 
+ * + * .google.appengine.v1.Application.DatabaseType database_type = 17; + * + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override + public int getDatabaseTypeValue() { + return databaseType_; + } + /** + * + * + *
+   * The type of the Cloud Firestore or Cloud Datastore database associated with
+   * this application.
+   * 
+ * + * .google.appengine.v1.Application.DatabaseType database_type = 17; + * + * @return The databaseType. + */ + @java.lang.Override + public com.google.appengine.v1.Application.DatabaseType getDatabaseType() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.Application.DatabaseType result = + com.google.appengine.v1.Application.DatabaseType.valueOf(databaseType_); + return result == null ? com.google.appengine.v1.Application.DatabaseType.UNRECOGNIZED : result; + } + + public static final int FEATURE_SETTINGS_FIELD_NUMBER = 18; + private com.google.appengine.v1.Application.FeatureSettings featureSettings_; + /** + * + * + *
+   * The feature specific settings to be used in the application.
+   * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + * + * @return Whether the featureSettings field is set. + */ + @java.lang.Override + public boolean hasFeatureSettings() { + return featureSettings_ != null; + } + /** + * + * + *
+   * The feature specific settings to be used in the application.
+   * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + * + * @return The featureSettings. + */ + @java.lang.Override + public com.google.appengine.v1.Application.FeatureSettings getFeatureSettings() { + return featureSettings_ == null + ? com.google.appengine.v1.Application.FeatureSettings.getDefaultInstance() + : featureSettings_; + } + /** + * + * + *
+   * The feature specific settings to be used in the application.
+   * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + */ + @java.lang.Override + public com.google.appengine.v1.Application.FeatureSettingsOrBuilder + getFeatureSettingsOrBuilder() { + return getFeatureSettings(); + } + + 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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + for (int i = 0; i < dispatchRules_.size(); i++) { + output.writeMessage(3, dispatchRules_.get(i)); + } + if (!getAuthDomainBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, authDomain_); + } + if (!getLocationIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, locationId_); + } + if (!getCodeBucketBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, codeBucket_); + } + if (defaultCookieExpiration_ != null) { + output.writeMessage(9, getDefaultCookieExpiration()); + } + if (servingStatus_ + != com.google.appengine.v1.Application.ServingStatus.UNSPECIFIED.getNumber()) { + output.writeEnum(10, servingStatus_); + } + if (!getDefaultHostnameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, defaultHostname_); + } + if (!getDefaultBucketBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, defaultBucket_); + } + if (iap_ != null) { + output.writeMessage(14, getIap()); + } + if (!getGcrDomainBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, gcrDomain_); + } + if (databaseType_ + != com.google.appengine.v1.Application.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(17, databaseType_); + } + if (featureSettings_ != null) { + output.writeMessage(18, getFeatureSettings()); + } + 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 (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + for (int i = 0; i < dispatchRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, dispatchRules_.get(i)); + } + if (!getAuthDomainBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, authDomain_); + } + if (!getLocationIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, locationId_); + } + if (!getCodeBucketBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, codeBucket_); + } + if (defaultCookieExpiration_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDefaultCookieExpiration()); + } + if (servingStatus_ + != com.google.appengine.v1.Application.ServingStatus.UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, servingStatus_); + } + if (!getDefaultHostnameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, defaultHostname_); + } + if (!getDefaultBucketBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, defaultBucket_); + } + if (iap_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getIap()); + } + if (!getGcrDomainBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, gcrDomain_); + } + if (databaseType_ + != com.google.appengine.v1.Application.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, databaseType_); + } + if (featureSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getFeatureSettings()); + } + 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.appengine.v1.Application)) { + return super.equals(obj); + } + com.google.appengine.v1.Application other = (com.google.appengine.v1.Application) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; + if (!getDispatchRulesList().equals(other.getDispatchRulesList())) return false; + if (!getAuthDomain().equals(other.getAuthDomain())) return false; + if (!getLocationId().equals(other.getLocationId())) return false; + if (!getCodeBucket().equals(other.getCodeBucket())) return false; + if (hasDefaultCookieExpiration() != other.hasDefaultCookieExpiration()) return false; + if (hasDefaultCookieExpiration()) { + if (!getDefaultCookieExpiration().equals(other.getDefaultCookieExpiration())) return false; + } + if (servingStatus_ != other.servingStatus_) return false; + if (!getDefaultHostname().equals(other.getDefaultHostname())) return false; + if (!getDefaultBucket().equals(other.getDefaultBucket())) return false; + if (hasIap() != other.hasIap()) return false; + if (hasIap()) { + if (!getIap().equals(other.getIap())) return false; + } + if (!getGcrDomain().equals(other.getGcrDomain())) return false; + if (databaseType_ != other.databaseType_) return false; + if (hasFeatureSettings() != other.hasFeatureSettings()) return false; + if (hasFeatureSettings()) { + if (!getFeatureSettings().equals(other.getFeatureSettings())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getDispatchRulesCount() > 0) { + hash = (37 * hash) + DISPATCH_RULES_FIELD_NUMBER; + hash = (53 * hash) + getDispatchRulesList().hashCode(); + } + hash = (37 * hash) + AUTH_DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getAuthDomain().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (37 * hash) + CODE_BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getCodeBucket().hashCode(); + if (hasDefaultCookieExpiration()) { + hash = (37 * hash) + DEFAULT_COOKIE_EXPIRATION_FIELD_NUMBER; + hash = (53 * hash) + getDefaultCookieExpiration().hashCode(); + } + hash = (37 * hash) + SERVING_STATUS_FIELD_NUMBER; + hash = (53 * hash) + servingStatus_; + hash = (37 * hash) + DEFAULT_HOSTNAME_FIELD_NUMBER; + hash = (53 * hash) + getDefaultHostname().hashCode(); + hash = (37 * hash) + DEFAULT_BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getDefaultBucket().hashCode(); + if (hasIap()) { + hash = (37 * hash) + IAP_FIELD_NUMBER; + hash = (53 * hash) + getIap().hashCode(); + } + hash = (37 * hash) + GCR_DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getGcrDomain().hashCode(); + hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseType_; + if (hasFeatureSettings()) { + hash = (37 * hash) + FEATURE_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getFeatureSettings().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Application parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Application parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Application parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Application 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.appengine.v1.Application parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Application parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Application parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Application 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.appengine.v1.Application parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Application 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.appengine.v1.Application parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Application 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.appengine.v1.Application prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An Application resource contains the top-level configuration of an App
+   * Engine application.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Application} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Application) + com.google.appengine.v1.ApplicationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Application.class, + com.google.appengine.v1.Application.Builder.class); + } + + // Construct using com.google.appengine.v1.Application.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDispatchRulesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + id_ = ""; + + if (dispatchRulesBuilder_ == null) { + dispatchRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dispatchRulesBuilder_.clear(); + } + authDomain_ = ""; + + locationId_ = ""; + + codeBucket_ = ""; + + if (defaultCookieExpirationBuilder_ == null) { + defaultCookieExpiration_ = null; + } else { + defaultCookieExpiration_ = null; + defaultCookieExpirationBuilder_ = null; + } + servingStatus_ = 0; + + defaultHostname_ = ""; + + defaultBucket_ = ""; + + if (iapBuilder_ == null) { + iap_ = null; + } else { + iap_ = null; + iapBuilder_ = null; + } + gcrDomain_ = ""; + + databaseType_ = 0; + + if (featureSettingsBuilder_ == null) { + featureSettings_ = null; + } else { + featureSettings_ = null; + featureSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_Application_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Application getDefaultInstanceForType() { + return com.google.appengine.v1.Application.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Application build() { + com.google.appengine.v1.Application result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Application buildPartial() { + com.google.appengine.v1.Application result = new com.google.appengine.v1.Application(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.id_ = id_; + if (dispatchRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dispatchRules_ = java.util.Collections.unmodifiableList(dispatchRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dispatchRules_ = dispatchRules_; + } else { + result.dispatchRules_ = dispatchRulesBuilder_.build(); + } + result.authDomain_ = authDomain_; + result.locationId_ = locationId_; + result.codeBucket_ = codeBucket_; + if (defaultCookieExpirationBuilder_ == null) { + result.defaultCookieExpiration_ = defaultCookieExpiration_; + } else { + result.defaultCookieExpiration_ = defaultCookieExpirationBuilder_.build(); + } + result.servingStatus_ = servingStatus_; + result.defaultHostname_ = defaultHostname_; + result.defaultBucket_ = defaultBucket_; + if (iapBuilder_ == null) { + result.iap_ = iap_; + } else { + result.iap_ = iapBuilder_.build(); + } + result.gcrDomain_ = gcrDomain_; + result.databaseType_ = databaseType_; + if (featureSettingsBuilder_ == null) { + result.featureSettings_ = featureSettings_; + } else { + result.featureSettings_ = featureSettingsBuilder_.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.appengine.v1.Application) { + return mergeFrom((com.google.appengine.v1.Application) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Application other) { + if (other == com.google.appengine.v1.Application.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (dispatchRulesBuilder_ == null) { + if (!other.dispatchRules_.isEmpty()) { + if (dispatchRules_.isEmpty()) { + dispatchRules_ = other.dispatchRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDispatchRulesIsMutable(); + dispatchRules_.addAll(other.dispatchRules_); + } + onChanged(); + } + } else { + if (!other.dispatchRules_.isEmpty()) { + if (dispatchRulesBuilder_.isEmpty()) { + dispatchRulesBuilder_.dispose(); + dispatchRulesBuilder_ = null; + dispatchRules_ = other.dispatchRules_; + bitField0_ = (bitField0_ & ~0x00000001); + dispatchRulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDispatchRulesFieldBuilder() + : null; + } else { + dispatchRulesBuilder_.addAllMessages(other.dispatchRules_); + } + } + } + if (!other.getAuthDomain().isEmpty()) { + authDomain_ = other.authDomain_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + if (!other.getCodeBucket().isEmpty()) { + codeBucket_ = other.codeBucket_; + onChanged(); + } + if (other.hasDefaultCookieExpiration()) { + mergeDefaultCookieExpiration(other.getDefaultCookieExpiration()); + } + if (other.servingStatus_ != 0) { + setServingStatusValue(other.getServingStatusValue()); + } + if (!other.getDefaultHostname().isEmpty()) { + defaultHostname_ = other.defaultHostname_; + onChanged(); + } + if (!other.getDefaultBucket().isEmpty()) { + defaultBucket_ = other.defaultBucket_; + onChanged(); + } + if (other.hasIap()) { + mergeIap(other.getIap()); + } + if (!other.getGcrDomain().isEmpty()) { + gcrDomain_ = other.gcrDomain_; + onChanged(); + } + if (other.databaseType_ != 0) { + setDatabaseTypeValue(other.getDatabaseTypeValue()); + } + if (other.hasFeatureSettings()) { + mergeFeatureSettings(other.getFeatureSettings()); + } + 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.appengine.v1.Application parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Application) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Full path to the Application resource in the API.
+     * Example: `apps/myapp`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Full path to the Application resource in the API.
+     * Example: `apps/myapp`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Full path to the Application resource in the API.
+     * Example: `apps/myapp`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the Application resource in the API.
+     * Example: `apps/myapp`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the Application resource in the API.
+     * Example: `apps/myapp`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Identifier of the Application resource. This identifier is equivalent
+     * to the project ID of the Google Cloud Platform project where you want to
+     * deploy your application.
+     * Example: `myapp`.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifier of the Application resource. This identifier is equivalent
+     * to the project ID of the Google Cloud Platform project where you want to
+     * deploy your application.
+     * Example: `myapp`.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifier of the Application resource. This identifier is equivalent
+     * to the project ID of the Google Cloud Platform project where you want to
+     * deploy your application.
+     * Example: `myapp`.
+     * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier of the Application resource. This identifier is equivalent
+     * to the project ID of the Google Cloud Platform project where you want to
+     * deploy your application.
+     * Example: `myapp`.
+     * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier of the Application resource. This identifier is equivalent
+     * to the project ID of the Google Cloud Platform project where you want to
+     * deploy your application.
+     * Example: `myapp`.
+     * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.util.List dispatchRules_ = + java.util.Collections.emptyList(); + + private void ensureDispatchRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dispatchRules_ = + new java.util.ArrayList(dispatchRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.UrlDispatchRule, + com.google.appengine.v1.UrlDispatchRule.Builder, + com.google.appengine.v1.UrlDispatchRuleOrBuilder> + dispatchRulesBuilder_; + + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public java.util.List getDispatchRulesList() { + if (dispatchRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dispatchRules_); + } else { + return dispatchRulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public int getDispatchRulesCount() { + if (dispatchRulesBuilder_ == null) { + return dispatchRules_.size(); + } else { + return dispatchRulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public com.google.appengine.v1.UrlDispatchRule getDispatchRules(int index) { + if (dispatchRulesBuilder_ == null) { + return dispatchRules_.get(index); + } else { + return dispatchRulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public Builder setDispatchRules(int index, com.google.appengine.v1.UrlDispatchRule value) { + if (dispatchRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDispatchRulesIsMutable(); + dispatchRules_.set(index, value); + onChanged(); + } else { + dispatchRulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public Builder setDispatchRules( + int index, com.google.appengine.v1.UrlDispatchRule.Builder builderForValue) { + if (dispatchRulesBuilder_ == null) { + ensureDispatchRulesIsMutable(); + dispatchRules_.set(index, builderForValue.build()); + onChanged(); + } else { + dispatchRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public Builder addDispatchRules(com.google.appengine.v1.UrlDispatchRule value) { + if (dispatchRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDispatchRulesIsMutable(); + dispatchRules_.add(value); + onChanged(); + } else { + dispatchRulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public Builder addDispatchRules(int index, com.google.appengine.v1.UrlDispatchRule value) { + if (dispatchRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDispatchRulesIsMutable(); + dispatchRules_.add(index, value); + onChanged(); + } else { + dispatchRulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public Builder addDispatchRules( + com.google.appengine.v1.UrlDispatchRule.Builder builderForValue) { + if (dispatchRulesBuilder_ == null) { + ensureDispatchRulesIsMutable(); + dispatchRules_.add(builderForValue.build()); + onChanged(); + } else { + dispatchRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public Builder addDispatchRules( + int index, com.google.appengine.v1.UrlDispatchRule.Builder builderForValue) { + if (dispatchRulesBuilder_ == null) { + ensureDispatchRulesIsMutable(); + dispatchRules_.add(index, builderForValue.build()); + onChanged(); + } else { + dispatchRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public Builder addAllDispatchRules( + java.lang.Iterable values) { + if (dispatchRulesBuilder_ == null) { + ensureDispatchRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dispatchRules_); + onChanged(); + } else { + dispatchRulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public Builder clearDispatchRules() { + if (dispatchRulesBuilder_ == null) { + dispatchRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dispatchRulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public Builder removeDispatchRules(int index) { + if (dispatchRulesBuilder_ == null) { + ensureDispatchRulesIsMutable(); + dispatchRules_.remove(index); + onChanged(); + } else { + dispatchRulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public com.google.appengine.v1.UrlDispatchRule.Builder getDispatchRulesBuilder(int index) { + return getDispatchRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public com.google.appengine.v1.UrlDispatchRuleOrBuilder getDispatchRulesOrBuilder(int index) { + if (dispatchRulesBuilder_ == null) { + return dispatchRules_.get(index); + } else { + return dispatchRulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public java.util.List + getDispatchRulesOrBuilderList() { + if (dispatchRulesBuilder_ != null) { + return dispatchRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dispatchRules_); + } + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public com.google.appengine.v1.UrlDispatchRule.Builder addDispatchRulesBuilder() { + return getDispatchRulesFieldBuilder() + .addBuilder(com.google.appengine.v1.UrlDispatchRule.getDefaultInstance()); + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public com.google.appengine.v1.UrlDispatchRule.Builder addDispatchRulesBuilder(int index) { + return getDispatchRulesFieldBuilder() + .addBuilder(index, com.google.appengine.v1.UrlDispatchRule.getDefaultInstance()); + } + /** + * + * + *
+     * HTTP path dispatch rules for requests to the application that do not
+     * explicitly target a service or version. Rules are order-dependent.
+     * Up to 20 dispatch rules can be supported.
+     * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + public java.util.List + getDispatchRulesBuilderList() { + return getDispatchRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.UrlDispatchRule, + com.google.appengine.v1.UrlDispatchRule.Builder, + com.google.appengine.v1.UrlDispatchRuleOrBuilder> + getDispatchRulesFieldBuilder() { + if (dispatchRulesBuilder_ == null) { + dispatchRulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.UrlDispatchRule, + com.google.appengine.v1.UrlDispatchRule.Builder, + com.google.appengine.v1.UrlDispatchRuleOrBuilder>( + dispatchRules_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dispatchRules_ = null; + } + return dispatchRulesBuilder_; + } + + private java.lang.Object authDomain_ = ""; + /** + * + * + *
+     * Google Apps authentication domain that controls which users can access
+     * this application.
+     * Defaults to open access for any Google Account.
+     * 
+ * + * string auth_domain = 6; + * + * @return The authDomain. + */ + public java.lang.String getAuthDomain() { + java.lang.Object ref = authDomain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authDomain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Google Apps authentication domain that controls which users can access
+     * this application.
+     * Defaults to open access for any Google Account.
+     * 
+ * + * string auth_domain = 6; + * + * @return The bytes for authDomain. + */ + public com.google.protobuf.ByteString getAuthDomainBytes() { + java.lang.Object ref = authDomain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authDomain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Google Apps authentication domain that controls which users can access
+     * this application.
+     * Defaults to open access for any Google Account.
+     * 
+ * + * string auth_domain = 6; + * + * @param value The authDomain to set. + * @return This builder for chaining. + */ + public Builder setAuthDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + authDomain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Google Apps authentication domain that controls which users can access
+     * this application.
+     * Defaults to open access for any Google Account.
+     * 
+ * + * string auth_domain = 6; + * + * @return This builder for chaining. + */ + public Builder clearAuthDomain() { + + authDomain_ = getDefaultInstance().getAuthDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * Google Apps authentication domain that controls which users can access
+     * this application.
+     * Defaults to open access for any Google Account.
+     * 
+ * + * string auth_domain = 6; + * + * @param value The bytes for authDomain to set. + * @return This builder for chaining. + */ + public Builder setAuthDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + authDomain_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + * + * + *
+     * Location from which this application runs. Application instances
+     * run out of the data centers in the specified location, which is also where
+     * all of the application's end user content is stored.
+     * Defaults to `us-central`.
+     * View the list of
+     * [supported locations](https://cloud.google.com/appengine/docs/locations).
+     * 
+ * + * string location_id = 7; + * + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Location from which this application runs. Application instances
+     * run out of the data centers in the specified location, which is also where
+     * all of the application's end user content is stored.
+     * Defaults to `us-central`.
+     * View the list of
+     * [supported locations](https://cloud.google.com/appengine/docs/locations).
+     * 
+ * + * string location_id = 7; + * + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Location from which this application runs. Application instances
+     * run out of the data centers in the specified location, which is also where
+     * all of the application's end user content is stored.
+     * Defaults to `us-central`.
+     * View the list of
+     * [supported locations](https://cloud.google.com/appengine/docs/locations).
+     * 
+ * + * string location_id = 7; + * + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Location from which this application runs. Application instances
+     * run out of the data centers in the specified location, which is also where
+     * all of the application's end user content is stored.
+     * Defaults to `us-central`.
+     * View the list of
+     * [supported locations](https://cloud.google.com/appengine/docs/locations).
+     * 
+ * + * string location_id = 7; + * + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Location from which this application runs. Application instances
+     * run out of the data centers in the specified location, which is also where
+     * all of the application's end user content is stored.
+     * Defaults to `us-central`.
+     * View the list of
+     * [supported locations](https://cloud.google.com/appengine/docs/locations).
+     * 
+ * + * string location_id = 7; + * + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + + private java.lang.Object codeBucket_ = ""; + /** + * + * + *
+     * Google Cloud Storage bucket that can be used for storing files
+     * associated with this application. This bucket is associated with the
+     * application and can be used by the gcloud deployment commands.
+     * @OutputOnly
+     * 
+ * + * string code_bucket = 8; + * + * @return The codeBucket. + */ + public java.lang.String getCodeBucket() { + java.lang.Object ref = codeBucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + codeBucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Google Cloud Storage bucket that can be used for storing files
+     * associated with this application. This bucket is associated with the
+     * application and can be used by the gcloud deployment commands.
+     * @OutputOnly
+     * 
+ * + * string code_bucket = 8; + * + * @return The bytes for codeBucket. + */ + public com.google.protobuf.ByteString getCodeBucketBytes() { + java.lang.Object ref = codeBucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + codeBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Google Cloud Storage bucket that can be used for storing files
+     * associated with this application. This bucket is associated with the
+     * application and can be used by the gcloud deployment commands.
+     * @OutputOnly
+     * 
+ * + * string code_bucket = 8; + * + * @param value The codeBucket to set. + * @return This builder for chaining. + */ + public Builder setCodeBucket(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + codeBucket_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Google Cloud Storage bucket that can be used for storing files
+     * associated with this application. This bucket is associated with the
+     * application and can be used by the gcloud deployment commands.
+     * @OutputOnly
+     * 
+ * + * string code_bucket = 8; + * + * @return This builder for chaining. + */ + public Builder clearCodeBucket() { + + codeBucket_ = getDefaultInstance().getCodeBucket(); + onChanged(); + return this; + } + /** + * + * + *
+     * Google Cloud Storage bucket that can be used for storing files
+     * associated with this application. This bucket is associated with the
+     * application and can be used by the gcloud deployment commands.
+     * @OutputOnly
+     * 
+ * + * string code_bucket = 8; + * + * @param value The bytes for codeBucket to set. + * @return This builder for chaining. + */ + public Builder setCodeBucketBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + codeBucket_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration defaultCookieExpiration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + defaultCookieExpirationBuilder_; + /** + * + * + *
+     * Cookie expiration policy for this application.
+     * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + * + * @return Whether the defaultCookieExpiration field is set. + */ + public boolean hasDefaultCookieExpiration() { + return defaultCookieExpirationBuilder_ != null || defaultCookieExpiration_ != null; + } + /** + * + * + *
+     * Cookie expiration policy for this application.
+     * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + * + * @return The defaultCookieExpiration. + */ + public com.google.protobuf.Duration getDefaultCookieExpiration() { + if (defaultCookieExpirationBuilder_ == null) { + return defaultCookieExpiration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : defaultCookieExpiration_; + } else { + return defaultCookieExpirationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Cookie expiration policy for this application.
+     * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + */ + public Builder setDefaultCookieExpiration(com.google.protobuf.Duration value) { + if (defaultCookieExpirationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultCookieExpiration_ = value; + onChanged(); + } else { + defaultCookieExpirationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Cookie expiration policy for this application.
+     * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + */ + public Builder setDefaultCookieExpiration( + com.google.protobuf.Duration.Builder builderForValue) { + if (defaultCookieExpirationBuilder_ == null) { + defaultCookieExpiration_ = builderForValue.build(); + onChanged(); + } else { + defaultCookieExpirationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Cookie expiration policy for this application.
+     * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + */ + public Builder mergeDefaultCookieExpiration(com.google.protobuf.Duration value) { + if (defaultCookieExpirationBuilder_ == null) { + if (defaultCookieExpiration_ != null) { + defaultCookieExpiration_ = + com.google.protobuf.Duration.newBuilder(defaultCookieExpiration_) + .mergeFrom(value) + .buildPartial(); + } else { + defaultCookieExpiration_ = value; + } + onChanged(); + } else { + defaultCookieExpirationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Cookie expiration policy for this application.
+     * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + */ + public Builder clearDefaultCookieExpiration() { + if (defaultCookieExpirationBuilder_ == null) { + defaultCookieExpiration_ = null; + onChanged(); + } else { + defaultCookieExpiration_ = null; + defaultCookieExpirationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Cookie expiration policy for this application.
+     * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + */ + public com.google.protobuf.Duration.Builder getDefaultCookieExpirationBuilder() { + + onChanged(); + return getDefaultCookieExpirationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cookie expiration policy for this application.
+     * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + */ + public com.google.protobuf.DurationOrBuilder getDefaultCookieExpirationOrBuilder() { + if (defaultCookieExpirationBuilder_ != null) { + return defaultCookieExpirationBuilder_.getMessageOrBuilder(); + } else { + return defaultCookieExpiration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : defaultCookieExpiration_; + } + } + /** + * + * + *
+     * Cookie expiration policy for this application.
+     * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDefaultCookieExpirationFieldBuilder() { + if (defaultCookieExpirationBuilder_ == null) { + defaultCookieExpirationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDefaultCookieExpiration(), getParentForChildren(), isClean()); + defaultCookieExpiration_ = null; + } + return defaultCookieExpirationBuilder_; + } + + private int servingStatus_ = 0; + /** + * + * + *
+     * Serving status of this application.
+     * 
+ * + * .google.appengine.v1.Application.ServingStatus serving_status = 10; + * + * @return The enum numeric value on the wire for servingStatus. + */ + @java.lang.Override + public int getServingStatusValue() { + return servingStatus_; + } + /** + * + * + *
+     * Serving status of this application.
+     * 
+ * + * .google.appengine.v1.Application.ServingStatus serving_status = 10; + * + * @param value The enum numeric value on the wire for servingStatus to set. + * @return This builder for chaining. + */ + public Builder setServingStatusValue(int value) { + + servingStatus_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Serving status of this application.
+     * 
+ * + * .google.appengine.v1.Application.ServingStatus serving_status = 10; + * + * @return The servingStatus. + */ + @java.lang.Override + public com.google.appengine.v1.Application.ServingStatus getServingStatus() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.Application.ServingStatus result = + com.google.appengine.v1.Application.ServingStatus.valueOf(servingStatus_); + return result == null + ? com.google.appengine.v1.Application.ServingStatus.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Serving status of this application.
+     * 
+ * + * .google.appengine.v1.Application.ServingStatus serving_status = 10; + * + * @param value The servingStatus to set. + * @return This builder for chaining. + */ + public Builder setServingStatus(com.google.appengine.v1.Application.ServingStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + servingStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Serving status of this application.
+     * 
+ * + * .google.appengine.v1.Application.ServingStatus serving_status = 10; + * + * @return This builder for chaining. + */ + public Builder clearServingStatus() { + + servingStatus_ = 0; + onChanged(); + return this; + } + + private java.lang.Object defaultHostname_ = ""; + /** + * + * + *
+     * Hostname used to reach this application, as resolved by App Engine.
+     * @OutputOnly
+     * 
+ * + * string default_hostname = 11; + * + * @return The defaultHostname. + */ + public java.lang.String getDefaultHostname() { + java.lang.Object ref = defaultHostname_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultHostname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hostname used to reach this application, as resolved by App Engine.
+     * @OutputOnly
+     * 
+ * + * string default_hostname = 11; + * + * @return The bytes for defaultHostname. + */ + public com.google.protobuf.ByteString getDefaultHostnameBytes() { + java.lang.Object ref = defaultHostname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultHostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hostname used to reach this application, as resolved by App Engine.
+     * @OutputOnly
+     * 
+ * + * string default_hostname = 11; + * + * @param value The defaultHostname to set. + * @return This builder for chaining. + */ + public Builder setDefaultHostname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + defaultHostname_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Hostname used to reach this application, as resolved by App Engine.
+     * @OutputOnly
+     * 
+ * + * string default_hostname = 11; + * + * @return This builder for chaining. + */ + public Builder clearDefaultHostname() { + + defaultHostname_ = getDefaultInstance().getDefaultHostname(); + onChanged(); + return this; + } + /** + * + * + *
+     * Hostname used to reach this application, as resolved by App Engine.
+     * @OutputOnly
+     * 
+ * + * string default_hostname = 11; + * + * @param value The bytes for defaultHostname to set. + * @return This builder for chaining. + */ + public Builder setDefaultHostnameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + defaultHostname_ = value; + onChanged(); + return this; + } + + private java.lang.Object defaultBucket_ = ""; + /** + * + * + *
+     * Google Cloud Storage bucket that can be used by this application to store
+     * content.
+     * @OutputOnly
+     * 
+ * + * string default_bucket = 12; + * + * @return The defaultBucket. + */ + public java.lang.String getDefaultBucket() { + java.lang.Object ref = defaultBucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultBucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Google Cloud Storage bucket that can be used by this application to store
+     * content.
+     * @OutputOnly
+     * 
+ * + * string default_bucket = 12; + * + * @return The bytes for defaultBucket. + */ + public com.google.protobuf.ByteString getDefaultBucketBytes() { + java.lang.Object ref = defaultBucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Google Cloud Storage bucket that can be used by this application to store
+     * content.
+     * @OutputOnly
+     * 
+ * + * string default_bucket = 12; + * + * @param value The defaultBucket to set. + * @return This builder for chaining. + */ + public Builder setDefaultBucket(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + defaultBucket_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Google Cloud Storage bucket that can be used by this application to store
+     * content.
+     * @OutputOnly
+     * 
+ * + * string default_bucket = 12; + * + * @return This builder for chaining. + */ + public Builder clearDefaultBucket() { + + defaultBucket_ = getDefaultInstance().getDefaultBucket(); + onChanged(); + return this; + } + /** + * + * + *
+     * Google Cloud Storage bucket that can be used by this application to store
+     * content.
+     * @OutputOnly
+     * 
+ * + * string default_bucket = 12; + * + * @param value The bytes for defaultBucket to set. + * @return This builder for chaining. + */ + public Builder setDefaultBucketBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + defaultBucket_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.Application.IdentityAwareProxy iap_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application.IdentityAwareProxy, + com.google.appengine.v1.Application.IdentityAwareProxy.Builder, + com.google.appengine.v1.Application.IdentityAwareProxyOrBuilder> + iapBuilder_; + /** + * .google.appengine.v1.Application.IdentityAwareProxy iap = 14; + * + * @return Whether the iap field is set. + */ + public boolean hasIap() { + return iapBuilder_ != null || iap_ != null; + } + /** + * .google.appengine.v1.Application.IdentityAwareProxy iap = 14; + * + * @return The iap. + */ + public com.google.appengine.v1.Application.IdentityAwareProxy getIap() { + if (iapBuilder_ == null) { + return iap_ == null + ? com.google.appengine.v1.Application.IdentityAwareProxy.getDefaultInstance() + : iap_; + } else { + return iapBuilder_.getMessage(); + } + } + /** .google.appengine.v1.Application.IdentityAwareProxy iap = 14; */ + public Builder setIap(com.google.appengine.v1.Application.IdentityAwareProxy value) { + if (iapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iap_ = value; + onChanged(); + } else { + iapBuilder_.setMessage(value); + } + + return this; + } + /** .google.appengine.v1.Application.IdentityAwareProxy iap = 14; */ + public Builder setIap( + com.google.appengine.v1.Application.IdentityAwareProxy.Builder builderForValue) { + if (iapBuilder_ == null) { + iap_ = builderForValue.build(); + onChanged(); + } else { + iapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.appengine.v1.Application.IdentityAwareProxy iap = 14; */ + public Builder mergeIap(com.google.appengine.v1.Application.IdentityAwareProxy value) { + if (iapBuilder_ == null) { + if (iap_ != null) { + iap_ = + com.google.appengine.v1.Application.IdentityAwareProxy.newBuilder(iap_) + .mergeFrom(value) + .buildPartial(); + } else { + iap_ = value; + } + onChanged(); + } else { + iapBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.appengine.v1.Application.IdentityAwareProxy iap = 14; */ + public Builder clearIap() { + if (iapBuilder_ == null) { + iap_ = null; + onChanged(); + } else { + iap_ = null; + iapBuilder_ = null; + } + + return this; + } + /** .google.appengine.v1.Application.IdentityAwareProxy iap = 14; */ + public com.google.appengine.v1.Application.IdentityAwareProxy.Builder getIapBuilder() { + + onChanged(); + return getIapFieldBuilder().getBuilder(); + } + /** .google.appengine.v1.Application.IdentityAwareProxy iap = 14; */ + public com.google.appengine.v1.Application.IdentityAwareProxyOrBuilder getIapOrBuilder() { + if (iapBuilder_ != null) { + return iapBuilder_.getMessageOrBuilder(); + } else { + return iap_ == null + ? com.google.appengine.v1.Application.IdentityAwareProxy.getDefaultInstance() + : iap_; + } + } + /** .google.appengine.v1.Application.IdentityAwareProxy iap = 14; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application.IdentityAwareProxy, + com.google.appengine.v1.Application.IdentityAwareProxy.Builder, + com.google.appengine.v1.Application.IdentityAwareProxyOrBuilder> + getIapFieldBuilder() { + if (iapBuilder_ == null) { + iapBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application.IdentityAwareProxy, + com.google.appengine.v1.Application.IdentityAwareProxy.Builder, + com.google.appengine.v1.Application.IdentityAwareProxyOrBuilder>( + getIap(), getParentForChildren(), isClean()); + iap_ = null; + } + return iapBuilder_; + } + + private java.lang.Object gcrDomain_ = ""; + /** + * + * + *
+     * The Google Container Registry domain used for storing managed build docker
+     * images for this application.
+     * 
+ * + * string gcr_domain = 16; + * + * @return The gcrDomain. + */ + public java.lang.String getGcrDomain() { + java.lang.Object ref = gcrDomain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcrDomain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Google Container Registry domain used for storing managed build docker
+     * images for this application.
+     * 
+ * + * string gcr_domain = 16; + * + * @return The bytes for gcrDomain. + */ + public com.google.protobuf.ByteString getGcrDomainBytes() { + java.lang.Object ref = gcrDomain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcrDomain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Google Container Registry domain used for storing managed build docker
+     * images for this application.
+     * 
+ * + * string gcr_domain = 16; + * + * @param value The gcrDomain to set. + * @return This builder for chaining. + */ + public Builder setGcrDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcrDomain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Container Registry domain used for storing managed build docker
+     * images for this application.
+     * 
+ * + * string gcr_domain = 16; + * + * @return This builder for chaining. + */ + public Builder clearGcrDomain() { + + gcrDomain_ = getDefaultInstance().getGcrDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Container Registry domain used for storing managed build docker
+     * images for this application.
+     * 
+ * + * string gcr_domain = 16; + * + * @param value The bytes for gcrDomain to set. + * @return This builder for chaining. + */ + public Builder setGcrDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcrDomain_ = value; + onChanged(); + return this; + } + + private int databaseType_ = 0; + /** + * + * + *
+     * The type of the Cloud Firestore or Cloud Datastore database associated with
+     * this application.
+     * 
+ * + * .google.appengine.v1.Application.DatabaseType database_type = 17; + * + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override + public int getDatabaseTypeValue() { + return databaseType_; + } + /** + * + * + *
+     * The type of the Cloud Firestore or Cloud Datastore database associated with
+     * this application.
+     * 
+ * + * .google.appengine.v1.Application.DatabaseType database_type = 17; + * + * @param value The enum numeric value on the wire for databaseType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseTypeValue(int value) { + + databaseType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the Cloud Firestore or Cloud Datastore database associated with
+     * this application.
+     * 
+ * + * .google.appengine.v1.Application.DatabaseType database_type = 17; + * + * @return The databaseType. + */ + @java.lang.Override + public com.google.appengine.v1.Application.DatabaseType getDatabaseType() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.Application.DatabaseType result = + com.google.appengine.v1.Application.DatabaseType.valueOf(databaseType_); + return result == null + ? com.google.appengine.v1.Application.DatabaseType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of the Cloud Firestore or Cloud Datastore database associated with
+     * this application.
+     * 
+ * + * .google.appengine.v1.Application.DatabaseType database_type = 17; + * + * @param value The databaseType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseType(com.google.appengine.v1.Application.DatabaseType value) { + if (value == null) { + throw new NullPointerException(); + } + + databaseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the Cloud Firestore or Cloud Datastore database associated with
+     * this application.
+     * 
+ * + * .google.appengine.v1.Application.DatabaseType database_type = 17; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseType() { + + databaseType_ = 0; + onChanged(); + return this; + } + + private com.google.appengine.v1.Application.FeatureSettings featureSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application.FeatureSettings, + com.google.appengine.v1.Application.FeatureSettings.Builder, + com.google.appengine.v1.Application.FeatureSettingsOrBuilder> + featureSettingsBuilder_; + /** + * + * + *
+     * The feature specific settings to be used in the application.
+     * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + * + * @return Whether the featureSettings field is set. + */ + public boolean hasFeatureSettings() { + return featureSettingsBuilder_ != null || featureSettings_ != null; + } + /** + * + * + *
+     * The feature specific settings to be used in the application.
+     * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + * + * @return The featureSettings. + */ + public com.google.appengine.v1.Application.FeatureSettings getFeatureSettings() { + if (featureSettingsBuilder_ == null) { + return featureSettings_ == null + ? com.google.appengine.v1.Application.FeatureSettings.getDefaultInstance() + : featureSettings_; + } else { + return featureSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The feature specific settings to be used in the application.
+     * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + */ + public Builder setFeatureSettings(com.google.appengine.v1.Application.FeatureSettings value) { + if (featureSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureSettings_ = value; + onChanged(); + } else { + featureSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The feature specific settings to be used in the application.
+     * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + */ + public Builder setFeatureSettings( + com.google.appengine.v1.Application.FeatureSettings.Builder builderForValue) { + if (featureSettingsBuilder_ == null) { + featureSettings_ = builderForValue.build(); + onChanged(); + } else { + featureSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The feature specific settings to be used in the application.
+     * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + */ + public Builder mergeFeatureSettings(com.google.appengine.v1.Application.FeatureSettings value) { + if (featureSettingsBuilder_ == null) { + if (featureSettings_ != null) { + featureSettings_ = + com.google.appengine.v1.Application.FeatureSettings.newBuilder(featureSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + featureSettings_ = value; + } + onChanged(); + } else { + featureSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The feature specific settings to be used in the application.
+     * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + */ + public Builder clearFeatureSettings() { + if (featureSettingsBuilder_ == null) { + featureSettings_ = null; + onChanged(); + } else { + featureSettings_ = null; + featureSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The feature specific settings to be used in the application.
+     * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + */ + public com.google.appengine.v1.Application.FeatureSettings.Builder getFeatureSettingsBuilder() { + + onChanged(); + return getFeatureSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The feature specific settings to be used in the application.
+     * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + */ + public com.google.appengine.v1.Application.FeatureSettingsOrBuilder + getFeatureSettingsOrBuilder() { + if (featureSettingsBuilder_ != null) { + return featureSettingsBuilder_.getMessageOrBuilder(); + } else { + return featureSettings_ == null + ? com.google.appengine.v1.Application.FeatureSettings.getDefaultInstance() + : featureSettings_; + } + } + /** + * + * + *
+     * The feature specific settings to be used in the application.
+     * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application.FeatureSettings, + com.google.appengine.v1.Application.FeatureSettings.Builder, + com.google.appengine.v1.Application.FeatureSettingsOrBuilder> + getFeatureSettingsFieldBuilder() { + if (featureSettingsBuilder_ == null) { + featureSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application.FeatureSettings, + com.google.appengine.v1.Application.FeatureSettings.Builder, + com.google.appengine.v1.Application.FeatureSettingsOrBuilder>( + getFeatureSettings(), getParentForChildren(), isClean()); + featureSettings_ = null; + } + return featureSettingsBuilder_; + } + + @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.appengine.v1.Application) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Application) + private static final com.google.appengine.v1.Application DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Application(); + } + + public static com.google.appengine.v1.Application getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Application parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Application(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.appengine.v1.Application getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationOrBuilder.java new file mode 100644 index 00000000..08a73c61 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationOrBuilder.java @@ -0,0 +1,462 @@ +/* + * 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/appengine/v1/application.proto + +package com.google.appengine.v1; + +public interface ApplicationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Application) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Full path to the Application resource in the API.
+   * Example: `apps/myapp`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Full path to the Application resource in the API.
+   * Example: `apps/myapp`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Identifier of the Application resource. This identifier is equivalent
+   * to the project ID of the Google Cloud Platform project where you want to
+   * deploy your application.
+   * Example: `myapp`.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Identifier of the Application resource. This identifier is equivalent
+   * to the project ID of the Google Cloud Platform project where you want to
+   * deploy your application.
+   * Example: `myapp`.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + java.util.List getDispatchRulesList(); + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + com.google.appengine.v1.UrlDispatchRule getDispatchRules(int index); + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + int getDispatchRulesCount(); + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + java.util.List + getDispatchRulesOrBuilderList(); + /** + * + * + *
+   * HTTP path dispatch rules for requests to the application that do not
+   * explicitly target a service or version. Rules are order-dependent.
+   * Up to 20 dispatch rules can be supported.
+   * 
+ * + * repeated .google.appengine.v1.UrlDispatchRule dispatch_rules = 3; + */ + com.google.appengine.v1.UrlDispatchRuleOrBuilder getDispatchRulesOrBuilder(int index); + + /** + * + * + *
+   * Google Apps authentication domain that controls which users can access
+   * this application.
+   * Defaults to open access for any Google Account.
+   * 
+ * + * string auth_domain = 6; + * + * @return The authDomain. + */ + java.lang.String getAuthDomain(); + /** + * + * + *
+   * Google Apps authentication domain that controls which users can access
+   * this application.
+   * Defaults to open access for any Google Account.
+   * 
+ * + * string auth_domain = 6; + * + * @return The bytes for authDomain. + */ + com.google.protobuf.ByteString getAuthDomainBytes(); + + /** + * + * + *
+   * Location from which this application runs. Application instances
+   * run out of the data centers in the specified location, which is also where
+   * all of the application's end user content is stored.
+   * Defaults to `us-central`.
+   * View the list of
+   * [supported locations](https://cloud.google.com/appengine/docs/locations).
+   * 
+ * + * string location_id = 7; + * + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + * + * + *
+   * Location from which this application runs. Application instances
+   * run out of the data centers in the specified location, which is also where
+   * all of the application's end user content is stored.
+   * Defaults to `us-central`.
+   * View the list of
+   * [supported locations](https://cloud.google.com/appengine/docs/locations).
+   * 
+ * + * string location_id = 7; + * + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString getLocationIdBytes(); + + /** + * + * + *
+   * Google Cloud Storage bucket that can be used for storing files
+   * associated with this application. This bucket is associated with the
+   * application and can be used by the gcloud deployment commands.
+   * @OutputOnly
+   * 
+ * + * string code_bucket = 8; + * + * @return The codeBucket. + */ + java.lang.String getCodeBucket(); + /** + * + * + *
+   * Google Cloud Storage bucket that can be used for storing files
+   * associated with this application. This bucket is associated with the
+   * application and can be used by the gcloud deployment commands.
+   * @OutputOnly
+   * 
+ * + * string code_bucket = 8; + * + * @return The bytes for codeBucket. + */ + com.google.protobuf.ByteString getCodeBucketBytes(); + + /** + * + * + *
+   * Cookie expiration policy for this application.
+   * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + * + * @return Whether the defaultCookieExpiration field is set. + */ + boolean hasDefaultCookieExpiration(); + /** + * + * + *
+   * Cookie expiration policy for this application.
+   * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + * + * @return The defaultCookieExpiration. + */ + com.google.protobuf.Duration getDefaultCookieExpiration(); + /** + * + * + *
+   * Cookie expiration policy for this application.
+   * 
+ * + * .google.protobuf.Duration default_cookie_expiration = 9; + */ + com.google.protobuf.DurationOrBuilder getDefaultCookieExpirationOrBuilder(); + + /** + * + * + *
+   * Serving status of this application.
+   * 
+ * + * .google.appengine.v1.Application.ServingStatus serving_status = 10; + * + * @return The enum numeric value on the wire for servingStatus. + */ + int getServingStatusValue(); + /** + * + * + *
+   * Serving status of this application.
+   * 
+ * + * .google.appengine.v1.Application.ServingStatus serving_status = 10; + * + * @return The servingStatus. + */ + com.google.appengine.v1.Application.ServingStatus getServingStatus(); + + /** + * + * + *
+   * Hostname used to reach this application, as resolved by App Engine.
+   * @OutputOnly
+   * 
+ * + * string default_hostname = 11; + * + * @return The defaultHostname. + */ + java.lang.String getDefaultHostname(); + /** + * + * + *
+   * Hostname used to reach this application, as resolved by App Engine.
+   * @OutputOnly
+   * 
+ * + * string default_hostname = 11; + * + * @return The bytes for defaultHostname. + */ + com.google.protobuf.ByteString getDefaultHostnameBytes(); + + /** + * + * + *
+   * Google Cloud Storage bucket that can be used by this application to store
+   * content.
+   * @OutputOnly
+   * 
+ * + * string default_bucket = 12; + * + * @return The defaultBucket. + */ + java.lang.String getDefaultBucket(); + /** + * + * + *
+   * Google Cloud Storage bucket that can be used by this application to store
+   * content.
+   * @OutputOnly
+   * 
+ * + * string default_bucket = 12; + * + * @return The bytes for defaultBucket. + */ + com.google.protobuf.ByteString getDefaultBucketBytes(); + + /** + * .google.appengine.v1.Application.IdentityAwareProxy iap = 14; + * + * @return Whether the iap field is set. + */ + boolean hasIap(); + /** + * .google.appengine.v1.Application.IdentityAwareProxy iap = 14; + * + * @return The iap. + */ + com.google.appengine.v1.Application.IdentityAwareProxy getIap(); + /** .google.appengine.v1.Application.IdentityAwareProxy iap = 14; */ + com.google.appengine.v1.Application.IdentityAwareProxyOrBuilder getIapOrBuilder(); + + /** + * + * + *
+   * The Google Container Registry domain used for storing managed build docker
+   * images for this application.
+   * 
+ * + * string gcr_domain = 16; + * + * @return The gcrDomain. + */ + java.lang.String getGcrDomain(); + /** + * + * + *
+   * The Google Container Registry domain used for storing managed build docker
+   * images for this application.
+   * 
+ * + * string gcr_domain = 16; + * + * @return The bytes for gcrDomain. + */ + com.google.protobuf.ByteString getGcrDomainBytes(); + + /** + * + * + *
+   * The type of the Cloud Firestore or Cloud Datastore database associated with
+   * this application.
+   * 
+ * + * .google.appengine.v1.Application.DatabaseType database_type = 17; + * + * @return The enum numeric value on the wire for databaseType. + */ + int getDatabaseTypeValue(); + /** + * + * + *
+   * The type of the Cloud Firestore or Cloud Datastore database associated with
+   * this application.
+   * 
+ * + * .google.appengine.v1.Application.DatabaseType database_type = 17; + * + * @return The databaseType. + */ + com.google.appengine.v1.Application.DatabaseType getDatabaseType(); + + /** + * + * + *
+   * The feature specific settings to be used in the application.
+   * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + * + * @return Whether the featureSettings field is set. + */ + boolean hasFeatureSettings(); + /** + * + * + *
+   * The feature specific settings to be used in the application.
+   * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + * + * @return The featureSettings. + */ + com.google.appengine.v1.Application.FeatureSettings getFeatureSettings(); + /** + * + * + *
+   * The feature specific settings to be used in the application.
+   * 
+ * + * .google.appengine.v1.Application.FeatureSettings feature_settings = 18; + */ + com.google.appengine.v1.Application.FeatureSettingsOrBuilder getFeatureSettingsOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationProto.java new file mode 100644 index 00000000..6655a15e --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ApplicationProto.java @@ -0,0 +1,149 @@ +/* + * 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/appengine/v1/application.proto + +package com.google.appengine.v1; + +public final class ApplicationProto { + private ApplicationProto() {} + + 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_appengine_v1_Application_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Application_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Application_IdentityAwareProxy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Application_IdentityAwareProxy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Application_FeatureSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Application_FeatureSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_UrlDispatchRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_UrlDispatchRule_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/appengine/v1/application.proto\022" + + "\023google.appengine.v1\032\036google/protobuf/du" + + "ration.proto\032\034google/api/annotations.pro" + + "to\"\360\007\n\013Application\022\014\n\004name\030\001 \001(\t\022\n\n\002id\030\002" + + " \001(\t\022<\n\016dispatch_rules\030\003 \003(\0132$.google.ap" + + "pengine.v1.UrlDispatchRule\022\023\n\013auth_domai" + + "n\030\006 \001(\t\022\023\n\013location_id\030\007 \001(\t\022\023\n\013code_buc" + + "ket\030\010 \001(\t\022<\n\031default_cookie_expiration\030\t" + + " \001(\0132\031.google.protobuf.Duration\022F\n\016servi" + + "ng_status\030\n \001(\0162..google.appengine.v1.Ap" + + "plication.ServingStatus\022\030\n\020default_hostn" + + "ame\030\013 \001(\t\022\026\n\016default_bucket\030\014 \001(\t\022@\n\003iap" + + "\030\016 \001(\01323.google.appengine.v1.Application" + + ".IdentityAwareProxy\022\022\n\ngcr_domain\030\020 \001(\t\022" + + "D\n\rdatabase_type\030\021 \001(\0162-.google.appengin" + + "e.v1.Application.DatabaseType\022J\n\020feature" + + "_settings\030\022 \001(\01320.google.appengine.v1.Ap" + + "plication.FeatureSettings\032\202\001\n\022IdentityAw" + + "areProxy\022\017\n\007enabled\030\001 \001(\010\022\030\n\020oauth2_clie" + + "nt_id\030\002 \001(\t\022\034\n\024oauth2_client_secret\030\003 \001(" + + "\t\022#\n\033oauth2_client_secret_sha256\030\004 \001(\t\032R" + + "\n\017FeatureSettings\022\033\n\023split_health_checks" + + "\030\001 \001(\010\022\"\n\032use_container_optimized_os\030\002 \001" + + "(\010\"U\n\rServingStatus\022\017\n\013UNSPECIFIED\020\000\022\013\n\007" + + "SERVING\020\001\022\021\n\rUSER_DISABLED\020\002\022\023\n\017SYSTEM_D" + + "ISABLED\020\003\"z\n\014DatabaseType\022\035\n\031DATABASE_TY" + + "PE_UNSPECIFIED\020\000\022\023\n\017CLOUD_DATASTORE\020\001\022\023\n" + + "\017CLOUD_FIRESTORE\020\002\022!\n\035CLOUD_DATASTORE_CO" + + "MPATIBILITY\020\003\"@\n\017UrlDispatchRule\022\016\n\006doma" + + "in\030\001 \001(\t\022\014\n\004path\030\002 \001(\t\022\017\n\007service\030\003 \001(\tB" + + "\302\001\n\027com.google.appengine.v1B\020Application" + + "ProtoP\001Z + * App Engine admin service audit log. + * + * + * Protobuf type {@code google.appengine.v1.AuditData} + */ +public final class AuditData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.AuditData) + AuditDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuditData.newBuilder() to construct. + private AuditData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuditData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuditData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AuditData( + 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.appengine.v1.UpdateServiceMethod.Builder subBuilder = null; + if (methodCase_ == 1) { + subBuilder = ((com.google.appengine.v1.UpdateServiceMethod) method_).toBuilder(); + } + method_ = + input.readMessage( + com.google.appengine.v1.UpdateServiceMethod.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.appengine.v1.UpdateServiceMethod) method_); + method_ = subBuilder.buildPartial(); + } + methodCase_ = 1; + break; + } + case 18: + { + com.google.appengine.v1.CreateVersionMethod.Builder subBuilder = null; + if (methodCase_ == 2) { + subBuilder = ((com.google.appengine.v1.CreateVersionMethod) method_).toBuilder(); + } + method_ = + input.readMessage( + com.google.appengine.v1.CreateVersionMethod.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.appengine.v1.CreateVersionMethod) method_); + method_ = subBuilder.buildPartial(); + } + methodCase_ = 2; + 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.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_AuditData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_AuditData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.AuditData.class, + com.google.appengine.v1.AuditData.Builder.class); + } + + private int methodCase_ = 0; + private java.lang.Object method_; + + public enum MethodCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UPDATE_SERVICE(1), + CREATE_VERSION(2), + METHOD_NOT_SET(0); + private final int value; + + private MethodCase(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 MethodCase valueOf(int value) { + return forNumber(value); + } + + public static MethodCase forNumber(int value) { + switch (value) { + case 1: + return UPDATE_SERVICE; + case 2: + return CREATE_VERSION; + case 0: + return METHOD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MethodCase getMethodCase() { + return MethodCase.forNumber(methodCase_); + } + + public static final int UPDATE_SERVICE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Detailed information about UpdateService call.
+   * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + * + * @return Whether the updateService field is set. + */ + @java.lang.Override + public boolean hasUpdateService() { + return methodCase_ == 1; + } + /** + * + * + *
+   * Detailed information about UpdateService call.
+   * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + * + * @return The updateService. + */ + @java.lang.Override + public com.google.appengine.v1.UpdateServiceMethod getUpdateService() { + if (methodCase_ == 1) { + return (com.google.appengine.v1.UpdateServiceMethod) method_; + } + return com.google.appengine.v1.UpdateServiceMethod.getDefaultInstance(); + } + /** + * + * + *
+   * Detailed information about UpdateService call.
+   * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + */ + @java.lang.Override + public com.google.appengine.v1.UpdateServiceMethodOrBuilder getUpdateServiceOrBuilder() { + if (methodCase_ == 1) { + return (com.google.appengine.v1.UpdateServiceMethod) method_; + } + return com.google.appengine.v1.UpdateServiceMethod.getDefaultInstance(); + } + + public static final int CREATE_VERSION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Detailed information about CreateVersion call.
+   * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + * + * @return Whether the createVersion field is set. + */ + @java.lang.Override + public boolean hasCreateVersion() { + return methodCase_ == 2; + } + /** + * + * + *
+   * Detailed information about CreateVersion call.
+   * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + * + * @return The createVersion. + */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionMethod getCreateVersion() { + if (methodCase_ == 2) { + return (com.google.appengine.v1.CreateVersionMethod) method_; + } + return com.google.appengine.v1.CreateVersionMethod.getDefaultInstance(); + } + /** + * + * + *
+   * Detailed information about CreateVersion call.
+   * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionMethodOrBuilder getCreateVersionOrBuilder() { + if (methodCase_ == 2) { + return (com.google.appengine.v1.CreateVersionMethod) method_; + } + return com.google.appengine.v1.CreateVersionMethod.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 (methodCase_ == 1) { + output.writeMessage(1, (com.google.appengine.v1.UpdateServiceMethod) method_); + } + if (methodCase_ == 2) { + output.writeMessage(2, (com.google.appengine.v1.CreateVersionMethod) method_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (methodCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.appengine.v1.UpdateServiceMethod) method_); + } + if (methodCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.appengine.v1.CreateVersionMethod) method_); + } + 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.appengine.v1.AuditData)) { + return super.equals(obj); + } + com.google.appengine.v1.AuditData other = (com.google.appengine.v1.AuditData) obj; + + if (!getMethodCase().equals(other.getMethodCase())) return false; + switch (methodCase_) { + case 1: + if (!getUpdateService().equals(other.getUpdateService())) return false; + break; + case 2: + if (!getCreateVersion().equals(other.getCreateVersion())) 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(); + switch (methodCase_) { + case 1: + hash = (37 * hash) + UPDATE_SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getUpdateService().hashCode(); + break; + case 2: + hash = (37 * hash) + CREATE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getCreateVersion().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.AuditData parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AuditData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.AuditData parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AuditData 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.appengine.v1.AuditData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AuditData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.AuditData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AuditData 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.appengine.v1.AuditData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AuditData 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.appengine.v1.AuditData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AuditData 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.appengine.v1.AuditData 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; + } + /** + * + * + *
+   * App Engine admin service audit log.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.AuditData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.AuditData) + com.google.appengine.v1.AuditDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_AuditData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_AuditData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.AuditData.class, + com.google.appengine.v1.AuditData.Builder.class); + } + + // Construct using com.google.appengine.v1.AuditData.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(); + methodCase_ = 0; + method_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_AuditData_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.AuditData getDefaultInstanceForType() { + return com.google.appengine.v1.AuditData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.AuditData build() { + com.google.appengine.v1.AuditData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.AuditData buildPartial() { + com.google.appengine.v1.AuditData result = new com.google.appengine.v1.AuditData(this); + if (methodCase_ == 1) { + if (updateServiceBuilder_ == null) { + result.method_ = method_; + } else { + result.method_ = updateServiceBuilder_.build(); + } + } + if (methodCase_ == 2) { + if (createVersionBuilder_ == null) { + result.method_ = method_; + } else { + result.method_ = createVersionBuilder_.build(); + } + } + result.methodCase_ = methodCase_; + 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.appengine.v1.AuditData) { + return mergeFrom((com.google.appengine.v1.AuditData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.AuditData other) { + if (other == com.google.appengine.v1.AuditData.getDefaultInstance()) return this; + switch (other.getMethodCase()) { + case UPDATE_SERVICE: + { + mergeUpdateService(other.getUpdateService()); + break; + } + case CREATE_VERSION: + { + mergeCreateVersion(other.getCreateVersion()); + break; + } + case METHOD_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.appengine.v1.AuditData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.AuditData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int methodCase_ = 0; + private java.lang.Object method_; + + public MethodCase getMethodCase() { + return MethodCase.forNumber(methodCase_); + } + + public Builder clearMethod() { + methodCase_ = 0; + method_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.UpdateServiceMethod, + com.google.appengine.v1.UpdateServiceMethod.Builder, + com.google.appengine.v1.UpdateServiceMethodOrBuilder> + updateServiceBuilder_; + /** + * + * + *
+     * Detailed information about UpdateService call.
+     * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + * + * @return Whether the updateService field is set. + */ + @java.lang.Override + public boolean hasUpdateService() { + return methodCase_ == 1; + } + /** + * + * + *
+     * Detailed information about UpdateService call.
+     * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + * + * @return The updateService. + */ + @java.lang.Override + public com.google.appengine.v1.UpdateServiceMethod getUpdateService() { + if (updateServiceBuilder_ == null) { + if (methodCase_ == 1) { + return (com.google.appengine.v1.UpdateServiceMethod) method_; + } + return com.google.appengine.v1.UpdateServiceMethod.getDefaultInstance(); + } else { + if (methodCase_ == 1) { + return updateServiceBuilder_.getMessage(); + } + return com.google.appengine.v1.UpdateServiceMethod.getDefaultInstance(); + } + } + /** + * + * + *
+     * Detailed information about UpdateService call.
+     * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + */ + public Builder setUpdateService(com.google.appengine.v1.UpdateServiceMethod value) { + if (updateServiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + method_ = value; + onChanged(); + } else { + updateServiceBuilder_.setMessage(value); + } + methodCase_ = 1; + return this; + } + /** + * + * + *
+     * Detailed information about UpdateService call.
+     * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + */ + public Builder setUpdateService( + com.google.appengine.v1.UpdateServiceMethod.Builder builderForValue) { + if (updateServiceBuilder_ == null) { + method_ = builderForValue.build(); + onChanged(); + } else { + updateServiceBuilder_.setMessage(builderForValue.build()); + } + methodCase_ = 1; + return this; + } + /** + * + * + *
+     * Detailed information about UpdateService call.
+     * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + */ + public Builder mergeUpdateService(com.google.appengine.v1.UpdateServiceMethod value) { + if (updateServiceBuilder_ == null) { + if (methodCase_ == 1 + && method_ != com.google.appengine.v1.UpdateServiceMethod.getDefaultInstance()) { + method_ = + com.google.appengine.v1.UpdateServiceMethod.newBuilder( + (com.google.appengine.v1.UpdateServiceMethod) method_) + .mergeFrom(value) + .buildPartial(); + } else { + method_ = value; + } + onChanged(); + } else { + if (methodCase_ == 1) { + updateServiceBuilder_.mergeFrom(value); + } + updateServiceBuilder_.setMessage(value); + } + methodCase_ = 1; + return this; + } + /** + * + * + *
+     * Detailed information about UpdateService call.
+     * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + */ + public Builder clearUpdateService() { + if (updateServiceBuilder_ == null) { + if (methodCase_ == 1) { + methodCase_ = 0; + method_ = null; + onChanged(); + } + } else { + if (methodCase_ == 1) { + methodCase_ = 0; + method_ = null; + } + updateServiceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Detailed information about UpdateService call.
+     * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + */ + public com.google.appengine.v1.UpdateServiceMethod.Builder getUpdateServiceBuilder() { + return getUpdateServiceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Detailed information about UpdateService call.
+     * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + */ + @java.lang.Override + public com.google.appengine.v1.UpdateServiceMethodOrBuilder getUpdateServiceOrBuilder() { + if ((methodCase_ == 1) && (updateServiceBuilder_ != null)) { + return updateServiceBuilder_.getMessageOrBuilder(); + } else { + if (methodCase_ == 1) { + return (com.google.appengine.v1.UpdateServiceMethod) method_; + } + return com.google.appengine.v1.UpdateServiceMethod.getDefaultInstance(); + } + } + /** + * + * + *
+     * Detailed information about UpdateService call.
+     * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.UpdateServiceMethod, + com.google.appengine.v1.UpdateServiceMethod.Builder, + com.google.appengine.v1.UpdateServiceMethodOrBuilder> + getUpdateServiceFieldBuilder() { + if (updateServiceBuilder_ == null) { + if (!(methodCase_ == 1)) { + method_ = com.google.appengine.v1.UpdateServiceMethod.getDefaultInstance(); + } + updateServiceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.UpdateServiceMethod, + com.google.appengine.v1.UpdateServiceMethod.Builder, + com.google.appengine.v1.UpdateServiceMethodOrBuilder>( + (com.google.appengine.v1.UpdateServiceMethod) method_, + getParentForChildren(), + isClean()); + method_ = null; + } + methodCase_ = 1; + onChanged(); + ; + return updateServiceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CreateVersionMethod, + com.google.appengine.v1.CreateVersionMethod.Builder, + com.google.appengine.v1.CreateVersionMethodOrBuilder> + createVersionBuilder_; + /** + * + * + *
+     * Detailed information about CreateVersion call.
+     * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + * + * @return Whether the createVersion field is set. + */ + @java.lang.Override + public boolean hasCreateVersion() { + return methodCase_ == 2; + } + /** + * + * + *
+     * Detailed information about CreateVersion call.
+     * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + * + * @return The createVersion. + */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionMethod getCreateVersion() { + if (createVersionBuilder_ == null) { + if (methodCase_ == 2) { + return (com.google.appengine.v1.CreateVersionMethod) method_; + } + return com.google.appengine.v1.CreateVersionMethod.getDefaultInstance(); + } else { + if (methodCase_ == 2) { + return createVersionBuilder_.getMessage(); + } + return com.google.appengine.v1.CreateVersionMethod.getDefaultInstance(); + } + } + /** + * + * + *
+     * Detailed information about CreateVersion call.
+     * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + */ + public Builder setCreateVersion(com.google.appengine.v1.CreateVersionMethod value) { + if (createVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + method_ = value; + onChanged(); + } else { + createVersionBuilder_.setMessage(value); + } + methodCase_ = 2; + return this; + } + /** + * + * + *
+     * Detailed information about CreateVersion call.
+     * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + */ + public Builder setCreateVersion( + com.google.appengine.v1.CreateVersionMethod.Builder builderForValue) { + if (createVersionBuilder_ == null) { + method_ = builderForValue.build(); + onChanged(); + } else { + createVersionBuilder_.setMessage(builderForValue.build()); + } + methodCase_ = 2; + return this; + } + /** + * + * + *
+     * Detailed information about CreateVersion call.
+     * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + */ + public Builder mergeCreateVersion(com.google.appengine.v1.CreateVersionMethod value) { + if (createVersionBuilder_ == null) { + if (methodCase_ == 2 + && method_ != com.google.appengine.v1.CreateVersionMethod.getDefaultInstance()) { + method_ = + com.google.appengine.v1.CreateVersionMethod.newBuilder( + (com.google.appengine.v1.CreateVersionMethod) method_) + .mergeFrom(value) + .buildPartial(); + } else { + method_ = value; + } + onChanged(); + } else { + if (methodCase_ == 2) { + createVersionBuilder_.mergeFrom(value); + } + createVersionBuilder_.setMessage(value); + } + methodCase_ = 2; + return this; + } + /** + * + * + *
+     * Detailed information about CreateVersion call.
+     * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + */ + public Builder clearCreateVersion() { + if (createVersionBuilder_ == null) { + if (methodCase_ == 2) { + methodCase_ = 0; + method_ = null; + onChanged(); + } + } else { + if (methodCase_ == 2) { + methodCase_ = 0; + method_ = null; + } + createVersionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Detailed information about CreateVersion call.
+     * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + */ + public com.google.appengine.v1.CreateVersionMethod.Builder getCreateVersionBuilder() { + return getCreateVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Detailed information about CreateVersion call.
+     * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionMethodOrBuilder getCreateVersionOrBuilder() { + if ((methodCase_ == 2) && (createVersionBuilder_ != null)) { + return createVersionBuilder_.getMessageOrBuilder(); + } else { + if (methodCase_ == 2) { + return (com.google.appengine.v1.CreateVersionMethod) method_; + } + return com.google.appengine.v1.CreateVersionMethod.getDefaultInstance(); + } + } + /** + * + * + *
+     * Detailed information about CreateVersion call.
+     * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CreateVersionMethod, + com.google.appengine.v1.CreateVersionMethod.Builder, + com.google.appengine.v1.CreateVersionMethodOrBuilder> + getCreateVersionFieldBuilder() { + if (createVersionBuilder_ == null) { + if (!(methodCase_ == 2)) { + method_ = com.google.appengine.v1.CreateVersionMethod.getDefaultInstance(); + } + createVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CreateVersionMethod, + com.google.appengine.v1.CreateVersionMethod.Builder, + com.google.appengine.v1.CreateVersionMethodOrBuilder>( + (com.google.appengine.v1.CreateVersionMethod) method_, + getParentForChildren(), + isClean()); + method_ = null; + } + methodCase_ = 2; + onChanged(); + ; + return createVersionBuilder_; + } + + @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.appengine.v1.AuditData) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.AuditData) + private static final com.google.appengine.v1.AuditData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.AuditData(); + } + + public static com.google.appengine.v1.AuditData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuditData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuditData(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.appengine.v1.AuditData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuditDataOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuditDataOrBuilder.java new file mode 100644 index 00000000..a98f96fa --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuditDataOrBuilder.java @@ -0,0 +1,97 @@ +/* + * 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/appengine/v1/audit_data.proto + +package com.google.appengine.v1; + +public interface AuditDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.AuditData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Detailed information about UpdateService call.
+   * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + * + * @return Whether the updateService field is set. + */ + boolean hasUpdateService(); + /** + * + * + *
+   * Detailed information about UpdateService call.
+   * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + * + * @return The updateService. + */ + com.google.appengine.v1.UpdateServiceMethod getUpdateService(); + /** + * + * + *
+   * Detailed information about UpdateService call.
+   * 
+ * + * .google.appengine.v1.UpdateServiceMethod update_service = 1; + */ + com.google.appengine.v1.UpdateServiceMethodOrBuilder getUpdateServiceOrBuilder(); + + /** + * + * + *
+   * Detailed information about CreateVersion call.
+   * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + * + * @return Whether the createVersion field is set. + */ + boolean hasCreateVersion(); + /** + * + * + *
+   * Detailed information about CreateVersion call.
+   * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + * + * @return The createVersion. + */ + com.google.appengine.v1.CreateVersionMethod getCreateVersion(); + /** + * + * + *
+   * Detailed information about CreateVersion call.
+   * 
+ * + * .google.appengine.v1.CreateVersionMethod create_version = 2; + */ + com.google.appengine.v1.CreateVersionMethodOrBuilder getCreateVersionOrBuilder(); + + public com.google.appengine.v1.AuditData.MethodCase getMethodCase(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuditDataProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuditDataProto.java new file mode 100644 index 00000000..070dff72 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuditDataProto.java @@ -0,0 +1,105 @@ +/* + * 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/appengine/v1/audit_data.proto + +package com.google.appengine.v1; + +public final class AuditDataProto { + private AuditDataProto() {} + + 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_appengine_v1_AuditData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_AuditData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_UpdateServiceMethod_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_UpdateServiceMethod_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_CreateVersionMethod_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_CreateVersionMethod_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/appengine/v1/audit_data.proto\022\023" + + "google.appengine.v1\032#google/appengine/v1" + + "/appengine.proto\032\034google/api/annotations" + + ".proto\"\235\001\n\tAuditData\022B\n\016update_service\030\001" + + " \001(\0132(.google.appengine.v1.UpdateService" + + "MethodH\000\022B\n\016create_version\030\002 \001(\0132(.googl" + + "e.appengine.v1.CreateVersionMethodH\000B\010\n\006" + + "method\"Q\n\023UpdateServiceMethod\022:\n\007request" + + "\030\001 \001(\0132).google.appengine.v1.UpdateServi" + + "ceRequest\"Q\n\023CreateVersionMethod\022:\n\007requ" + + "est\030\001 \001(\0132).google.appengine.v1.CreateVe" + + "rsionRequestB\300\001\n\027com.google.appengine.v1" + + "B\016AuditDataProtoP\001Z + * Actions to take when the user is not logged in. + * + * + * Protobuf enum {@code google.appengine.v1.AuthFailAction} + */ +public enum AuthFailAction implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed.
+   * 
+ * + * AUTH_FAIL_ACTION_UNSPECIFIED = 0; + */ + AUTH_FAIL_ACTION_UNSPECIFIED(0), + /** + * + * + *
+   * Redirects user to "accounts.google.com". The user is redirected back to the
+   * application URL after signing in or creating an account.
+   * 
+ * + * AUTH_FAIL_ACTION_REDIRECT = 1; + */ + AUTH_FAIL_ACTION_REDIRECT(1), + /** + * + * + *
+   * Rejects request with a `401` HTTP status code and an error
+   * message.
+   * 
+ * + * AUTH_FAIL_ACTION_UNAUTHORIZED = 2; + */ + AUTH_FAIL_ACTION_UNAUTHORIZED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed.
+   * 
+ * + * AUTH_FAIL_ACTION_UNSPECIFIED = 0; + */ + public static final int AUTH_FAIL_ACTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Redirects user to "accounts.google.com". The user is redirected back to the
+   * application URL after signing in or creating an account.
+   * 
+ * + * AUTH_FAIL_ACTION_REDIRECT = 1; + */ + public static final int AUTH_FAIL_ACTION_REDIRECT_VALUE = 1; + /** + * + * + *
+   * Rejects request with a `401` HTTP status code and an error
+   * message.
+   * 
+ * + * AUTH_FAIL_ACTION_UNAUTHORIZED = 2; + */ + public static final int AUTH_FAIL_ACTION_UNAUTHORIZED_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 AuthFailAction 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 AuthFailAction forNumber(int value) { + switch (value) { + case 0: + return AUTH_FAIL_ACTION_UNSPECIFIED; + case 1: + return AUTH_FAIL_ACTION_REDIRECT; + case 2: + return AUTH_FAIL_ACTION_UNAUTHORIZED; + 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 AuthFailAction findValueByNumber(int number) { + return AuthFailAction.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.appengine.v1.AppYamlProto.getDescriptor().getEnumTypes().get(0); + } + + private static final AuthFailAction[] VALUES = values(); + + public static AuthFailAction 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 AuthFailAction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.AuthFailAction) +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificate.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificate.java new file mode 100644 index 00000000..e22132c7 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificate.java @@ -0,0 +1,2740 @@ +/* + * 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/appengine/v1/certificate.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * An SSL certificate that a user has been authorized to administer. A user
+ * is authorized to administer any certificate that applies to one of their
+ * authorized domains.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.AuthorizedCertificate} + */ +public final class AuthorizedCertificate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.AuthorizedCertificate) + AuthorizedCertificateOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthorizedCertificate.newBuilder() to construct. + private AuthorizedCertificate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuthorizedCertificate() { + name_ = ""; + id_ = ""; + displayName_ = ""; + domainNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + visibleDomainMappings_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthorizedCertificate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AuthorizedCertificate( + 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(); + + id_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + domainNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + domainNames_.add(s); + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expireTime_ != null) { + subBuilder = expireTime_.toBuilder(); + } + expireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expireTime_); + expireTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.appengine.v1.CertificateRawData.Builder subBuilder = null; + if (certificateRawData_ != null) { + subBuilder = certificateRawData_.toBuilder(); + } + certificateRawData_ = + input.readMessage( + com.google.appengine.v1.CertificateRawData.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateRawData_); + certificateRawData_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.appengine.v1.ManagedCertificate.Builder subBuilder = null; + if (managedCertificate_ != null) { + subBuilder = managedCertificate_.toBuilder(); + } + managedCertificate_ = + input.readMessage( + com.google.appengine.v1.ManagedCertificate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(managedCertificate_); + managedCertificate_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + visibleDomainMappings_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + visibleDomainMappings_.add(s); + break; + } + case 72: + { + domainMappingsCount_ = input.readInt32(); + 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)) { + domainNames_ = domainNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + visibleDomainMappings_ = visibleDomainMappings_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_AuthorizedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_AuthorizedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.AuthorizedCertificate.class, + com.google.appengine.v1.AuthorizedCertificate.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Full path to the `AuthorizedCertificate` resource in the API. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Full path to the `AuthorizedCertificate` resource in the API. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Relative name of the certificate. This is a unique value autogenerated
+   * on `AuthorizedCertificate` resource creation. Example: `12345`.
+   * @OutputOnly
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Relative name of the certificate. This is a unique value autogenerated
+   * on `AuthorizedCertificate` resource creation. Example: `12345`.
+   * @OutputOnly
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The user-specified display name of the certificate. This is not
+   * guaranteed to be unique. Example: `My Certificate`.
+   * 
+ * + * string display_name = 3; + * + * @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 user-specified display name of the certificate. This is not
+   * guaranteed to be unique. Example: `My Certificate`.
+   * 
+ * + * string display_name = 3; + * + * @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 DOMAIN_NAMES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList domainNames_; + /** + * + * + *
+   * Topmost applicable domains of this certificate. This certificate
+   * applies to these domains and their subdomains. Example: `example.com`.
+   * @OutputOnly
+   * 
+ * + * repeated string domain_names = 4; + * + * @return A list containing the domainNames. + */ + public com.google.protobuf.ProtocolStringList getDomainNamesList() { + return domainNames_; + } + /** + * + * + *
+   * Topmost applicable domains of this certificate. This certificate
+   * applies to these domains and their subdomains. Example: `example.com`.
+   * @OutputOnly
+   * 
+ * + * repeated string domain_names = 4; + * + * @return The count of domainNames. + */ + public int getDomainNamesCount() { + return domainNames_.size(); + } + /** + * + * + *
+   * Topmost applicable domains of this certificate. This certificate
+   * applies to these domains and their subdomains. Example: `example.com`.
+   * @OutputOnly
+   * 
+ * + * repeated string domain_names = 4; + * + * @param index The index of the element to return. + * @return The domainNames at the given index. + */ + public java.lang.String getDomainNames(int index) { + return domainNames_.get(index); + } + /** + * + * + *
+   * Topmost applicable domains of this certificate. This certificate
+   * applies to these domains and their subdomains. Example: `example.com`.
+   * @OutputOnly
+   * 
+ * + * repeated string domain_names = 4; + * + * @param index The index of the value to return. + * @return The bytes of the domainNames at the given index. + */ + public com.google.protobuf.ByteString getDomainNamesBytes(int index) { + return domainNames_.getByteString(index); + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * The time when this certificate expires. To update the renewal time on this
+   * certificate, upload an SSL certificate with a different expiration time
+   * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * The time when this certificate expires. To update the renewal time on this
+   * certificate, upload an SSL certificate with a different expiration time
+   * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * The time when this certificate expires. To update the renewal time on this
+   * certificate, upload an SSL certificate with a different expiration time
+   * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return getExpireTime(); + } + + public static final int CERTIFICATE_RAW_DATA_FIELD_NUMBER = 6; + private com.google.appengine.v1.CertificateRawData certificateRawData_; + /** + * + * + *
+   * The SSL certificate serving the `AuthorizedCertificate` resource. This
+   * must be obtained independently from a certificate authority.
+   * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + * + * @return Whether the certificateRawData field is set. + */ + @java.lang.Override + public boolean hasCertificateRawData() { + return certificateRawData_ != null; + } + /** + * + * + *
+   * The SSL certificate serving the `AuthorizedCertificate` resource. This
+   * must be obtained independently from a certificate authority.
+   * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + * + * @return The certificateRawData. + */ + @java.lang.Override + public com.google.appengine.v1.CertificateRawData getCertificateRawData() { + return certificateRawData_ == null + ? com.google.appengine.v1.CertificateRawData.getDefaultInstance() + : certificateRawData_; + } + /** + * + * + *
+   * The SSL certificate serving the `AuthorizedCertificate` resource. This
+   * must be obtained independently from a certificate authority.
+   * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + */ + @java.lang.Override + public com.google.appengine.v1.CertificateRawDataOrBuilder getCertificateRawDataOrBuilder() { + return getCertificateRawData(); + } + + public static final int MANAGED_CERTIFICATE_FIELD_NUMBER = 7; + private com.google.appengine.v1.ManagedCertificate managedCertificate_; + /** + * + * + *
+   * Only applicable if this certificate is managed by App Engine. Managed
+   * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+   * updated or deleted via the `AuthorizedCertificates` API. If this
+   * certificate is manually administered by the user, this field will be empty.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + * + * @return Whether the managedCertificate field is set. + */ + @java.lang.Override + public boolean hasManagedCertificate() { + return managedCertificate_ != null; + } + /** + * + * + *
+   * Only applicable if this certificate is managed by App Engine. Managed
+   * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+   * updated or deleted via the `AuthorizedCertificates` API. If this
+   * certificate is manually administered by the user, this field will be empty.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + * + * @return The managedCertificate. + */ + @java.lang.Override + public com.google.appengine.v1.ManagedCertificate getManagedCertificate() { + return managedCertificate_ == null + ? com.google.appengine.v1.ManagedCertificate.getDefaultInstance() + : managedCertificate_; + } + /** + * + * + *
+   * Only applicable if this certificate is managed by App Engine. Managed
+   * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+   * updated or deleted via the `AuthorizedCertificates` API. If this
+   * certificate is manually administered by the user, this field will be empty.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + */ + @java.lang.Override + public com.google.appengine.v1.ManagedCertificateOrBuilder getManagedCertificateOrBuilder() { + return getManagedCertificate(); + } + + public static final int VISIBLE_DOMAIN_MAPPINGS_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList visibleDomainMappings_; + /** + * + * + *
+   * The full paths to user visible Domain Mapping resources that have this
+   * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+   * This may not represent the full list of mapped domain mappings if the user
+   * does not have `VIEWER` permissions on all of the applications that have
+   * this certificate mapped. See `domain_mappings_count` for a complete count.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @return A list containing the visibleDomainMappings. + */ + public com.google.protobuf.ProtocolStringList getVisibleDomainMappingsList() { + return visibleDomainMappings_; + } + /** + * + * + *
+   * The full paths to user visible Domain Mapping resources that have this
+   * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+   * This may not represent the full list of mapped domain mappings if the user
+   * does not have `VIEWER` permissions on all of the applications that have
+   * this certificate mapped. See `domain_mappings_count` for a complete count.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @return The count of visibleDomainMappings. + */ + public int getVisibleDomainMappingsCount() { + return visibleDomainMappings_.size(); + } + /** + * + * + *
+   * The full paths to user visible Domain Mapping resources that have this
+   * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+   * This may not represent the full list of mapped domain mappings if the user
+   * does not have `VIEWER` permissions on all of the applications that have
+   * this certificate mapped. See `domain_mappings_count` for a complete count.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param index The index of the element to return. + * @return The visibleDomainMappings at the given index. + */ + public java.lang.String getVisibleDomainMappings(int index) { + return visibleDomainMappings_.get(index); + } + /** + * + * + *
+   * The full paths to user visible Domain Mapping resources that have this
+   * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+   * This may not represent the full list of mapped domain mappings if the user
+   * does not have `VIEWER` permissions on all of the applications that have
+   * this certificate mapped. See `domain_mappings_count` for a complete count.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param index The index of the value to return. + * @return The bytes of the visibleDomainMappings at the given index. + */ + public com.google.protobuf.ByteString getVisibleDomainMappingsBytes(int index) { + return visibleDomainMappings_.getByteString(index); + } + + public static final int DOMAIN_MAPPINGS_COUNT_FIELD_NUMBER = 9; + private int domainMappingsCount_; + /** + * + * + *
+   * Aggregate count of the domain mappings with this certificate mapped. This
+   * count includes domain mappings on applications for which the user does not
+   * have `VIEWER` permissions.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * int32 domain_mappings_count = 9; + * + * @return The domainMappingsCount. + */ + @java.lang.Override + public int getDomainMappingsCount() { + return domainMappingsCount_; + } + + 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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + for (int i = 0; i < domainNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, domainNames_.getRaw(i)); + } + if (expireTime_ != null) { + output.writeMessage(5, getExpireTime()); + } + if (certificateRawData_ != null) { + output.writeMessage(6, getCertificateRawData()); + } + if (managedCertificate_ != null) { + output.writeMessage(7, getManagedCertificate()); + } + for (int i = 0; i < visibleDomainMappings_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 8, visibleDomainMappings_.getRaw(i)); + } + if (domainMappingsCount_ != 0) { + output.writeInt32(9, domainMappingsCount_); + } + 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 (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + { + int dataSize = 0; + for (int i = 0; i < domainNames_.size(); i++) { + dataSize += computeStringSizeNoTag(domainNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDomainNamesList().size(); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExpireTime()); + } + if (certificateRawData_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCertificateRawData()); + } + if (managedCertificate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getManagedCertificate()); + } + { + int dataSize = 0; + for (int i = 0; i < visibleDomainMappings_.size(); i++) { + dataSize += computeStringSizeNoTag(visibleDomainMappings_.getRaw(i)); + } + size += dataSize; + size += 1 * getVisibleDomainMappingsList().size(); + } + if (domainMappingsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, domainMappingsCount_); + } + 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.appengine.v1.AuthorizedCertificate)) { + return super.equals(obj); + } + com.google.appengine.v1.AuthorizedCertificate other = + (com.google.appengine.v1.AuthorizedCertificate) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDomainNamesList().equals(other.getDomainNamesList())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (hasCertificateRawData() != other.hasCertificateRawData()) return false; + if (hasCertificateRawData()) { + if (!getCertificateRawData().equals(other.getCertificateRawData())) return false; + } + if (hasManagedCertificate() != other.hasManagedCertificate()) return false; + if (hasManagedCertificate()) { + if (!getManagedCertificate().equals(other.getManagedCertificate())) return false; + } + if (!getVisibleDomainMappingsList().equals(other.getVisibleDomainMappingsList())) return false; + if (getDomainMappingsCount() != other.getDomainMappingsCount()) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getDomainNamesCount() > 0) { + hash = (37 * hash) + DOMAIN_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDomainNamesList().hashCode(); + } + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + if (hasCertificateRawData()) { + hash = (37 * hash) + CERTIFICATE_RAW_DATA_FIELD_NUMBER; + hash = (53 * hash) + getCertificateRawData().hashCode(); + } + if (hasManagedCertificate()) { + hash = (37 * hash) + MANAGED_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getManagedCertificate().hashCode(); + } + if (getVisibleDomainMappingsCount() > 0) { + hash = (37 * hash) + VISIBLE_DOMAIN_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + getVisibleDomainMappingsList().hashCode(); + } + hash = (37 * hash) + DOMAIN_MAPPINGS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDomainMappingsCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.AuthorizedCertificate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AuthorizedCertificate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.AuthorizedCertificate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AuthorizedCertificate 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.appengine.v1.AuthorizedCertificate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AuthorizedCertificate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.AuthorizedCertificate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AuthorizedCertificate 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.appengine.v1.AuthorizedCertificate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AuthorizedCertificate 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.appengine.v1.AuthorizedCertificate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AuthorizedCertificate 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.appengine.v1.AuthorizedCertificate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An SSL certificate that a user has been authorized to administer. A user
+   * is authorized to administer any certificate that applies to one of their
+   * authorized domains.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.AuthorizedCertificate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.AuthorizedCertificate) + com.google.appengine.v1.AuthorizedCertificateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_AuthorizedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_AuthorizedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.AuthorizedCertificate.class, + com.google.appengine.v1.AuthorizedCertificate.Builder.class); + } + + // Construct using com.google.appengine.v1.AuthorizedCertificate.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_ = ""; + + id_ = ""; + + displayName_ = ""; + + domainNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (expireTimeBuilder_ == null) { + expireTime_ = null; + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + if (certificateRawDataBuilder_ == null) { + certificateRawData_ = null; + } else { + certificateRawData_ = null; + certificateRawDataBuilder_ = null; + } + if (managedCertificateBuilder_ == null) { + managedCertificate_ = null; + } else { + managedCertificate_ = null; + managedCertificateBuilder_ = null; + } + visibleDomainMappings_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + domainMappingsCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_AuthorizedCertificate_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificate getDefaultInstanceForType() { + return com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificate build() { + com.google.appengine.v1.AuthorizedCertificate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificate buildPartial() { + com.google.appengine.v1.AuthorizedCertificate result = + new com.google.appengine.v1.AuthorizedCertificate(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.id_ = id_; + result.displayName_ = displayName_; + if (((bitField0_ & 0x00000001) != 0)) { + domainNames_ = domainNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.domainNames_ = domainNames_; + if (expireTimeBuilder_ == null) { + result.expireTime_ = expireTime_; + } else { + result.expireTime_ = expireTimeBuilder_.build(); + } + if (certificateRawDataBuilder_ == null) { + result.certificateRawData_ = certificateRawData_; + } else { + result.certificateRawData_ = certificateRawDataBuilder_.build(); + } + if (managedCertificateBuilder_ == null) { + result.managedCertificate_ = managedCertificate_; + } else { + result.managedCertificate_ = managedCertificateBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + visibleDomainMappings_ = visibleDomainMappings_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.visibleDomainMappings_ = visibleDomainMappings_; + result.domainMappingsCount_ = domainMappingsCount_; + 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.appengine.v1.AuthorizedCertificate) { + return mergeFrom((com.google.appengine.v1.AuthorizedCertificate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.AuthorizedCertificate other) { + if (other == com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.domainNames_.isEmpty()) { + if (domainNames_.isEmpty()) { + domainNames_ = other.domainNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDomainNamesIsMutable(); + domainNames_.addAll(other.domainNames_); + } + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (other.hasCertificateRawData()) { + mergeCertificateRawData(other.getCertificateRawData()); + } + if (other.hasManagedCertificate()) { + mergeManagedCertificate(other.getManagedCertificate()); + } + if (!other.visibleDomainMappings_.isEmpty()) { + if (visibleDomainMappings_.isEmpty()) { + visibleDomainMappings_ = other.visibleDomainMappings_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureVisibleDomainMappingsIsMutable(); + visibleDomainMappings_.addAll(other.visibleDomainMappings_); + } + onChanged(); + } + if (other.getDomainMappingsCount() != 0) { + setDomainMappingsCount(other.getDomainMappingsCount()); + } + 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.appengine.v1.AuthorizedCertificate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.AuthorizedCertificate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Full path to the `AuthorizedCertificate` resource in the API. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Full path to the `AuthorizedCertificate` resource in the API. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Full path to the `AuthorizedCertificate` resource in the API. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the `AuthorizedCertificate` resource in the API. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the `AuthorizedCertificate` resource in the API. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Relative name of the certificate. This is a unique value autogenerated
+     * on `AuthorizedCertificate` resource creation. Example: `12345`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Relative name of the certificate. This is a unique value autogenerated
+     * on `AuthorizedCertificate` resource creation. Example: `12345`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Relative name of the certificate. This is a unique value autogenerated
+     * on `AuthorizedCertificate` resource creation. Example: `12345`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the certificate. This is a unique value autogenerated
+     * on `AuthorizedCertificate` resource creation. Example: `12345`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the certificate. This is a unique value autogenerated
+     * on `AuthorizedCertificate` resource creation. Example: `12345`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The user-specified display name of the certificate. This is not
+     * guaranteed to be unique. Example: `My Certificate`.
+     * 
+ * + * string display_name = 3; + * + * @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 user-specified display name of the certificate. This is not
+     * guaranteed to be unique. Example: `My Certificate`.
+     * 
+ * + * string display_name = 3; + * + * @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 user-specified display name of the certificate. This is not
+     * guaranteed to be unique. Example: `My Certificate`.
+     * 
+ * + * string display_name = 3; + * + * @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 user-specified display name of the certificate. This is not
+     * guaranteed to be unique. Example: `My Certificate`.
+     * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The user-specified display name of the certificate. This is not
+     * guaranteed to be unique. Example: `My Certificate`.
+     * 
+ * + * string display_name = 3; + * + * @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.LazyStringList domainNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDomainNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + domainNames_ = new com.google.protobuf.LazyStringArrayList(domainNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Topmost applicable domains of this certificate. This certificate
+     * applies to these domains and their subdomains. Example: `example.com`.
+     * @OutputOnly
+     * 
+ * + * repeated string domain_names = 4; + * + * @return A list containing the domainNames. + */ + public com.google.protobuf.ProtocolStringList getDomainNamesList() { + return domainNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * Topmost applicable domains of this certificate. This certificate
+     * applies to these domains and their subdomains. Example: `example.com`.
+     * @OutputOnly
+     * 
+ * + * repeated string domain_names = 4; + * + * @return The count of domainNames. + */ + public int getDomainNamesCount() { + return domainNames_.size(); + } + /** + * + * + *
+     * Topmost applicable domains of this certificate. This certificate
+     * applies to these domains and their subdomains. Example: `example.com`.
+     * @OutputOnly
+     * 
+ * + * repeated string domain_names = 4; + * + * @param index The index of the element to return. + * @return The domainNames at the given index. + */ + public java.lang.String getDomainNames(int index) { + return domainNames_.get(index); + } + /** + * + * + *
+     * Topmost applicable domains of this certificate. This certificate
+     * applies to these domains and their subdomains. Example: `example.com`.
+     * @OutputOnly
+     * 
+ * + * repeated string domain_names = 4; + * + * @param index The index of the value to return. + * @return The bytes of the domainNames at the given index. + */ + public com.google.protobuf.ByteString getDomainNamesBytes(int index) { + return domainNames_.getByteString(index); + } + /** + * + * + *
+     * Topmost applicable domains of this certificate. This certificate
+     * applies to these domains and their subdomains. Example: `example.com`.
+     * @OutputOnly
+     * 
+ * + * repeated string domain_names = 4; + * + * @param index The index to set the value at. + * @param value The domainNames to set. + * @return This builder for chaining. + */ + public Builder setDomainNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainNamesIsMutable(); + domainNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Topmost applicable domains of this certificate. This certificate
+     * applies to these domains and their subdomains. Example: `example.com`.
+     * @OutputOnly
+     * 
+ * + * repeated string domain_names = 4; + * + * @param value The domainNames to add. + * @return This builder for chaining. + */ + public Builder addDomainNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainNamesIsMutable(); + domainNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Topmost applicable domains of this certificate. This certificate
+     * applies to these domains and their subdomains. Example: `example.com`.
+     * @OutputOnly
+     * 
+ * + * repeated string domain_names = 4; + * + * @param values The domainNames to add. + * @return This builder for chaining. + */ + public Builder addAllDomainNames(java.lang.Iterable values) { + ensureDomainNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, domainNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * Topmost applicable domains of this certificate. This certificate
+     * applies to these domains and their subdomains. Example: `example.com`.
+     * @OutputOnly
+     * 
+ * + * repeated string domain_names = 4; + * + * @return This builder for chaining. + */ + public Builder clearDomainNames() { + domainNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Topmost applicable domains of this certificate. This certificate
+     * applies to these domains and their subdomains. Example: `example.com`.
+     * @OutputOnly
+     * 
+ * + * repeated string domain_names = 4; + * + * @param value The bytes of the domainNames to add. + * @return This builder for chaining. + */ + public Builder addDomainNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDomainNamesIsMutable(); + domainNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * The time when this certificate expires. To update the renewal time on this
+     * certificate, upload an SSL certificate with a different expiration time
+     * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return expireTimeBuilder_ != null || expireTime_ != null; + } + /** + * + * + *
+     * The time when this certificate expires. To update the renewal time on this
+     * certificate, upload an SSL certificate with a different expiration time
+     * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time when this certificate expires. To update the renewal time on this
+     * certificate, upload an SSL certificate with a different expiration time
+     * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + onChanged(); + } else { + expireTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time when this certificate expires. To update the renewal time on this
+     * certificate, upload an SSL certificate with a different expiration time
+     * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + onChanged(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time when this certificate expires. To update the renewal time on this
+     * certificate, upload an SSL certificate with a different expiration time
+     * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (expireTime_ != null) { + expireTime_ = + com.google.protobuf.Timestamp.newBuilder(expireTime_).mergeFrom(value).buildPartial(); + } else { + expireTime_ = value; + } + onChanged(); + } else { + expireTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time when this certificate expires. To update the renewal time on this
+     * certificate, upload an SSL certificate with a different expiration time
+     * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + */ + public Builder clearExpireTime() { + if (expireTimeBuilder_ == null) { + expireTime_ = null; + onChanged(); + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time when this certificate expires. To update the renewal time on this
+     * certificate, upload an SSL certificate with a different expiration time
+     * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when this certificate expires. To update the renewal time on this
+     * certificate, upload an SSL certificate with a different expiration time
+     * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * The time when this certificate expires. To update the renewal time on this
+     * certificate, upload an SSL certificate with a different expiration time
+     * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + private com.google.appengine.v1.CertificateRawData certificateRawData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CertificateRawData, + com.google.appengine.v1.CertificateRawData.Builder, + com.google.appengine.v1.CertificateRawDataOrBuilder> + certificateRawDataBuilder_; + /** + * + * + *
+     * The SSL certificate serving the `AuthorizedCertificate` resource. This
+     * must be obtained independently from a certificate authority.
+     * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + * + * @return Whether the certificateRawData field is set. + */ + public boolean hasCertificateRawData() { + return certificateRawDataBuilder_ != null || certificateRawData_ != null; + } + /** + * + * + *
+     * The SSL certificate serving the `AuthorizedCertificate` resource. This
+     * must be obtained independently from a certificate authority.
+     * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + * + * @return The certificateRawData. + */ + public com.google.appengine.v1.CertificateRawData getCertificateRawData() { + if (certificateRawDataBuilder_ == null) { + return certificateRawData_ == null + ? com.google.appengine.v1.CertificateRawData.getDefaultInstance() + : certificateRawData_; + } else { + return certificateRawDataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The SSL certificate serving the `AuthorizedCertificate` resource. This
+     * must be obtained independently from a certificate authority.
+     * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + */ + public Builder setCertificateRawData(com.google.appengine.v1.CertificateRawData value) { + if (certificateRawDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateRawData_ = value; + onChanged(); + } else { + certificateRawDataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The SSL certificate serving the `AuthorizedCertificate` resource. This
+     * must be obtained independently from a certificate authority.
+     * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + */ + public Builder setCertificateRawData( + com.google.appengine.v1.CertificateRawData.Builder builderForValue) { + if (certificateRawDataBuilder_ == null) { + certificateRawData_ = builderForValue.build(); + onChanged(); + } else { + certificateRawDataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The SSL certificate serving the `AuthorizedCertificate` resource. This
+     * must be obtained independently from a certificate authority.
+     * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + */ + public Builder mergeCertificateRawData(com.google.appengine.v1.CertificateRawData value) { + if (certificateRawDataBuilder_ == null) { + if (certificateRawData_ != null) { + certificateRawData_ = + com.google.appengine.v1.CertificateRawData.newBuilder(certificateRawData_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateRawData_ = value; + } + onChanged(); + } else { + certificateRawDataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The SSL certificate serving the `AuthorizedCertificate` resource. This
+     * must be obtained independently from a certificate authority.
+     * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + */ + public Builder clearCertificateRawData() { + if (certificateRawDataBuilder_ == null) { + certificateRawData_ = null; + onChanged(); + } else { + certificateRawData_ = null; + certificateRawDataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The SSL certificate serving the `AuthorizedCertificate` resource. This
+     * must be obtained independently from a certificate authority.
+     * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + */ + public com.google.appengine.v1.CertificateRawData.Builder getCertificateRawDataBuilder() { + + onChanged(); + return getCertificateRawDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The SSL certificate serving the `AuthorizedCertificate` resource. This
+     * must be obtained independently from a certificate authority.
+     * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + */ + public com.google.appengine.v1.CertificateRawDataOrBuilder getCertificateRawDataOrBuilder() { + if (certificateRawDataBuilder_ != null) { + return certificateRawDataBuilder_.getMessageOrBuilder(); + } else { + return certificateRawData_ == null + ? com.google.appengine.v1.CertificateRawData.getDefaultInstance() + : certificateRawData_; + } + } + /** + * + * + *
+     * The SSL certificate serving the `AuthorizedCertificate` resource. This
+     * must be obtained independently from a certificate authority.
+     * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CertificateRawData, + com.google.appengine.v1.CertificateRawData.Builder, + com.google.appengine.v1.CertificateRawDataOrBuilder> + getCertificateRawDataFieldBuilder() { + if (certificateRawDataBuilder_ == null) { + certificateRawDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CertificateRawData, + com.google.appengine.v1.CertificateRawData.Builder, + com.google.appengine.v1.CertificateRawDataOrBuilder>( + getCertificateRawData(), getParentForChildren(), isClean()); + certificateRawData_ = null; + } + return certificateRawDataBuilder_; + } + + private com.google.appengine.v1.ManagedCertificate managedCertificate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ManagedCertificate, + com.google.appengine.v1.ManagedCertificate.Builder, + com.google.appengine.v1.ManagedCertificateOrBuilder> + managedCertificateBuilder_; + /** + * + * + *
+     * Only applicable if this certificate is managed by App Engine. Managed
+     * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+     * updated or deleted via the `AuthorizedCertificates` API. If this
+     * certificate is manually administered by the user, this field will be empty.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + * + * @return Whether the managedCertificate field is set. + */ + public boolean hasManagedCertificate() { + return managedCertificateBuilder_ != null || managedCertificate_ != null; + } + /** + * + * + *
+     * Only applicable if this certificate is managed by App Engine. Managed
+     * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+     * updated or deleted via the `AuthorizedCertificates` API. If this
+     * certificate is manually administered by the user, this field will be empty.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + * + * @return The managedCertificate. + */ + public com.google.appengine.v1.ManagedCertificate getManagedCertificate() { + if (managedCertificateBuilder_ == null) { + return managedCertificate_ == null + ? com.google.appengine.v1.ManagedCertificate.getDefaultInstance() + : managedCertificate_; + } else { + return managedCertificateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Only applicable if this certificate is managed by App Engine. Managed
+     * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+     * updated or deleted via the `AuthorizedCertificates` API. If this
+     * certificate is manually administered by the user, this field will be empty.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + */ + public Builder setManagedCertificate(com.google.appengine.v1.ManagedCertificate value) { + if (managedCertificateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + managedCertificate_ = value; + onChanged(); + } else { + managedCertificateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Only applicable if this certificate is managed by App Engine. Managed
+     * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+     * updated or deleted via the `AuthorizedCertificates` API. If this
+     * certificate is manually administered by the user, this field will be empty.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + */ + public Builder setManagedCertificate( + com.google.appengine.v1.ManagedCertificate.Builder builderForValue) { + if (managedCertificateBuilder_ == null) { + managedCertificate_ = builderForValue.build(); + onChanged(); + } else { + managedCertificateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Only applicable if this certificate is managed by App Engine. Managed
+     * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+     * updated or deleted via the `AuthorizedCertificates` API. If this
+     * certificate is manually administered by the user, this field will be empty.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + */ + public Builder mergeManagedCertificate(com.google.appengine.v1.ManagedCertificate value) { + if (managedCertificateBuilder_ == null) { + if (managedCertificate_ != null) { + managedCertificate_ = + com.google.appengine.v1.ManagedCertificate.newBuilder(managedCertificate_) + .mergeFrom(value) + .buildPartial(); + } else { + managedCertificate_ = value; + } + onChanged(); + } else { + managedCertificateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Only applicable if this certificate is managed by App Engine. Managed
+     * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+     * updated or deleted via the `AuthorizedCertificates` API. If this
+     * certificate is manually administered by the user, this field will be empty.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + */ + public Builder clearManagedCertificate() { + if (managedCertificateBuilder_ == null) { + managedCertificate_ = null; + onChanged(); + } else { + managedCertificate_ = null; + managedCertificateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Only applicable if this certificate is managed by App Engine. Managed
+     * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+     * updated or deleted via the `AuthorizedCertificates` API. If this
+     * certificate is manually administered by the user, this field will be empty.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + */ + public com.google.appengine.v1.ManagedCertificate.Builder getManagedCertificateBuilder() { + + onChanged(); + return getManagedCertificateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Only applicable if this certificate is managed by App Engine. Managed
+     * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+     * updated or deleted via the `AuthorizedCertificates` API. If this
+     * certificate is manually administered by the user, this field will be empty.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + */ + public com.google.appengine.v1.ManagedCertificateOrBuilder getManagedCertificateOrBuilder() { + if (managedCertificateBuilder_ != null) { + return managedCertificateBuilder_.getMessageOrBuilder(); + } else { + return managedCertificate_ == null + ? com.google.appengine.v1.ManagedCertificate.getDefaultInstance() + : managedCertificate_; + } + } + /** + * + * + *
+     * Only applicable if this certificate is managed by App Engine. Managed
+     * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+     * updated or deleted via the `AuthorizedCertificates` API. If this
+     * certificate is manually administered by the user, this field will be empty.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ManagedCertificate, + com.google.appengine.v1.ManagedCertificate.Builder, + com.google.appengine.v1.ManagedCertificateOrBuilder> + getManagedCertificateFieldBuilder() { + if (managedCertificateBuilder_ == null) { + managedCertificateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ManagedCertificate, + com.google.appengine.v1.ManagedCertificate.Builder, + com.google.appengine.v1.ManagedCertificateOrBuilder>( + getManagedCertificate(), getParentForChildren(), isClean()); + managedCertificate_ = null; + } + return managedCertificateBuilder_; + } + + private com.google.protobuf.LazyStringList visibleDomainMappings_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureVisibleDomainMappingsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + visibleDomainMappings_ = + new com.google.protobuf.LazyStringArrayList(visibleDomainMappings_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The full paths to user visible Domain Mapping resources that have this
+     * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+     * This may not represent the full list of mapped domain mappings if the user
+     * does not have `VIEWER` permissions on all of the applications that have
+     * this certificate mapped. See `domain_mappings_count` for a complete count.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @return A list containing the visibleDomainMappings. + */ + public com.google.protobuf.ProtocolStringList getVisibleDomainMappingsList() { + return visibleDomainMappings_.getUnmodifiableView(); + } + /** + * + * + *
+     * The full paths to user visible Domain Mapping resources that have this
+     * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+     * This may not represent the full list of mapped domain mappings if the user
+     * does not have `VIEWER` permissions on all of the applications that have
+     * this certificate mapped. See `domain_mappings_count` for a complete count.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @return The count of visibleDomainMappings. + */ + public int getVisibleDomainMappingsCount() { + return visibleDomainMappings_.size(); + } + /** + * + * + *
+     * The full paths to user visible Domain Mapping resources that have this
+     * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+     * This may not represent the full list of mapped domain mappings if the user
+     * does not have `VIEWER` permissions on all of the applications that have
+     * this certificate mapped. See `domain_mappings_count` for a complete count.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param index The index of the element to return. + * @return The visibleDomainMappings at the given index. + */ + public java.lang.String getVisibleDomainMappings(int index) { + return visibleDomainMappings_.get(index); + } + /** + * + * + *
+     * The full paths to user visible Domain Mapping resources that have this
+     * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+     * This may not represent the full list of mapped domain mappings if the user
+     * does not have `VIEWER` permissions on all of the applications that have
+     * this certificate mapped. See `domain_mappings_count` for a complete count.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param index The index of the value to return. + * @return The bytes of the visibleDomainMappings at the given index. + */ + public com.google.protobuf.ByteString getVisibleDomainMappingsBytes(int index) { + return visibleDomainMappings_.getByteString(index); + } + /** + * + * + *
+     * The full paths to user visible Domain Mapping resources that have this
+     * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+     * This may not represent the full list of mapped domain mappings if the user
+     * does not have `VIEWER` permissions on all of the applications that have
+     * this certificate mapped. See `domain_mappings_count` for a complete count.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param index The index to set the value at. + * @param value The visibleDomainMappings to set. + * @return This builder for chaining. + */ + public Builder setVisibleDomainMappings(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisibleDomainMappingsIsMutable(); + visibleDomainMappings_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The full paths to user visible Domain Mapping resources that have this
+     * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+     * This may not represent the full list of mapped domain mappings if the user
+     * does not have `VIEWER` permissions on all of the applications that have
+     * this certificate mapped. See `domain_mappings_count` for a complete count.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param value The visibleDomainMappings to add. + * @return This builder for chaining. + */ + public Builder addVisibleDomainMappings(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisibleDomainMappingsIsMutable(); + visibleDomainMappings_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The full paths to user visible Domain Mapping resources that have this
+     * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+     * This may not represent the full list of mapped domain mappings if the user
+     * does not have `VIEWER` permissions on all of the applications that have
+     * this certificate mapped. See `domain_mappings_count` for a complete count.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param values The visibleDomainMappings to add. + * @return This builder for chaining. + */ + public Builder addAllVisibleDomainMappings(java.lang.Iterable values) { + ensureVisibleDomainMappingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, visibleDomainMappings_); + onChanged(); + return this; + } + /** + * + * + *
+     * The full paths to user visible Domain Mapping resources that have this
+     * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+     * This may not represent the full list of mapped domain mappings if the user
+     * does not have `VIEWER` permissions on all of the applications that have
+     * this certificate mapped. See `domain_mappings_count` for a complete count.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @return This builder for chaining. + */ + public Builder clearVisibleDomainMappings() { + visibleDomainMappings_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The full paths to user visible Domain Mapping resources that have this
+     * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+     * This may not represent the full list of mapped domain mappings if the user
+     * does not have `VIEWER` permissions on all of the applications that have
+     * this certificate mapped. See `domain_mappings_count` for a complete count.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param value The bytes of the visibleDomainMappings to add. + * @return This builder for chaining. + */ + public Builder addVisibleDomainMappingsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureVisibleDomainMappingsIsMutable(); + visibleDomainMappings_.add(value); + onChanged(); + return this; + } + + private int domainMappingsCount_; + /** + * + * + *
+     * Aggregate count of the domain mappings with this certificate mapped. This
+     * count includes domain mappings on applications for which the user does not
+     * have `VIEWER` permissions.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * int32 domain_mappings_count = 9; + * + * @return The domainMappingsCount. + */ + @java.lang.Override + public int getDomainMappingsCount() { + return domainMappingsCount_; + } + /** + * + * + *
+     * Aggregate count of the domain mappings with this certificate mapped. This
+     * count includes domain mappings on applications for which the user does not
+     * have `VIEWER` permissions.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * int32 domain_mappings_count = 9; + * + * @param value The domainMappingsCount to set. + * @return This builder for chaining. + */ + public Builder setDomainMappingsCount(int value) { + + domainMappingsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate count of the domain mappings with this certificate mapped. This
+     * count includes domain mappings on applications for which the user does not
+     * have `VIEWER` permissions.
+     * Only returned by `GET` or `LIST` requests when specifically requested by
+     * the `view=FULL_CERTIFICATE` option.
+     * @OutputOnly
+     * 
+ * + * int32 domain_mappings_count = 9; + * + * @return This builder for chaining. + */ + public Builder clearDomainMappingsCount() { + + domainMappingsCount_ = 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.appengine.v1.AuthorizedCertificate) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.AuthorizedCertificate) + private static final com.google.appengine.v1.AuthorizedCertificate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.AuthorizedCertificate(); + } + + public static com.google.appengine.v1.AuthorizedCertificate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthorizedCertificate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuthorizedCertificate(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.appengine.v1.AuthorizedCertificate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificateOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificateOrBuilder.java new file mode 100644 index 00000000..951117a8 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificateOrBuilder.java @@ -0,0 +1,395 @@ +/* + * 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/appengine/v1/certificate.proto + +package com.google.appengine.v1; + +public interface AuthorizedCertificateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.AuthorizedCertificate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Full path to the `AuthorizedCertificate` resource in the API. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Full path to the `AuthorizedCertificate` resource in the API. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Relative name of the certificate. This is a unique value autogenerated
+   * on `AuthorizedCertificate` resource creation. Example: `12345`.
+   * @OutputOnly
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Relative name of the certificate. This is a unique value autogenerated
+   * on `AuthorizedCertificate` resource creation. Example: `12345`.
+   * @OutputOnly
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * The user-specified display name of the certificate. This is not
+   * guaranteed to be unique. Example: `My Certificate`.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The user-specified display name of the certificate. This is not
+   * guaranteed to be unique. Example: `My Certificate`.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Topmost applicable domains of this certificate. This certificate
+   * applies to these domains and their subdomains. Example: `example.com`.
+   * @OutputOnly
+   * 
+ * + * repeated string domain_names = 4; + * + * @return A list containing the domainNames. + */ + java.util.List getDomainNamesList(); + /** + * + * + *
+   * Topmost applicable domains of this certificate. This certificate
+   * applies to these domains and their subdomains. Example: `example.com`.
+   * @OutputOnly
+   * 
+ * + * repeated string domain_names = 4; + * + * @return The count of domainNames. + */ + int getDomainNamesCount(); + /** + * + * + *
+   * Topmost applicable domains of this certificate. This certificate
+   * applies to these domains and their subdomains. Example: `example.com`.
+   * @OutputOnly
+   * 
+ * + * repeated string domain_names = 4; + * + * @param index The index of the element to return. + * @return The domainNames at the given index. + */ + java.lang.String getDomainNames(int index); + /** + * + * + *
+   * Topmost applicable domains of this certificate. This certificate
+   * applies to these domains and their subdomains. Example: `example.com`.
+   * @OutputOnly
+   * 
+ * + * repeated string domain_names = 4; + * + * @param index The index of the value to return. + * @return The bytes of the domainNames at the given index. + */ + com.google.protobuf.ByteString getDomainNamesBytes(int index); + + /** + * + * + *
+   * The time when this certificate expires. To update the renewal time on this
+   * certificate, upload an SSL certificate with a different expiration time
+   * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * The time when this certificate expires. To update the renewal time on this
+   * certificate, upload an SSL certificate with a different expiration time
+   * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * The time when this certificate expires. To update the renewal time on this
+   * certificate, upload an SSL certificate with a different expiration time
+   * using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * The SSL certificate serving the `AuthorizedCertificate` resource. This
+   * must be obtained independently from a certificate authority.
+   * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + * + * @return Whether the certificateRawData field is set. + */ + boolean hasCertificateRawData(); + /** + * + * + *
+   * The SSL certificate serving the `AuthorizedCertificate` resource. This
+   * must be obtained independently from a certificate authority.
+   * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + * + * @return The certificateRawData. + */ + com.google.appengine.v1.CertificateRawData getCertificateRawData(); + /** + * + * + *
+   * The SSL certificate serving the `AuthorizedCertificate` resource. This
+   * must be obtained independently from a certificate authority.
+   * 
+ * + * .google.appengine.v1.CertificateRawData certificate_raw_data = 6; + */ + com.google.appengine.v1.CertificateRawDataOrBuilder getCertificateRawDataOrBuilder(); + + /** + * + * + *
+   * Only applicable if this certificate is managed by App Engine. Managed
+   * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+   * updated or deleted via the `AuthorizedCertificates` API. If this
+   * certificate is manually administered by the user, this field will be empty.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + * + * @return Whether the managedCertificate field is set. + */ + boolean hasManagedCertificate(); + /** + * + * + *
+   * Only applicable if this certificate is managed by App Engine. Managed
+   * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+   * updated or deleted via the `AuthorizedCertificates` API. If this
+   * certificate is manually administered by the user, this field will be empty.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + * + * @return The managedCertificate. + */ + com.google.appengine.v1.ManagedCertificate getManagedCertificate(); + /** + * + * + *
+   * Only applicable if this certificate is managed by App Engine. Managed
+   * certificates are tied to the lifecycle of a `DomainMapping` and cannot be
+   * updated or deleted via the `AuthorizedCertificates` API. If this
+   * certificate is manually administered by the user, this field will be empty.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagedCertificate managed_certificate = 7; + */ + com.google.appengine.v1.ManagedCertificateOrBuilder getManagedCertificateOrBuilder(); + + /** + * + * + *
+   * The full paths to user visible Domain Mapping resources that have this
+   * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+   * This may not represent the full list of mapped domain mappings if the user
+   * does not have `VIEWER` permissions on all of the applications that have
+   * this certificate mapped. See `domain_mappings_count` for a complete count.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @return A list containing the visibleDomainMappings. + */ + java.util.List getVisibleDomainMappingsList(); + /** + * + * + *
+   * The full paths to user visible Domain Mapping resources that have this
+   * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+   * This may not represent the full list of mapped domain mappings if the user
+   * does not have `VIEWER` permissions on all of the applications that have
+   * this certificate mapped. See `domain_mappings_count` for a complete count.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @return The count of visibleDomainMappings. + */ + int getVisibleDomainMappingsCount(); + /** + * + * + *
+   * The full paths to user visible Domain Mapping resources that have this
+   * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+   * This may not represent the full list of mapped domain mappings if the user
+   * does not have `VIEWER` permissions on all of the applications that have
+   * this certificate mapped. See `domain_mappings_count` for a complete count.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param index The index of the element to return. + * @return The visibleDomainMappings at the given index. + */ + java.lang.String getVisibleDomainMappings(int index); + /** + * + * + *
+   * The full paths to user visible Domain Mapping resources that have this
+   * certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
+   * This may not represent the full list of mapped domain mappings if the user
+   * does not have `VIEWER` permissions on all of the applications that have
+   * this certificate mapped. See `domain_mappings_count` for a complete count.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * repeated string visible_domain_mappings = 8; + * + * @param index The index of the value to return. + * @return The bytes of the visibleDomainMappings at the given index. + */ + com.google.protobuf.ByteString getVisibleDomainMappingsBytes(int index); + + /** + * + * + *
+   * Aggregate count of the domain mappings with this certificate mapped. This
+   * count includes domain mappings on applications for which the user does not
+   * have `VIEWER` permissions.
+   * Only returned by `GET` or `LIST` requests when specifically requested by
+   * the `view=FULL_CERTIFICATE` option.
+   * @OutputOnly
+   * 
+ * + * int32 domain_mappings_count = 9; + * + * @return The domainMappingsCount. + */ + int getDomainMappingsCount(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificateView.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificateView.java new file mode 100644 index 00000000..8437f234 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedCertificateView.java @@ -0,0 +1,162 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Fields that should be returned when an AuthorizedCertificate resource is
+ * retrieved.
+ * 
+ * + * Protobuf enum {@code google.appengine.v1.AuthorizedCertificateView} + */ +public enum AuthorizedCertificateView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Basic certificate information, including applicable domains and expiration
+   * date.
+   * 
+ * + * BASIC_CERTIFICATE = 0; + */ + BASIC_CERTIFICATE(0), + /** + * + * + *
+   * The information from `BASIC_CERTIFICATE`, plus detailed information on the
+   * domain mappings that have this certificate mapped.
+   * 
+ * + * FULL_CERTIFICATE = 1; + */ + FULL_CERTIFICATE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Basic certificate information, including applicable domains and expiration
+   * date.
+   * 
+ * + * BASIC_CERTIFICATE = 0; + */ + public static final int BASIC_CERTIFICATE_VALUE = 0; + /** + * + * + *
+   * The information from `BASIC_CERTIFICATE`, plus detailed information on the
+   * domain mappings that have this certificate mapped.
+   * 
+ * + * FULL_CERTIFICATE = 1; + */ + public static final int FULL_CERTIFICATE_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthorizedCertificateView 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 AuthorizedCertificateView forNumber(int value) { + switch (value) { + case 0: + return BASIC_CERTIFICATE; + case 1: + return FULL_CERTIFICATE; + 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 AuthorizedCertificateView findValueByNumber(int number) { + return AuthorizedCertificateView.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.appengine.v1.AppengineProto.getDescriptor().getEnumTypes().get(1); + } + + private static final AuthorizedCertificateView[] VALUES = values(); + + public static AuthorizedCertificateView 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 AuthorizedCertificateView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.AuthorizedCertificateView) +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomain.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomain.java new file mode 100644 index 00000000..effa813d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomain.java @@ -0,0 +1,837 @@ +/* + * 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/appengine/v1/domain.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * A domain that a user has been authorized to administer. To authorize use
+ * of a domain, verify ownership via
+ * [Webmaster Central](https://www.google.com/webmasters/verification/home).
+ * 
+ * + * Protobuf type {@code google.appengine.v1.AuthorizedDomain} + */ +public final class AuthorizedDomain extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.AuthorizedDomain) + AuthorizedDomainOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthorizedDomain.newBuilder() to construct. + private AuthorizedDomain(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuthorizedDomain() { + name_ = ""; + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthorizedDomain(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AuthorizedDomain( + 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; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = 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.appengine.v1.DomainProto + .internal_static_google_appengine_v1_AuthorizedDomain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DomainProto + .internal_static_google_appengine_v1_AuthorizedDomain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.AuthorizedDomain.class, + com.google.appengine.v1.AuthorizedDomain.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Full path to the `AuthorizedDomain` resource in the API. Example:
+   * `apps/myapp/authorizedDomains/example.com`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Full path to the `AuthorizedDomain` resource in the API. Example:
+   * `apps/myapp/authorizedDomains/example.com`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Fully qualified domain name of the domain authorized for use. Example:
+   * `example.com`.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Fully qualified domain name of the domain authorized for use. Example:
+   * `example.com`.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = 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_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + 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 (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + 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.appengine.v1.AuthorizedDomain)) { + return super.equals(obj); + } + com.google.appengine.v1.AuthorizedDomain other = (com.google.appengine.v1.AuthorizedDomain) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.AuthorizedDomain parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AuthorizedDomain parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.AuthorizedDomain parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AuthorizedDomain 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.appengine.v1.AuthorizedDomain parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AuthorizedDomain parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.AuthorizedDomain parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AuthorizedDomain 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.appengine.v1.AuthorizedDomain parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AuthorizedDomain 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.appengine.v1.AuthorizedDomain parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AuthorizedDomain 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.appengine.v1.AuthorizedDomain 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 domain that a user has been authorized to administer. To authorize use
+   * of a domain, verify ownership via
+   * [Webmaster Central](https://www.google.com/webmasters/verification/home).
+   * 
+ * + * Protobuf type {@code google.appengine.v1.AuthorizedDomain} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.AuthorizedDomain) + com.google.appengine.v1.AuthorizedDomainOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DomainProto + .internal_static_google_appengine_v1_AuthorizedDomain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DomainProto + .internal_static_google_appengine_v1_AuthorizedDomain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.AuthorizedDomain.class, + com.google.appengine.v1.AuthorizedDomain.Builder.class); + } + + // Construct using com.google.appengine.v1.AuthorizedDomain.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_ = ""; + + id_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.DomainProto + .internal_static_google_appengine_v1_AuthorizedDomain_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.AuthorizedDomain getDefaultInstanceForType() { + return com.google.appengine.v1.AuthorizedDomain.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.AuthorizedDomain build() { + com.google.appengine.v1.AuthorizedDomain result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.AuthorizedDomain buildPartial() { + com.google.appengine.v1.AuthorizedDomain result = + new com.google.appengine.v1.AuthorizedDomain(this); + result.name_ = name_; + result.id_ = id_; + 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.appengine.v1.AuthorizedDomain) { + return mergeFrom((com.google.appengine.v1.AuthorizedDomain) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.AuthorizedDomain other) { + if (other == com.google.appengine.v1.AuthorizedDomain.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + 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.appengine.v1.AuthorizedDomain parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.AuthorizedDomain) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Full path to the `AuthorizedDomain` resource in the API. Example:
+     * `apps/myapp/authorizedDomains/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Full path to the `AuthorizedDomain` resource in the API. Example:
+     * `apps/myapp/authorizedDomains/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Full path to the `AuthorizedDomain` resource in the API. Example:
+     * `apps/myapp/authorizedDomains/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the `AuthorizedDomain` resource in the API. Example:
+     * `apps/myapp/authorizedDomains/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the `AuthorizedDomain` resource in the API. Example:
+     * `apps/myapp/authorizedDomains/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Fully qualified domain name of the domain authorized for use. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Fully qualified domain name of the domain authorized for use. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Fully qualified domain name of the domain authorized for use. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Fully qualified domain name of the domain authorized for use. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Fully qualified domain name of the domain authorized for use. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = 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.appengine.v1.AuthorizedDomain) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.AuthorizedDomain) + private static final com.google.appengine.v1.AuthorizedDomain DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.AuthorizedDomain(); + } + + public static com.google.appengine.v1.AuthorizedDomain getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthorizedDomain parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuthorizedDomain(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.appengine.v1.AuthorizedDomain getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomainOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomainOrBuilder.java new file mode 100644 index 00000000..9eef6a9f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AuthorizedDomainOrBuilder.java @@ -0,0 +1,81 @@ +/* + * 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/appengine/v1/domain.proto + +package com.google.appengine.v1; + +public interface AuthorizedDomainOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.AuthorizedDomain) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Full path to the `AuthorizedDomain` resource in the API. Example:
+   * `apps/myapp/authorizedDomains/example.com`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Full path to the `AuthorizedDomain` resource in the API. Example:
+   * `apps/myapp/authorizedDomains/example.com`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Fully qualified domain name of the domain authorized for use. Example:
+   * `example.com`.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Fully qualified domain name of the domain authorized for use. Example:
+   * `example.com`.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AutomaticScaling.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AutomaticScaling.java new file mode 100644 index 00000000..1f238dc8 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AutomaticScaling.java @@ -0,0 +1,3241 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Automatic scaling is based on request rate, response latencies, and other
+ * application metrics.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.AutomaticScaling} + */ +public final class AutomaticScaling extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.AutomaticScaling) + AutomaticScalingOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomaticScaling.newBuilder() to construct. + private AutomaticScaling(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomaticScaling() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomaticScaling(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutomaticScaling( + 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.Duration.Builder subBuilder = null; + if (coolDownPeriod_ != null) { + subBuilder = coolDownPeriod_.toBuilder(); + } + coolDownPeriod_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(coolDownPeriod_); + coolDownPeriod_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.appengine.v1.CpuUtilization.Builder subBuilder = null; + if (cpuUtilization_ != null) { + subBuilder = cpuUtilization_.toBuilder(); + } + cpuUtilization_ = + input.readMessage( + com.google.appengine.v1.CpuUtilization.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cpuUtilization_); + cpuUtilization_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + maxConcurrentRequests_ = input.readInt32(); + break; + } + case 32: + { + maxIdleInstances_ = input.readInt32(); + break; + } + case 40: + { + maxTotalInstances_ = input.readInt32(); + break; + } + case 50: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (maxPendingLatency_ != null) { + subBuilder = maxPendingLatency_.toBuilder(); + } + maxPendingLatency_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxPendingLatency_); + maxPendingLatency_ = subBuilder.buildPartial(); + } + + break; + } + case 56: + { + minIdleInstances_ = input.readInt32(); + break; + } + case 64: + { + minTotalInstances_ = input.readInt32(); + break; + } + case 74: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (minPendingLatency_ != null) { + subBuilder = minPendingLatency_.toBuilder(); + } + minPendingLatency_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minPendingLatency_); + minPendingLatency_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.appengine.v1.RequestUtilization.Builder subBuilder = null; + if (requestUtilization_ != null) { + subBuilder = requestUtilization_.toBuilder(); + } + requestUtilization_ = + input.readMessage( + com.google.appengine.v1.RequestUtilization.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(requestUtilization_); + requestUtilization_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.appengine.v1.DiskUtilization.Builder subBuilder = null; + if (diskUtilization_ != null) { + subBuilder = diskUtilization_.toBuilder(); + } + diskUtilization_ = + input.readMessage( + com.google.appengine.v1.DiskUtilization.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(diskUtilization_); + diskUtilization_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.appengine.v1.NetworkUtilization.Builder subBuilder = null; + if (networkUtilization_ != null) { + subBuilder = networkUtilization_.toBuilder(); + } + networkUtilization_ = + input.readMessage( + com.google.appengine.v1.NetworkUtilization.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(networkUtilization_); + networkUtilization_ = subBuilder.buildPartial(); + } + + break; + } + case 162: + { + com.google.appengine.v1.StandardSchedulerSettings.Builder subBuilder = null; + if (standardSchedulerSettings_ != null) { + subBuilder = standardSchedulerSettings_.toBuilder(); + } + standardSchedulerSettings_ = + input.readMessage( + com.google.appengine.v1.StandardSchedulerSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(standardSchedulerSettings_); + standardSchedulerSettings_ = 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_AutomaticScaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_AutomaticScaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.AutomaticScaling.class, + com.google.appengine.v1.AutomaticScaling.Builder.class); + } + + public static final int COOL_DOWN_PERIOD_FIELD_NUMBER = 1; + private com.google.protobuf.Duration coolDownPeriod_; + /** + * + * + *
+   * The time period that the
+   * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+   * should wait before it starts collecting information from a new instance.
+   * This prevents the autoscaler from collecting information when the instance
+   * is initializing, during which the collected usage would not be reliable.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + * + * @return Whether the coolDownPeriod field is set. + */ + @java.lang.Override + public boolean hasCoolDownPeriod() { + return coolDownPeriod_ != null; + } + /** + * + * + *
+   * The time period that the
+   * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+   * should wait before it starts collecting information from a new instance.
+   * This prevents the autoscaler from collecting information when the instance
+   * is initializing, during which the collected usage would not be reliable.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + * + * @return The coolDownPeriod. + */ + @java.lang.Override + public com.google.protobuf.Duration getCoolDownPeriod() { + return coolDownPeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : coolDownPeriod_; + } + /** + * + * + *
+   * The time period that the
+   * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+   * should wait before it starts collecting information from a new instance.
+   * This prevents the autoscaler from collecting information when the instance
+   * is initializing, during which the collected usage would not be reliable.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getCoolDownPeriodOrBuilder() { + return getCoolDownPeriod(); + } + + public static final int CPU_UTILIZATION_FIELD_NUMBER = 2; + private com.google.appengine.v1.CpuUtilization cpuUtilization_; + /** + * + * + *
+   * Target scaling by CPU usage.
+   * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + * + * @return Whether the cpuUtilization field is set. + */ + @java.lang.Override + public boolean hasCpuUtilization() { + return cpuUtilization_ != null; + } + /** + * + * + *
+   * Target scaling by CPU usage.
+   * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + * + * @return The cpuUtilization. + */ + @java.lang.Override + public com.google.appengine.v1.CpuUtilization getCpuUtilization() { + return cpuUtilization_ == null + ? com.google.appengine.v1.CpuUtilization.getDefaultInstance() + : cpuUtilization_; + } + /** + * + * + *
+   * Target scaling by CPU usage.
+   * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + */ + @java.lang.Override + public com.google.appengine.v1.CpuUtilizationOrBuilder getCpuUtilizationOrBuilder() { + return getCpuUtilization(); + } + + public static final int MAX_CONCURRENT_REQUESTS_FIELD_NUMBER = 3; + private int maxConcurrentRequests_; + /** + * + * + *
+   * Number of concurrent requests an automatic scaling instance can accept
+   * before the scheduler spawns a new instance.
+   * Defaults to a runtime-specific value.
+   * 
+ * + * int32 max_concurrent_requests = 3; + * + * @return The maxConcurrentRequests. + */ + @java.lang.Override + public int getMaxConcurrentRequests() { + return maxConcurrentRequests_; + } + + public static final int MAX_IDLE_INSTANCES_FIELD_NUMBER = 4; + private int maxIdleInstances_; + /** + * + * + *
+   * Maximum number of idle instances that should be maintained for this
+   * version.
+   * 
+ * + * int32 max_idle_instances = 4; + * + * @return The maxIdleInstances. + */ + @java.lang.Override + public int getMaxIdleInstances() { + return maxIdleInstances_; + } + + public static final int MAX_TOTAL_INSTANCES_FIELD_NUMBER = 5; + private int maxTotalInstances_; + /** + * + * + *
+   * Maximum number of instances that should be started to handle requests for
+   * this version.
+   * 
+ * + * int32 max_total_instances = 5; + * + * @return The maxTotalInstances. + */ + @java.lang.Override + public int getMaxTotalInstances() { + return maxTotalInstances_; + } + + public static final int MAX_PENDING_LATENCY_FIELD_NUMBER = 6; + private com.google.protobuf.Duration maxPendingLatency_; + /** + * + * + *
+   * Maximum amount of time that a request should wait in the pending queue
+   * before starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + * + * @return Whether the maxPendingLatency field is set. + */ + @java.lang.Override + public boolean hasMaxPendingLatency() { + return maxPendingLatency_ != null; + } + /** + * + * + *
+   * Maximum amount of time that a request should wait in the pending queue
+   * before starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + * + * @return The maxPendingLatency. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxPendingLatency() { + return maxPendingLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxPendingLatency_; + } + /** + * + * + *
+   * Maximum amount of time that a request should wait in the pending queue
+   * before starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaxPendingLatencyOrBuilder() { + return getMaxPendingLatency(); + } + + public static final int MIN_IDLE_INSTANCES_FIELD_NUMBER = 7; + private int minIdleInstances_; + /** + * + * + *
+   * Minimum number of idle instances that should be maintained for
+   * this version. Only applicable for the default version of a service.
+   * 
+ * + * int32 min_idle_instances = 7; + * + * @return The minIdleInstances. + */ + @java.lang.Override + public int getMinIdleInstances() { + return minIdleInstances_; + } + + public static final int MIN_TOTAL_INSTANCES_FIELD_NUMBER = 8; + private int minTotalInstances_; + /** + * + * + *
+   * Minimum number of running instances that should be maintained for this
+   * version.
+   * 
+ * + * int32 min_total_instances = 8; + * + * @return The minTotalInstances. + */ + @java.lang.Override + public int getMinTotalInstances() { + return minTotalInstances_; + } + + public static final int MIN_PENDING_LATENCY_FIELD_NUMBER = 9; + private com.google.protobuf.Duration minPendingLatency_; + /** + * + * + *
+   * Minimum amount of time a request should wait in the pending queue before
+   * starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + * + * @return Whether the minPendingLatency field is set. + */ + @java.lang.Override + public boolean hasMinPendingLatency() { + return minPendingLatency_ != null; + } + /** + * + * + *
+   * Minimum amount of time a request should wait in the pending queue before
+   * starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + * + * @return The minPendingLatency. + */ + @java.lang.Override + public com.google.protobuf.Duration getMinPendingLatency() { + return minPendingLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minPendingLatency_; + } + /** + * + * + *
+   * Minimum amount of time a request should wait in the pending queue before
+   * starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMinPendingLatencyOrBuilder() { + return getMinPendingLatency(); + } + + public static final int REQUEST_UTILIZATION_FIELD_NUMBER = 10; + private com.google.appengine.v1.RequestUtilization requestUtilization_; + /** + * + * + *
+   * Target scaling by request utilization.
+   * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + * + * @return Whether the requestUtilization field is set. + */ + @java.lang.Override + public boolean hasRequestUtilization() { + return requestUtilization_ != null; + } + /** + * + * + *
+   * Target scaling by request utilization.
+   * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + * + * @return The requestUtilization. + */ + @java.lang.Override + public com.google.appengine.v1.RequestUtilization getRequestUtilization() { + return requestUtilization_ == null + ? com.google.appengine.v1.RequestUtilization.getDefaultInstance() + : requestUtilization_; + } + /** + * + * + *
+   * Target scaling by request utilization.
+   * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + */ + @java.lang.Override + public com.google.appengine.v1.RequestUtilizationOrBuilder getRequestUtilizationOrBuilder() { + return getRequestUtilization(); + } + + public static final int DISK_UTILIZATION_FIELD_NUMBER = 11; + private com.google.appengine.v1.DiskUtilization diskUtilization_; + /** + * + * + *
+   * Target scaling by disk usage.
+   * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + * + * @return Whether the diskUtilization field is set. + */ + @java.lang.Override + public boolean hasDiskUtilization() { + return diskUtilization_ != null; + } + /** + * + * + *
+   * Target scaling by disk usage.
+   * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + * + * @return The diskUtilization. + */ + @java.lang.Override + public com.google.appengine.v1.DiskUtilization getDiskUtilization() { + return diskUtilization_ == null + ? com.google.appengine.v1.DiskUtilization.getDefaultInstance() + : diskUtilization_; + } + /** + * + * + *
+   * Target scaling by disk usage.
+   * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + */ + @java.lang.Override + public com.google.appengine.v1.DiskUtilizationOrBuilder getDiskUtilizationOrBuilder() { + return getDiskUtilization(); + } + + public static final int NETWORK_UTILIZATION_FIELD_NUMBER = 12; + private com.google.appengine.v1.NetworkUtilization networkUtilization_; + /** + * + * + *
+   * Target scaling by network usage.
+   * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + * + * @return Whether the networkUtilization field is set. + */ + @java.lang.Override + public boolean hasNetworkUtilization() { + return networkUtilization_ != null; + } + /** + * + * + *
+   * Target scaling by network usage.
+   * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + * + * @return The networkUtilization. + */ + @java.lang.Override + public com.google.appengine.v1.NetworkUtilization getNetworkUtilization() { + return networkUtilization_ == null + ? com.google.appengine.v1.NetworkUtilization.getDefaultInstance() + : networkUtilization_; + } + /** + * + * + *
+   * Target scaling by network usage.
+   * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + */ + @java.lang.Override + public com.google.appengine.v1.NetworkUtilizationOrBuilder getNetworkUtilizationOrBuilder() { + return getNetworkUtilization(); + } + + public static final int STANDARD_SCHEDULER_SETTINGS_FIELD_NUMBER = 20; + private com.google.appengine.v1.StandardSchedulerSettings standardSchedulerSettings_; + /** + * + * + *
+   * Scheduler settings for standard environment.
+   * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + * + * @return Whether the standardSchedulerSettings field is set. + */ + @java.lang.Override + public boolean hasStandardSchedulerSettings() { + return standardSchedulerSettings_ != null; + } + /** + * + * + *
+   * Scheduler settings for standard environment.
+   * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + * + * @return The standardSchedulerSettings. + */ + @java.lang.Override + public com.google.appengine.v1.StandardSchedulerSettings getStandardSchedulerSettings() { + return standardSchedulerSettings_ == null + ? com.google.appengine.v1.StandardSchedulerSettings.getDefaultInstance() + : standardSchedulerSettings_; + } + /** + * + * + *
+   * Scheduler settings for standard environment.
+   * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + */ + @java.lang.Override + public com.google.appengine.v1.StandardSchedulerSettingsOrBuilder + getStandardSchedulerSettingsOrBuilder() { + return getStandardSchedulerSettings(); + } + + 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 (coolDownPeriod_ != null) { + output.writeMessage(1, getCoolDownPeriod()); + } + if (cpuUtilization_ != null) { + output.writeMessage(2, getCpuUtilization()); + } + if (maxConcurrentRequests_ != 0) { + output.writeInt32(3, maxConcurrentRequests_); + } + if (maxIdleInstances_ != 0) { + output.writeInt32(4, maxIdleInstances_); + } + if (maxTotalInstances_ != 0) { + output.writeInt32(5, maxTotalInstances_); + } + if (maxPendingLatency_ != null) { + output.writeMessage(6, getMaxPendingLatency()); + } + if (minIdleInstances_ != 0) { + output.writeInt32(7, minIdleInstances_); + } + if (minTotalInstances_ != 0) { + output.writeInt32(8, minTotalInstances_); + } + if (minPendingLatency_ != null) { + output.writeMessage(9, getMinPendingLatency()); + } + if (requestUtilization_ != null) { + output.writeMessage(10, getRequestUtilization()); + } + if (diskUtilization_ != null) { + output.writeMessage(11, getDiskUtilization()); + } + if (networkUtilization_ != null) { + output.writeMessage(12, getNetworkUtilization()); + } + if (standardSchedulerSettings_ != null) { + output.writeMessage(20, getStandardSchedulerSettings()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (coolDownPeriod_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCoolDownPeriod()); + } + if (cpuUtilization_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCpuUtilization()); + } + if (maxConcurrentRequests_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxConcurrentRequests_); + } + if (maxIdleInstances_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, maxIdleInstances_); + } + if (maxTotalInstances_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, maxTotalInstances_); + } + if (maxPendingLatency_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMaxPendingLatency()); + } + if (minIdleInstances_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, minIdleInstances_); + } + if (minTotalInstances_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, minTotalInstances_); + } + if (minPendingLatency_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMinPendingLatency()); + } + if (requestUtilization_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getRequestUtilization()); + } + if (diskUtilization_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getDiskUtilization()); + } + if (networkUtilization_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getNetworkUtilization()); + } + if (standardSchedulerSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, getStandardSchedulerSettings()); + } + 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.appengine.v1.AutomaticScaling)) { + return super.equals(obj); + } + com.google.appengine.v1.AutomaticScaling other = (com.google.appengine.v1.AutomaticScaling) obj; + + if (hasCoolDownPeriod() != other.hasCoolDownPeriod()) return false; + if (hasCoolDownPeriod()) { + if (!getCoolDownPeriod().equals(other.getCoolDownPeriod())) return false; + } + if (hasCpuUtilization() != other.hasCpuUtilization()) return false; + if (hasCpuUtilization()) { + if (!getCpuUtilization().equals(other.getCpuUtilization())) return false; + } + if (getMaxConcurrentRequests() != other.getMaxConcurrentRequests()) return false; + if (getMaxIdleInstances() != other.getMaxIdleInstances()) return false; + if (getMaxTotalInstances() != other.getMaxTotalInstances()) return false; + if (hasMaxPendingLatency() != other.hasMaxPendingLatency()) return false; + if (hasMaxPendingLatency()) { + if (!getMaxPendingLatency().equals(other.getMaxPendingLatency())) return false; + } + if (getMinIdleInstances() != other.getMinIdleInstances()) return false; + if (getMinTotalInstances() != other.getMinTotalInstances()) return false; + if (hasMinPendingLatency() != other.hasMinPendingLatency()) return false; + if (hasMinPendingLatency()) { + if (!getMinPendingLatency().equals(other.getMinPendingLatency())) return false; + } + if (hasRequestUtilization() != other.hasRequestUtilization()) return false; + if (hasRequestUtilization()) { + if (!getRequestUtilization().equals(other.getRequestUtilization())) return false; + } + if (hasDiskUtilization() != other.hasDiskUtilization()) return false; + if (hasDiskUtilization()) { + if (!getDiskUtilization().equals(other.getDiskUtilization())) return false; + } + if (hasNetworkUtilization() != other.hasNetworkUtilization()) return false; + if (hasNetworkUtilization()) { + if (!getNetworkUtilization().equals(other.getNetworkUtilization())) return false; + } + if (hasStandardSchedulerSettings() != other.hasStandardSchedulerSettings()) return false; + if (hasStandardSchedulerSettings()) { + if (!getStandardSchedulerSettings().equals(other.getStandardSchedulerSettings())) + 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 (hasCoolDownPeriod()) { + hash = (37 * hash) + COOL_DOWN_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getCoolDownPeriod().hashCode(); + } + if (hasCpuUtilization()) { + hash = (37 * hash) + CPU_UTILIZATION_FIELD_NUMBER; + hash = (53 * hash) + getCpuUtilization().hashCode(); + } + hash = (37 * hash) + MAX_CONCURRENT_REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getMaxConcurrentRequests(); + hash = (37 * hash) + MAX_IDLE_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getMaxIdleInstances(); + hash = (37 * hash) + MAX_TOTAL_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getMaxTotalInstances(); + if (hasMaxPendingLatency()) { + hash = (37 * hash) + MAX_PENDING_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + getMaxPendingLatency().hashCode(); + } + hash = (37 * hash) + MIN_IDLE_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getMinIdleInstances(); + hash = (37 * hash) + MIN_TOTAL_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getMinTotalInstances(); + if (hasMinPendingLatency()) { + hash = (37 * hash) + MIN_PENDING_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + getMinPendingLatency().hashCode(); + } + if (hasRequestUtilization()) { + hash = (37 * hash) + REQUEST_UTILIZATION_FIELD_NUMBER; + hash = (53 * hash) + getRequestUtilization().hashCode(); + } + if (hasDiskUtilization()) { + hash = (37 * hash) + DISK_UTILIZATION_FIELD_NUMBER; + hash = (53 * hash) + getDiskUtilization().hashCode(); + } + if (hasNetworkUtilization()) { + hash = (37 * hash) + NETWORK_UTILIZATION_FIELD_NUMBER; + hash = (53 * hash) + getNetworkUtilization().hashCode(); + } + if (hasStandardSchedulerSettings()) { + hash = (37 * hash) + STANDARD_SCHEDULER_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getStandardSchedulerSettings().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.AutomaticScaling parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AutomaticScaling parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.AutomaticScaling parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AutomaticScaling 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.appengine.v1.AutomaticScaling parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.AutomaticScaling parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.AutomaticScaling parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AutomaticScaling 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.appengine.v1.AutomaticScaling parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AutomaticScaling 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.appengine.v1.AutomaticScaling parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.AutomaticScaling 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.appengine.v1.AutomaticScaling 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; + } + /** + * + * + *
+   * Automatic scaling is based on request rate, response latencies, and other
+   * application metrics.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.AutomaticScaling} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.AutomaticScaling) + com.google.appengine.v1.AutomaticScalingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_AutomaticScaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_AutomaticScaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.AutomaticScaling.class, + com.google.appengine.v1.AutomaticScaling.Builder.class); + } + + // Construct using com.google.appengine.v1.AutomaticScaling.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 (coolDownPeriodBuilder_ == null) { + coolDownPeriod_ = null; + } else { + coolDownPeriod_ = null; + coolDownPeriodBuilder_ = null; + } + if (cpuUtilizationBuilder_ == null) { + cpuUtilization_ = null; + } else { + cpuUtilization_ = null; + cpuUtilizationBuilder_ = null; + } + maxConcurrentRequests_ = 0; + + maxIdleInstances_ = 0; + + maxTotalInstances_ = 0; + + if (maxPendingLatencyBuilder_ == null) { + maxPendingLatency_ = null; + } else { + maxPendingLatency_ = null; + maxPendingLatencyBuilder_ = null; + } + minIdleInstances_ = 0; + + minTotalInstances_ = 0; + + if (minPendingLatencyBuilder_ == null) { + minPendingLatency_ = null; + } else { + minPendingLatency_ = null; + minPendingLatencyBuilder_ = null; + } + if (requestUtilizationBuilder_ == null) { + requestUtilization_ = null; + } else { + requestUtilization_ = null; + requestUtilizationBuilder_ = null; + } + if (diskUtilizationBuilder_ == null) { + diskUtilization_ = null; + } else { + diskUtilization_ = null; + diskUtilizationBuilder_ = null; + } + if (networkUtilizationBuilder_ == null) { + networkUtilization_ = null; + } else { + networkUtilization_ = null; + networkUtilizationBuilder_ = null; + } + if (standardSchedulerSettingsBuilder_ == null) { + standardSchedulerSettings_ = null; + } else { + standardSchedulerSettings_ = null; + standardSchedulerSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_AutomaticScaling_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.AutomaticScaling getDefaultInstanceForType() { + return com.google.appengine.v1.AutomaticScaling.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.AutomaticScaling build() { + com.google.appengine.v1.AutomaticScaling result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.AutomaticScaling buildPartial() { + com.google.appengine.v1.AutomaticScaling result = + new com.google.appengine.v1.AutomaticScaling(this); + if (coolDownPeriodBuilder_ == null) { + result.coolDownPeriod_ = coolDownPeriod_; + } else { + result.coolDownPeriod_ = coolDownPeriodBuilder_.build(); + } + if (cpuUtilizationBuilder_ == null) { + result.cpuUtilization_ = cpuUtilization_; + } else { + result.cpuUtilization_ = cpuUtilizationBuilder_.build(); + } + result.maxConcurrentRequests_ = maxConcurrentRequests_; + result.maxIdleInstances_ = maxIdleInstances_; + result.maxTotalInstances_ = maxTotalInstances_; + if (maxPendingLatencyBuilder_ == null) { + result.maxPendingLatency_ = maxPendingLatency_; + } else { + result.maxPendingLatency_ = maxPendingLatencyBuilder_.build(); + } + result.minIdleInstances_ = minIdleInstances_; + result.minTotalInstances_ = minTotalInstances_; + if (minPendingLatencyBuilder_ == null) { + result.minPendingLatency_ = minPendingLatency_; + } else { + result.minPendingLatency_ = minPendingLatencyBuilder_.build(); + } + if (requestUtilizationBuilder_ == null) { + result.requestUtilization_ = requestUtilization_; + } else { + result.requestUtilization_ = requestUtilizationBuilder_.build(); + } + if (diskUtilizationBuilder_ == null) { + result.diskUtilization_ = diskUtilization_; + } else { + result.diskUtilization_ = diskUtilizationBuilder_.build(); + } + if (networkUtilizationBuilder_ == null) { + result.networkUtilization_ = networkUtilization_; + } else { + result.networkUtilization_ = networkUtilizationBuilder_.build(); + } + if (standardSchedulerSettingsBuilder_ == null) { + result.standardSchedulerSettings_ = standardSchedulerSettings_; + } else { + result.standardSchedulerSettings_ = standardSchedulerSettingsBuilder_.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.appengine.v1.AutomaticScaling) { + return mergeFrom((com.google.appengine.v1.AutomaticScaling) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.AutomaticScaling other) { + if (other == com.google.appengine.v1.AutomaticScaling.getDefaultInstance()) return this; + if (other.hasCoolDownPeriod()) { + mergeCoolDownPeriod(other.getCoolDownPeriod()); + } + if (other.hasCpuUtilization()) { + mergeCpuUtilization(other.getCpuUtilization()); + } + if (other.getMaxConcurrentRequests() != 0) { + setMaxConcurrentRequests(other.getMaxConcurrentRequests()); + } + if (other.getMaxIdleInstances() != 0) { + setMaxIdleInstances(other.getMaxIdleInstances()); + } + if (other.getMaxTotalInstances() != 0) { + setMaxTotalInstances(other.getMaxTotalInstances()); + } + if (other.hasMaxPendingLatency()) { + mergeMaxPendingLatency(other.getMaxPendingLatency()); + } + if (other.getMinIdleInstances() != 0) { + setMinIdleInstances(other.getMinIdleInstances()); + } + if (other.getMinTotalInstances() != 0) { + setMinTotalInstances(other.getMinTotalInstances()); + } + if (other.hasMinPendingLatency()) { + mergeMinPendingLatency(other.getMinPendingLatency()); + } + if (other.hasRequestUtilization()) { + mergeRequestUtilization(other.getRequestUtilization()); + } + if (other.hasDiskUtilization()) { + mergeDiskUtilization(other.getDiskUtilization()); + } + if (other.hasNetworkUtilization()) { + mergeNetworkUtilization(other.getNetworkUtilization()); + } + if (other.hasStandardSchedulerSettings()) { + mergeStandardSchedulerSettings(other.getStandardSchedulerSettings()); + } + 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.appengine.v1.AutomaticScaling parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.AutomaticScaling) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration coolDownPeriod_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + coolDownPeriodBuilder_; + /** + * + * + *
+     * The time period that the
+     * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+     * should wait before it starts collecting information from a new instance.
+     * This prevents the autoscaler from collecting information when the instance
+     * is initializing, during which the collected usage would not be reliable.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + * + * @return Whether the coolDownPeriod field is set. + */ + public boolean hasCoolDownPeriod() { + return coolDownPeriodBuilder_ != null || coolDownPeriod_ != null; + } + /** + * + * + *
+     * The time period that the
+     * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+     * should wait before it starts collecting information from a new instance.
+     * This prevents the autoscaler from collecting information when the instance
+     * is initializing, during which the collected usage would not be reliable.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + * + * @return The coolDownPeriod. + */ + public com.google.protobuf.Duration getCoolDownPeriod() { + if (coolDownPeriodBuilder_ == null) { + return coolDownPeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : coolDownPeriod_; + } else { + return coolDownPeriodBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time period that the
+     * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+     * should wait before it starts collecting information from a new instance.
+     * This prevents the autoscaler from collecting information when the instance
+     * is initializing, during which the collected usage would not be reliable.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + */ + public Builder setCoolDownPeriod(com.google.protobuf.Duration value) { + if (coolDownPeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + coolDownPeriod_ = value; + onChanged(); + } else { + coolDownPeriodBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time period that the
+     * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+     * should wait before it starts collecting information from a new instance.
+     * This prevents the autoscaler from collecting information when the instance
+     * is initializing, during which the collected usage would not be reliable.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + */ + public Builder setCoolDownPeriod(com.google.protobuf.Duration.Builder builderForValue) { + if (coolDownPeriodBuilder_ == null) { + coolDownPeriod_ = builderForValue.build(); + onChanged(); + } else { + coolDownPeriodBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time period that the
+     * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+     * should wait before it starts collecting information from a new instance.
+     * This prevents the autoscaler from collecting information when the instance
+     * is initializing, during which the collected usage would not be reliable.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + */ + public Builder mergeCoolDownPeriod(com.google.protobuf.Duration value) { + if (coolDownPeriodBuilder_ == null) { + if (coolDownPeriod_ != null) { + coolDownPeriod_ = + com.google.protobuf.Duration.newBuilder(coolDownPeriod_) + .mergeFrom(value) + .buildPartial(); + } else { + coolDownPeriod_ = value; + } + onChanged(); + } else { + coolDownPeriodBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time period that the
+     * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+     * should wait before it starts collecting information from a new instance.
+     * This prevents the autoscaler from collecting information when the instance
+     * is initializing, during which the collected usage would not be reliable.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + */ + public Builder clearCoolDownPeriod() { + if (coolDownPeriodBuilder_ == null) { + coolDownPeriod_ = null; + onChanged(); + } else { + coolDownPeriod_ = null; + coolDownPeriodBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time period that the
+     * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+     * should wait before it starts collecting information from a new instance.
+     * This prevents the autoscaler from collecting information when the instance
+     * is initializing, during which the collected usage would not be reliable.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + */ + public com.google.protobuf.Duration.Builder getCoolDownPeriodBuilder() { + + onChanged(); + return getCoolDownPeriodFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time period that the
+     * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+     * should wait before it starts collecting information from a new instance.
+     * This prevents the autoscaler from collecting information when the instance
+     * is initializing, during which the collected usage would not be reliable.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + */ + public com.google.protobuf.DurationOrBuilder getCoolDownPeriodOrBuilder() { + if (coolDownPeriodBuilder_ != null) { + return coolDownPeriodBuilder_.getMessageOrBuilder(); + } else { + return coolDownPeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : coolDownPeriod_; + } + } + /** + * + * + *
+     * The time period that the
+     * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+     * should wait before it starts collecting information from a new instance.
+     * This prevents the autoscaler from collecting information when the instance
+     * is initializing, during which the collected usage would not be reliable.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getCoolDownPeriodFieldBuilder() { + if (coolDownPeriodBuilder_ == null) { + coolDownPeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getCoolDownPeriod(), getParentForChildren(), isClean()); + coolDownPeriod_ = null; + } + return coolDownPeriodBuilder_; + } + + private com.google.appengine.v1.CpuUtilization cpuUtilization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CpuUtilization, + com.google.appengine.v1.CpuUtilization.Builder, + com.google.appengine.v1.CpuUtilizationOrBuilder> + cpuUtilizationBuilder_; + /** + * + * + *
+     * Target scaling by CPU usage.
+     * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + * + * @return Whether the cpuUtilization field is set. + */ + public boolean hasCpuUtilization() { + return cpuUtilizationBuilder_ != null || cpuUtilization_ != null; + } + /** + * + * + *
+     * Target scaling by CPU usage.
+     * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + * + * @return The cpuUtilization. + */ + public com.google.appengine.v1.CpuUtilization getCpuUtilization() { + if (cpuUtilizationBuilder_ == null) { + return cpuUtilization_ == null + ? com.google.appengine.v1.CpuUtilization.getDefaultInstance() + : cpuUtilization_; + } else { + return cpuUtilizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Target scaling by CPU usage.
+     * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + */ + public Builder setCpuUtilization(com.google.appengine.v1.CpuUtilization value) { + if (cpuUtilizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cpuUtilization_ = value; + onChanged(); + } else { + cpuUtilizationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Target scaling by CPU usage.
+     * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + */ + public Builder setCpuUtilization( + com.google.appengine.v1.CpuUtilization.Builder builderForValue) { + if (cpuUtilizationBuilder_ == null) { + cpuUtilization_ = builderForValue.build(); + onChanged(); + } else { + cpuUtilizationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Target scaling by CPU usage.
+     * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + */ + public Builder mergeCpuUtilization(com.google.appengine.v1.CpuUtilization value) { + if (cpuUtilizationBuilder_ == null) { + if (cpuUtilization_ != null) { + cpuUtilization_ = + com.google.appengine.v1.CpuUtilization.newBuilder(cpuUtilization_) + .mergeFrom(value) + .buildPartial(); + } else { + cpuUtilization_ = value; + } + onChanged(); + } else { + cpuUtilizationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Target scaling by CPU usage.
+     * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + */ + public Builder clearCpuUtilization() { + if (cpuUtilizationBuilder_ == null) { + cpuUtilization_ = null; + onChanged(); + } else { + cpuUtilization_ = null; + cpuUtilizationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Target scaling by CPU usage.
+     * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + */ + public com.google.appengine.v1.CpuUtilization.Builder getCpuUtilizationBuilder() { + + onChanged(); + return getCpuUtilizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Target scaling by CPU usage.
+     * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + */ + public com.google.appengine.v1.CpuUtilizationOrBuilder getCpuUtilizationOrBuilder() { + if (cpuUtilizationBuilder_ != null) { + return cpuUtilizationBuilder_.getMessageOrBuilder(); + } else { + return cpuUtilization_ == null + ? com.google.appengine.v1.CpuUtilization.getDefaultInstance() + : cpuUtilization_; + } + } + /** + * + * + *
+     * Target scaling by CPU usage.
+     * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CpuUtilization, + com.google.appengine.v1.CpuUtilization.Builder, + com.google.appengine.v1.CpuUtilizationOrBuilder> + getCpuUtilizationFieldBuilder() { + if (cpuUtilizationBuilder_ == null) { + cpuUtilizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CpuUtilization, + com.google.appengine.v1.CpuUtilization.Builder, + com.google.appengine.v1.CpuUtilizationOrBuilder>( + getCpuUtilization(), getParentForChildren(), isClean()); + cpuUtilization_ = null; + } + return cpuUtilizationBuilder_; + } + + private int maxConcurrentRequests_; + /** + * + * + *
+     * Number of concurrent requests an automatic scaling instance can accept
+     * before the scheduler spawns a new instance.
+     * Defaults to a runtime-specific value.
+     * 
+ * + * int32 max_concurrent_requests = 3; + * + * @return The maxConcurrentRequests. + */ + @java.lang.Override + public int getMaxConcurrentRequests() { + return maxConcurrentRequests_; + } + /** + * + * + *
+     * Number of concurrent requests an automatic scaling instance can accept
+     * before the scheduler spawns a new instance.
+     * Defaults to a runtime-specific value.
+     * 
+ * + * int32 max_concurrent_requests = 3; + * + * @param value The maxConcurrentRequests to set. + * @return This builder for chaining. + */ + public Builder setMaxConcurrentRequests(int value) { + + maxConcurrentRequests_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of concurrent requests an automatic scaling instance can accept
+     * before the scheduler spawns a new instance.
+     * Defaults to a runtime-specific value.
+     * 
+ * + * int32 max_concurrent_requests = 3; + * + * @return This builder for chaining. + */ + public Builder clearMaxConcurrentRequests() { + + maxConcurrentRequests_ = 0; + onChanged(); + return this; + } + + private int maxIdleInstances_; + /** + * + * + *
+     * Maximum number of idle instances that should be maintained for this
+     * version.
+     * 
+ * + * int32 max_idle_instances = 4; + * + * @return The maxIdleInstances. + */ + @java.lang.Override + public int getMaxIdleInstances() { + return maxIdleInstances_; + } + /** + * + * + *
+     * Maximum number of idle instances that should be maintained for this
+     * version.
+     * 
+ * + * int32 max_idle_instances = 4; + * + * @param value The maxIdleInstances to set. + * @return This builder for chaining. + */ + public Builder setMaxIdleInstances(int value) { + + maxIdleInstances_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of idle instances that should be maintained for this
+     * version.
+     * 
+ * + * int32 max_idle_instances = 4; + * + * @return This builder for chaining. + */ + public Builder clearMaxIdleInstances() { + + maxIdleInstances_ = 0; + onChanged(); + return this; + } + + private int maxTotalInstances_; + /** + * + * + *
+     * Maximum number of instances that should be started to handle requests for
+     * this version.
+     * 
+ * + * int32 max_total_instances = 5; + * + * @return The maxTotalInstances. + */ + @java.lang.Override + public int getMaxTotalInstances() { + return maxTotalInstances_; + } + /** + * + * + *
+     * Maximum number of instances that should be started to handle requests for
+     * this version.
+     * 
+ * + * int32 max_total_instances = 5; + * + * @param value The maxTotalInstances to set. + * @return This builder for chaining. + */ + public Builder setMaxTotalInstances(int value) { + + maxTotalInstances_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of instances that should be started to handle requests for
+     * this version.
+     * 
+ * + * int32 max_total_instances = 5; + * + * @return This builder for chaining. + */ + public Builder clearMaxTotalInstances() { + + maxTotalInstances_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration maxPendingLatency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maxPendingLatencyBuilder_; + /** + * + * + *
+     * Maximum amount of time that a request should wait in the pending queue
+     * before starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + * + * @return Whether the maxPendingLatency field is set. + */ + public boolean hasMaxPendingLatency() { + return maxPendingLatencyBuilder_ != null || maxPendingLatency_ != null; + } + /** + * + * + *
+     * Maximum amount of time that a request should wait in the pending queue
+     * before starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + * + * @return The maxPendingLatency. + */ + public com.google.protobuf.Duration getMaxPendingLatency() { + if (maxPendingLatencyBuilder_ == null) { + return maxPendingLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxPendingLatency_; + } else { + return maxPendingLatencyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Maximum amount of time that a request should wait in the pending queue
+     * before starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + */ + public Builder setMaxPendingLatency(com.google.protobuf.Duration value) { + if (maxPendingLatencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxPendingLatency_ = value; + onChanged(); + } else { + maxPendingLatencyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Maximum amount of time that a request should wait in the pending queue
+     * before starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + */ + public Builder setMaxPendingLatency(com.google.protobuf.Duration.Builder builderForValue) { + if (maxPendingLatencyBuilder_ == null) { + maxPendingLatency_ = builderForValue.build(); + onChanged(); + } else { + maxPendingLatencyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Maximum amount of time that a request should wait in the pending queue
+     * before starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + */ + public Builder mergeMaxPendingLatency(com.google.protobuf.Duration value) { + if (maxPendingLatencyBuilder_ == null) { + if (maxPendingLatency_ != null) { + maxPendingLatency_ = + com.google.protobuf.Duration.newBuilder(maxPendingLatency_) + .mergeFrom(value) + .buildPartial(); + } else { + maxPendingLatency_ = value; + } + onChanged(); + } else { + maxPendingLatencyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Maximum amount of time that a request should wait in the pending queue
+     * before starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + */ + public Builder clearMaxPendingLatency() { + if (maxPendingLatencyBuilder_ == null) { + maxPendingLatency_ = null; + onChanged(); + } else { + maxPendingLatency_ = null; + maxPendingLatencyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Maximum amount of time that a request should wait in the pending queue
+     * before starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + */ + public com.google.protobuf.Duration.Builder getMaxPendingLatencyBuilder() { + + onChanged(); + return getMaxPendingLatencyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Maximum amount of time that a request should wait in the pending queue
+     * before starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + */ + public com.google.protobuf.DurationOrBuilder getMaxPendingLatencyOrBuilder() { + if (maxPendingLatencyBuilder_ != null) { + return maxPendingLatencyBuilder_.getMessageOrBuilder(); + } else { + return maxPendingLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxPendingLatency_; + } + } + /** + * + * + *
+     * Maximum amount of time that a request should wait in the pending queue
+     * before starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaxPendingLatencyFieldBuilder() { + if (maxPendingLatencyBuilder_ == null) { + maxPendingLatencyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMaxPendingLatency(), getParentForChildren(), isClean()); + maxPendingLatency_ = null; + } + return maxPendingLatencyBuilder_; + } + + private int minIdleInstances_; + /** + * + * + *
+     * Minimum number of idle instances that should be maintained for
+     * this version. Only applicable for the default version of a service.
+     * 
+ * + * int32 min_idle_instances = 7; + * + * @return The minIdleInstances. + */ + @java.lang.Override + public int getMinIdleInstances() { + return minIdleInstances_; + } + /** + * + * + *
+     * Minimum number of idle instances that should be maintained for
+     * this version. Only applicable for the default version of a service.
+     * 
+ * + * int32 min_idle_instances = 7; + * + * @param value The minIdleInstances to set. + * @return This builder for chaining. + */ + public Builder setMinIdleInstances(int value) { + + minIdleInstances_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Minimum number of idle instances that should be maintained for
+     * this version. Only applicable for the default version of a service.
+     * 
+ * + * int32 min_idle_instances = 7; + * + * @return This builder for chaining. + */ + public Builder clearMinIdleInstances() { + + minIdleInstances_ = 0; + onChanged(); + return this; + } + + private int minTotalInstances_; + /** + * + * + *
+     * Minimum number of running instances that should be maintained for this
+     * version.
+     * 
+ * + * int32 min_total_instances = 8; + * + * @return The minTotalInstances. + */ + @java.lang.Override + public int getMinTotalInstances() { + return minTotalInstances_; + } + /** + * + * + *
+     * Minimum number of running instances that should be maintained for this
+     * version.
+     * 
+ * + * int32 min_total_instances = 8; + * + * @param value The minTotalInstances to set. + * @return This builder for chaining. + */ + public Builder setMinTotalInstances(int value) { + + minTotalInstances_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Minimum number of running instances that should be maintained for this
+     * version.
+     * 
+ * + * int32 min_total_instances = 8; + * + * @return This builder for chaining. + */ + public Builder clearMinTotalInstances() { + + minTotalInstances_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration minPendingLatency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + minPendingLatencyBuilder_; + /** + * + * + *
+     * Minimum amount of time a request should wait in the pending queue before
+     * starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + * + * @return Whether the minPendingLatency field is set. + */ + public boolean hasMinPendingLatency() { + return minPendingLatencyBuilder_ != null || minPendingLatency_ != null; + } + /** + * + * + *
+     * Minimum amount of time a request should wait in the pending queue before
+     * starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + * + * @return The minPendingLatency. + */ + public com.google.protobuf.Duration getMinPendingLatency() { + if (minPendingLatencyBuilder_ == null) { + return minPendingLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minPendingLatency_; + } else { + return minPendingLatencyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Minimum amount of time a request should wait in the pending queue before
+     * starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + */ + public Builder setMinPendingLatency(com.google.protobuf.Duration value) { + if (minPendingLatencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minPendingLatency_ = value; + onChanged(); + } else { + minPendingLatencyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Minimum amount of time a request should wait in the pending queue before
+     * starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + */ + public Builder setMinPendingLatency(com.google.protobuf.Duration.Builder builderForValue) { + if (minPendingLatencyBuilder_ == null) { + minPendingLatency_ = builderForValue.build(); + onChanged(); + } else { + minPendingLatencyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Minimum amount of time a request should wait in the pending queue before
+     * starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + */ + public Builder mergeMinPendingLatency(com.google.protobuf.Duration value) { + if (minPendingLatencyBuilder_ == null) { + if (minPendingLatency_ != null) { + minPendingLatency_ = + com.google.protobuf.Duration.newBuilder(minPendingLatency_) + .mergeFrom(value) + .buildPartial(); + } else { + minPendingLatency_ = value; + } + onChanged(); + } else { + minPendingLatencyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Minimum amount of time a request should wait in the pending queue before
+     * starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + */ + public Builder clearMinPendingLatency() { + if (minPendingLatencyBuilder_ == null) { + minPendingLatency_ = null; + onChanged(); + } else { + minPendingLatency_ = null; + minPendingLatencyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Minimum amount of time a request should wait in the pending queue before
+     * starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + */ + public com.google.protobuf.Duration.Builder getMinPendingLatencyBuilder() { + + onChanged(); + return getMinPendingLatencyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Minimum amount of time a request should wait in the pending queue before
+     * starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + */ + public com.google.protobuf.DurationOrBuilder getMinPendingLatencyOrBuilder() { + if (minPendingLatencyBuilder_ != null) { + return minPendingLatencyBuilder_.getMessageOrBuilder(); + } else { + return minPendingLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minPendingLatency_; + } + } + /** + * + * + *
+     * Minimum amount of time a request should wait in the pending queue before
+     * starting a new instance to handle it.
+     * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMinPendingLatencyFieldBuilder() { + if (minPendingLatencyBuilder_ == null) { + minPendingLatencyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMinPendingLatency(), getParentForChildren(), isClean()); + minPendingLatency_ = null; + } + return minPendingLatencyBuilder_; + } + + private com.google.appengine.v1.RequestUtilization requestUtilization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.RequestUtilization, + com.google.appengine.v1.RequestUtilization.Builder, + com.google.appengine.v1.RequestUtilizationOrBuilder> + requestUtilizationBuilder_; + /** + * + * + *
+     * Target scaling by request utilization.
+     * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + * + * @return Whether the requestUtilization field is set. + */ + public boolean hasRequestUtilization() { + return requestUtilizationBuilder_ != null || requestUtilization_ != null; + } + /** + * + * + *
+     * Target scaling by request utilization.
+     * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + * + * @return The requestUtilization. + */ + public com.google.appengine.v1.RequestUtilization getRequestUtilization() { + if (requestUtilizationBuilder_ == null) { + return requestUtilization_ == null + ? com.google.appengine.v1.RequestUtilization.getDefaultInstance() + : requestUtilization_; + } else { + return requestUtilizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Target scaling by request utilization.
+     * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + */ + public Builder setRequestUtilization(com.google.appengine.v1.RequestUtilization value) { + if (requestUtilizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestUtilization_ = value; + onChanged(); + } else { + requestUtilizationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Target scaling by request utilization.
+     * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + */ + public Builder setRequestUtilization( + com.google.appengine.v1.RequestUtilization.Builder builderForValue) { + if (requestUtilizationBuilder_ == null) { + requestUtilization_ = builderForValue.build(); + onChanged(); + } else { + requestUtilizationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Target scaling by request utilization.
+     * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + */ + public Builder mergeRequestUtilization(com.google.appengine.v1.RequestUtilization value) { + if (requestUtilizationBuilder_ == null) { + if (requestUtilization_ != null) { + requestUtilization_ = + com.google.appengine.v1.RequestUtilization.newBuilder(requestUtilization_) + .mergeFrom(value) + .buildPartial(); + } else { + requestUtilization_ = value; + } + onChanged(); + } else { + requestUtilizationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Target scaling by request utilization.
+     * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + */ + public Builder clearRequestUtilization() { + if (requestUtilizationBuilder_ == null) { + requestUtilization_ = null; + onChanged(); + } else { + requestUtilization_ = null; + requestUtilizationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Target scaling by request utilization.
+     * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + */ + public com.google.appengine.v1.RequestUtilization.Builder getRequestUtilizationBuilder() { + + onChanged(); + return getRequestUtilizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Target scaling by request utilization.
+     * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + */ + public com.google.appengine.v1.RequestUtilizationOrBuilder getRequestUtilizationOrBuilder() { + if (requestUtilizationBuilder_ != null) { + return requestUtilizationBuilder_.getMessageOrBuilder(); + } else { + return requestUtilization_ == null + ? com.google.appengine.v1.RequestUtilization.getDefaultInstance() + : requestUtilization_; + } + } + /** + * + * + *
+     * Target scaling by request utilization.
+     * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.RequestUtilization, + com.google.appengine.v1.RequestUtilization.Builder, + com.google.appengine.v1.RequestUtilizationOrBuilder> + getRequestUtilizationFieldBuilder() { + if (requestUtilizationBuilder_ == null) { + requestUtilizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.RequestUtilization, + com.google.appengine.v1.RequestUtilization.Builder, + com.google.appengine.v1.RequestUtilizationOrBuilder>( + getRequestUtilization(), getParentForChildren(), isClean()); + requestUtilization_ = null; + } + return requestUtilizationBuilder_; + } + + private com.google.appengine.v1.DiskUtilization diskUtilization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.DiskUtilization, + com.google.appengine.v1.DiskUtilization.Builder, + com.google.appengine.v1.DiskUtilizationOrBuilder> + diskUtilizationBuilder_; + /** + * + * + *
+     * Target scaling by disk usage.
+     * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + * + * @return Whether the diskUtilization field is set. + */ + public boolean hasDiskUtilization() { + return diskUtilizationBuilder_ != null || diskUtilization_ != null; + } + /** + * + * + *
+     * Target scaling by disk usage.
+     * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + * + * @return The diskUtilization. + */ + public com.google.appengine.v1.DiskUtilization getDiskUtilization() { + if (diskUtilizationBuilder_ == null) { + return diskUtilization_ == null + ? com.google.appengine.v1.DiskUtilization.getDefaultInstance() + : diskUtilization_; + } else { + return diskUtilizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Target scaling by disk usage.
+     * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + */ + public Builder setDiskUtilization(com.google.appengine.v1.DiskUtilization value) { + if (diskUtilizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diskUtilization_ = value; + onChanged(); + } else { + diskUtilizationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Target scaling by disk usage.
+     * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + */ + public Builder setDiskUtilization( + com.google.appengine.v1.DiskUtilization.Builder builderForValue) { + if (diskUtilizationBuilder_ == null) { + diskUtilization_ = builderForValue.build(); + onChanged(); + } else { + diskUtilizationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Target scaling by disk usage.
+     * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + */ + public Builder mergeDiskUtilization(com.google.appengine.v1.DiskUtilization value) { + if (diskUtilizationBuilder_ == null) { + if (diskUtilization_ != null) { + diskUtilization_ = + com.google.appengine.v1.DiskUtilization.newBuilder(diskUtilization_) + .mergeFrom(value) + .buildPartial(); + } else { + diskUtilization_ = value; + } + onChanged(); + } else { + diskUtilizationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Target scaling by disk usage.
+     * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + */ + public Builder clearDiskUtilization() { + if (diskUtilizationBuilder_ == null) { + diskUtilization_ = null; + onChanged(); + } else { + diskUtilization_ = null; + diskUtilizationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Target scaling by disk usage.
+     * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + */ + public com.google.appengine.v1.DiskUtilization.Builder getDiskUtilizationBuilder() { + + onChanged(); + return getDiskUtilizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Target scaling by disk usage.
+     * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + */ + public com.google.appengine.v1.DiskUtilizationOrBuilder getDiskUtilizationOrBuilder() { + if (diskUtilizationBuilder_ != null) { + return diskUtilizationBuilder_.getMessageOrBuilder(); + } else { + return diskUtilization_ == null + ? com.google.appengine.v1.DiskUtilization.getDefaultInstance() + : diskUtilization_; + } + } + /** + * + * + *
+     * Target scaling by disk usage.
+     * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.DiskUtilization, + com.google.appengine.v1.DiskUtilization.Builder, + com.google.appengine.v1.DiskUtilizationOrBuilder> + getDiskUtilizationFieldBuilder() { + if (diskUtilizationBuilder_ == null) { + diskUtilizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.DiskUtilization, + com.google.appengine.v1.DiskUtilization.Builder, + com.google.appengine.v1.DiskUtilizationOrBuilder>( + getDiskUtilization(), getParentForChildren(), isClean()); + diskUtilization_ = null; + } + return diskUtilizationBuilder_; + } + + private com.google.appengine.v1.NetworkUtilization networkUtilization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.NetworkUtilization, + com.google.appengine.v1.NetworkUtilization.Builder, + com.google.appengine.v1.NetworkUtilizationOrBuilder> + networkUtilizationBuilder_; + /** + * + * + *
+     * Target scaling by network usage.
+     * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + * + * @return Whether the networkUtilization field is set. + */ + public boolean hasNetworkUtilization() { + return networkUtilizationBuilder_ != null || networkUtilization_ != null; + } + /** + * + * + *
+     * Target scaling by network usage.
+     * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + * + * @return The networkUtilization. + */ + public com.google.appengine.v1.NetworkUtilization getNetworkUtilization() { + if (networkUtilizationBuilder_ == null) { + return networkUtilization_ == null + ? com.google.appengine.v1.NetworkUtilization.getDefaultInstance() + : networkUtilization_; + } else { + return networkUtilizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Target scaling by network usage.
+     * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + */ + public Builder setNetworkUtilization(com.google.appengine.v1.NetworkUtilization value) { + if (networkUtilizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkUtilization_ = value; + onChanged(); + } else { + networkUtilizationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Target scaling by network usage.
+     * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + */ + public Builder setNetworkUtilization( + com.google.appengine.v1.NetworkUtilization.Builder builderForValue) { + if (networkUtilizationBuilder_ == null) { + networkUtilization_ = builderForValue.build(); + onChanged(); + } else { + networkUtilizationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Target scaling by network usage.
+     * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + */ + public Builder mergeNetworkUtilization(com.google.appengine.v1.NetworkUtilization value) { + if (networkUtilizationBuilder_ == null) { + if (networkUtilization_ != null) { + networkUtilization_ = + com.google.appengine.v1.NetworkUtilization.newBuilder(networkUtilization_) + .mergeFrom(value) + .buildPartial(); + } else { + networkUtilization_ = value; + } + onChanged(); + } else { + networkUtilizationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Target scaling by network usage.
+     * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + */ + public Builder clearNetworkUtilization() { + if (networkUtilizationBuilder_ == null) { + networkUtilization_ = null; + onChanged(); + } else { + networkUtilization_ = null; + networkUtilizationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Target scaling by network usage.
+     * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + */ + public com.google.appengine.v1.NetworkUtilization.Builder getNetworkUtilizationBuilder() { + + onChanged(); + return getNetworkUtilizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Target scaling by network usage.
+     * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + */ + public com.google.appengine.v1.NetworkUtilizationOrBuilder getNetworkUtilizationOrBuilder() { + if (networkUtilizationBuilder_ != null) { + return networkUtilizationBuilder_.getMessageOrBuilder(); + } else { + return networkUtilization_ == null + ? com.google.appengine.v1.NetworkUtilization.getDefaultInstance() + : networkUtilization_; + } + } + /** + * + * + *
+     * Target scaling by network usage.
+     * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.NetworkUtilization, + com.google.appengine.v1.NetworkUtilization.Builder, + com.google.appengine.v1.NetworkUtilizationOrBuilder> + getNetworkUtilizationFieldBuilder() { + if (networkUtilizationBuilder_ == null) { + networkUtilizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.NetworkUtilization, + com.google.appengine.v1.NetworkUtilization.Builder, + com.google.appengine.v1.NetworkUtilizationOrBuilder>( + getNetworkUtilization(), getParentForChildren(), isClean()); + networkUtilization_ = null; + } + return networkUtilizationBuilder_; + } + + private com.google.appengine.v1.StandardSchedulerSettings standardSchedulerSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.StandardSchedulerSettings, + com.google.appengine.v1.StandardSchedulerSettings.Builder, + com.google.appengine.v1.StandardSchedulerSettingsOrBuilder> + standardSchedulerSettingsBuilder_; + /** + * + * + *
+     * Scheduler settings for standard environment.
+     * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + * + * @return Whether the standardSchedulerSettings field is set. + */ + public boolean hasStandardSchedulerSettings() { + return standardSchedulerSettingsBuilder_ != null || standardSchedulerSettings_ != null; + } + /** + * + * + *
+     * Scheduler settings for standard environment.
+     * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + * + * @return The standardSchedulerSettings. + */ + public com.google.appengine.v1.StandardSchedulerSettings getStandardSchedulerSettings() { + if (standardSchedulerSettingsBuilder_ == null) { + return standardSchedulerSettings_ == null + ? com.google.appengine.v1.StandardSchedulerSettings.getDefaultInstance() + : standardSchedulerSettings_; + } else { + return standardSchedulerSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Scheduler settings for standard environment.
+     * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + */ + public Builder setStandardSchedulerSettings( + com.google.appengine.v1.StandardSchedulerSettings value) { + if (standardSchedulerSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + standardSchedulerSettings_ = value; + onChanged(); + } else { + standardSchedulerSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Scheduler settings for standard environment.
+     * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + */ + public Builder setStandardSchedulerSettings( + com.google.appengine.v1.StandardSchedulerSettings.Builder builderForValue) { + if (standardSchedulerSettingsBuilder_ == null) { + standardSchedulerSettings_ = builderForValue.build(); + onChanged(); + } else { + standardSchedulerSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Scheduler settings for standard environment.
+     * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + */ + public Builder mergeStandardSchedulerSettings( + com.google.appengine.v1.StandardSchedulerSettings value) { + if (standardSchedulerSettingsBuilder_ == null) { + if (standardSchedulerSettings_ != null) { + standardSchedulerSettings_ = + com.google.appengine.v1.StandardSchedulerSettings.newBuilder( + standardSchedulerSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + standardSchedulerSettings_ = value; + } + onChanged(); + } else { + standardSchedulerSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Scheduler settings for standard environment.
+     * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + */ + public Builder clearStandardSchedulerSettings() { + if (standardSchedulerSettingsBuilder_ == null) { + standardSchedulerSettings_ = null; + onChanged(); + } else { + standardSchedulerSettings_ = null; + standardSchedulerSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Scheduler settings for standard environment.
+     * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + */ + public com.google.appengine.v1.StandardSchedulerSettings.Builder + getStandardSchedulerSettingsBuilder() { + + onChanged(); + return getStandardSchedulerSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Scheduler settings for standard environment.
+     * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + */ + public com.google.appengine.v1.StandardSchedulerSettingsOrBuilder + getStandardSchedulerSettingsOrBuilder() { + if (standardSchedulerSettingsBuilder_ != null) { + return standardSchedulerSettingsBuilder_.getMessageOrBuilder(); + } else { + return standardSchedulerSettings_ == null + ? com.google.appengine.v1.StandardSchedulerSettings.getDefaultInstance() + : standardSchedulerSettings_; + } + } + /** + * + * + *
+     * Scheduler settings for standard environment.
+     * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.StandardSchedulerSettings, + com.google.appengine.v1.StandardSchedulerSettings.Builder, + com.google.appengine.v1.StandardSchedulerSettingsOrBuilder> + getStandardSchedulerSettingsFieldBuilder() { + if (standardSchedulerSettingsBuilder_ == null) { + standardSchedulerSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.StandardSchedulerSettings, + com.google.appengine.v1.StandardSchedulerSettings.Builder, + com.google.appengine.v1.StandardSchedulerSettingsOrBuilder>( + getStandardSchedulerSettings(), getParentForChildren(), isClean()); + standardSchedulerSettings_ = null; + } + return standardSchedulerSettingsBuilder_; + } + + @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.appengine.v1.AutomaticScaling) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.AutomaticScaling) + private static final com.google.appengine.v1.AutomaticScaling DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.AutomaticScaling(); + } + + public static com.google.appengine.v1.AutomaticScaling getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomaticScaling parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutomaticScaling(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.appengine.v1.AutomaticScaling getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AutomaticScalingOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AutomaticScalingOrBuilder.java new file mode 100644 index 00000000..bf42c20e --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/AutomaticScalingOrBuilder.java @@ -0,0 +1,398 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface AutomaticScalingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.AutomaticScaling) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time period that the
+   * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+   * should wait before it starts collecting information from a new instance.
+   * This prevents the autoscaler from collecting information when the instance
+   * is initializing, during which the collected usage would not be reliable.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + * + * @return Whether the coolDownPeriod field is set. + */ + boolean hasCoolDownPeriod(); + /** + * + * + *
+   * The time period that the
+   * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+   * should wait before it starts collecting information from a new instance.
+   * This prevents the autoscaler from collecting information when the instance
+   * is initializing, during which the collected usage would not be reliable.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + * + * @return The coolDownPeriod. + */ + com.google.protobuf.Duration getCoolDownPeriod(); + /** + * + * + *
+   * The time period that the
+   * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
+   * should wait before it starts collecting information from a new instance.
+   * This prevents the autoscaler from collecting information when the instance
+   * is initializing, during which the collected usage would not be reliable.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.protobuf.Duration cool_down_period = 1; + */ + com.google.protobuf.DurationOrBuilder getCoolDownPeriodOrBuilder(); + + /** + * + * + *
+   * Target scaling by CPU usage.
+   * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + * + * @return Whether the cpuUtilization field is set. + */ + boolean hasCpuUtilization(); + /** + * + * + *
+   * Target scaling by CPU usage.
+   * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + * + * @return The cpuUtilization. + */ + com.google.appengine.v1.CpuUtilization getCpuUtilization(); + /** + * + * + *
+   * Target scaling by CPU usage.
+   * 
+ * + * .google.appengine.v1.CpuUtilization cpu_utilization = 2; + */ + com.google.appengine.v1.CpuUtilizationOrBuilder getCpuUtilizationOrBuilder(); + + /** + * + * + *
+   * Number of concurrent requests an automatic scaling instance can accept
+   * before the scheduler spawns a new instance.
+   * Defaults to a runtime-specific value.
+   * 
+ * + * int32 max_concurrent_requests = 3; + * + * @return The maxConcurrentRequests. + */ + int getMaxConcurrentRequests(); + + /** + * + * + *
+   * Maximum number of idle instances that should be maintained for this
+   * version.
+   * 
+ * + * int32 max_idle_instances = 4; + * + * @return The maxIdleInstances. + */ + int getMaxIdleInstances(); + + /** + * + * + *
+   * Maximum number of instances that should be started to handle requests for
+   * this version.
+   * 
+ * + * int32 max_total_instances = 5; + * + * @return The maxTotalInstances. + */ + int getMaxTotalInstances(); + + /** + * + * + *
+   * Maximum amount of time that a request should wait in the pending queue
+   * before starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + * + * @return Whether the maxPendingLatency field is set. + */ + boolean hasMaxPendingLatency(); + /** + * + * + *
+   * Maximum amount of time that a request should wait in the pending queue
+   * before starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + * + * @return The maxPendingLatency. + */ + com.google.protobuf.Duration getMaxPendingLatency(); + /** + * + * + *
+   * Maximum amount of time that a request should wait in the pending queue
+   * before starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration max_pending_latency = 6; + */ + com.google.protobuf.DurationOrBuilder getMaxPendingLatencyOrBuilder(); + + /** + * + * + *
+   * Minimum number of idle instances that should be maintained for
+   * this version. Only applicable for the default version of a service.
+   * 
+ * + * int32 min_idle_instances = 7; + * + * @return The minIdleInstances. + */ + int getMinIdleInstances(); + + /** + * + * + *
+   * Minimum number of running instances that should be maintained for this
+   * version.
+   * 
+ * + * int32 min_total_instances = 8; + * + * @return The minTotalInstances. + */ + int getMinTotalInstances(); + + /** + * + * + *
+   * Minimum amount of time a request should wait in the pending queue before
+   * starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + * + * @return Whether the minPendingLatency field is set. + */ + boolean hasMinPendingLatency(); + /** + * + * + *
+   * Minimum amount of time a request should wait in the pending queue before
+   * starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + * + * @return The minPendingLatency. + */ + com.google.protobuf.Duration getMinPendingLatency(); + /** + * + * + *
+   * Minimum amount of time a request should wait in the pending queue before
+   * starting a new instance to handle it.
+   * 
+ * + * .google.protobuf.Duration min_pending_latency = 9; + */ + com.google.protobuf.DurationOrBuilder getMinPendingLatencyOrBuilder(); + + /** + * + * + *
+   * Target scaling by request utilization.
+   * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + * + * @return Whether the requestUtilization field is set. + */ + boolean hasRequestUtilization(); + /** + * + * + *
+   * Target scaling by request utilization.
+   * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + * + * @return The requestUtilization. + */ + com.google.appengine.v1.RequestUtilization getRequestUtilization(); + /** + * + * + *
+   * Target scaling by request utilization.
+   * 
+ * + * .google.appengine.v1.RequestUtilization request_utilization = 10; + */ + com.google.appengine.v1.RequestUtilizationOrBuilder getRequestUtilizationOrBuilder(); + + /** + * + * + *
+   * Target scaling by disk usage.
+   * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + * + * @return Whether the diskUtilization field is set. + */ + boolean hasDiskUtilization(); + /** + * + * + *
+   * Target scaling by disk usage.
+   * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + * + * @return The diskUtilization. + */ + com.google.appengine.v1.DiskUtilization getDiskUtilization(); + /** + * + * + *
+   * Target scaling by disk usage.
+   * 
+ * + * .google.appengine.v1.DiskUtilization disk_utilization = 11; + */ + com.google.appengine.v1.DiskUtilizationOrBuilder getDiskUtilizationOrBuilder(); + + /** + * + * + *
+   * Target scaling by network usage.
+   * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + * + * @return Whether the networkUtilization field is set. + */ + boolean hasNetworkUtilization(); + /** + * + * + *
+   * Target scaling by network usage.
+   * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + * + * @return The networkUtilization. + */ + com.google.appengine.v1.NetworkUtilization getNetworkUtilization(); + /** + * + * + *
+   * Target scaling by network usage.
+   * 
+ * + * .google.appengine.v1.NetworkUtilization network_utilization = 12; + */ + com.google.appengine.v1.NetworkUtilizationOrBuilder getNetworkUtilizationOrBuilder(); + + /** + * + * + *
+   * Scheduler settings for standard environment.
+   * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + * + * @return Whether the standardSchedulerSettings field is set. + */ + boolean hasStandardSchedulerSettings(); + /** + * + * + *
+   * Scheduler settings for standard environment.
+   * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + * + * @return The standardSchedulerSettings. + */ + com.google.appengine.v1.StandardSchedulerSettings getStandardSchedulerSettings(); + /** + * + * + *
+   * Scheduler settings for standard environment.
+   * 
+ * + * .google.appengine.v1.StandardSchedulerSettings standard_scheduler_settings = 20; + */ + com.google.appengine.v1.StandardSchedulerSettingsOrBuilder + getStandardSchedulerSettingsOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BasicScaling.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BasicScaling.java new file mode 100644 index 00000000..08f686ca --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BasicScaling.java @@ -0,0 +1,831 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * A service with basic scaling will create an instance when the application
+ * receives a request. The instance will be turned down when the app becomes
+ * idle. Basic scaling is ideal for work that is intermittent or driven by
+ * user activity.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.BasicScaling} + */ +public final class BasicScaling extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.BasicScaling) + BasicScalingOrBuilder { + private static final long serialVersionUID = 0L; + // Use BasicScaling.newBuilder() to construct. + private BasicScaling(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BasicScaling() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BasicScaling(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BasicScaling( + 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.Duration.Builder subBuilder = null; + if (idleTimeout_ != null) { + subBuilder = idleTimeout_.toBuilder(); + } + idleTimeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(idleTimeout_); + idleTimeout_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + maxInstances_ = input.readInt32(); + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_BasicScaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_BasicScaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.BasicScaling.class, + com.google.appengine.v1.BasicScaling.Builder.class); + } + + public static final int IDLE_TIMEOUT_FIELD_NUMBER = 1; + private com.google.protobuf.Duration idleTimeout_; + /** + * + * + *
+   * Duration of time after the last request that an instance must wait before
+   * the instance is shut down.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + * + * @return Whether the idleTimeout field is set. + */ + @java.lang.Override + public boolean hasIdleTimeout() { + return idleTimeout_ != null; + } + /** + * + * + *
+   * Duration of time after the last request that an instance must wait before
+   * the instance is shut down.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + * + * @return The idleTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getIdleTimeout() { + return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_; + } + /** + * + * + *
+   * Duration of time after the last request that an instance must wait before
+   * the instance is shut down.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() { + return getIdleTimeout(); + } + + public static final int MAX_INSTANCES_FIELD_NUMBER = 2; + private int maxInstances_; + /** + * + * + *
+   * Maximum number of instances to create for this version.
+   * 
+ * + * int32 max_instances = 2; + * + * @return The maxInstances. + */ + @java.lang.Override + public int getMaxInstances() { + return maxInstances_; + } + + 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 (idleTimeout_ != null) { + output.writeMessage(1, getIdleTimeout()); + } + if (maxInstances_ != 0) { + output.writeInt32(2, maxInstances_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (idleTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIdleTimeout()); + } + if (maxInstances_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxInstances_); + } + 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.appengine.v1.BasicScaling)) { + return super.equals(obj); + } + com.google.appengine.v1.BasicScaling other = (com.google.appengine.v1.BasicScaling) obj; + + if (hasIdleTimeout() != other.hasIdleTimeout()) return false; + if (hasIdleTimeout()) { + if (!getIdleTimeout().equals(other.getIdleTimeout())) return false; + } + if (getMaxInstances() != other.getMaxInstances()) 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 (hasIdleTimeout()) { + hash = (37 * hash) + IDLE_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getIdleTimeout().hashCode(); + } + hash = (37 * hash) + MAX_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getMaxInstances(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.BasicScaling parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.BasicScaling parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.BasicScaling parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.BasicScaling 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.appengine.v1.BasicScaling parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.BasicScaling parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.BasicScaling parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.BasicScaling 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.appengine.v1.BasicScaling parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.BasicScaling 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.appengine.v1.BasicScaling parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.BasicScaling 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.appengine.v1.BasicScaling 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 service with basic scaling will create an instance when the application
+   * receives a request. The instance will be turned down when the app becomes
+   * idle. Basic scaling is ideal for work that is intermittent or driven by
+   * user activity.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.BasicScaling} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.BasicScaling) + com.google.appengine.v1.BasicScalingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_BasicScaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_BasicScaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.BasicScaling.class, + com.google.appengine.v1.BasicScaling.Builder.class); + } + + // Construct using com.google.appengine.v1.BasicScaling.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 (idleTimeoutBuilder_ == null) { + idleTimeout_ = null; + } else { + idleTimeout_ = null; + idleTimeoutBuilder_ = null; + } + maxInstances_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_BasicScaling_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.BasicScaling getDefaultInstanceForType() { + return com.google.appengine.v1.BasicScaling.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.BasicScaling build() { + com.google.appengine.v1.BasicScaling result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.BasicScaling buildPartial() { + com.google.appengine.v1.BasicScaling result = new com.google.appengine.v1.BasicScaling(this); + if (idleTimeoutBuilder_ == null) { + result.idleTimeout_ = idleTimeout_; + } else { + result.idleTimeout_ = idleTimeoutBuilder_.build(); + } + result.maxInstances_ = maxInstances_; + 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.appengine.v1.BasicScaling) { + return mergeFrom((com.google.appengine.v1.BasicScaling) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.BasicScaling other) { + if (other == com.google.appengine.v1.BasicScaling.getDefaultInstance()) return this; + if (other.hasIdleTimeout()) { + mergeIdleTimeout(other.getIdleTimeout()); + } + if (other.getMaxInstances() != 0) { + setMaxInstances(other.getMaxInstances()); + } + 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.appengine.v1.BasicScaling parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.BasicScaling) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration idleTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + idleTimeoutBuilder_; + /** + * + * + *
+     * Duration of time after the last request that an instance must wait before
+     * the instance is shut down.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + * + * @return Whether the idleTimeout field is set. + */ + public boolean hasIdleTimeout() { + return idleTimeoutBuilder_ != null || idleTimeout_ != null; + } + /** + * + * + *
+     * Duration of time after the last request that an instance must wait before
+     * the instance is shut down.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + * + * @return The idleTimeout. + */ + public com.google.protobuf.Duration getIdleTimeout() { + if (idleTimeoutBuilder_ == null) { + return idleTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : idleTimeout_; + } else { + return idleTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Duration of time after the last request that an instance must wait before
+     * the instance is shut down.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + */ + public Builder setIdleTimeout(com.google.protobuf.Duration value) { + if (idleTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + idleTimeout_ = value; + onChanged(); + } else { + idleTimeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Duration of time after the last request that an instance must wait before
+     * the instance is shut down.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + */ + public Builder setIdleTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (idleTimeoutBuilder_ == null) { + idleTimeout_ = builderForValue.build(); + onChanged(); + } else { + idleTimeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Duration of time after the last request that an instance must wait before
+     * the instance is shut down.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + */ + public Builder mergeIdleTimeout(com.google.protobuf.Duration value) { + if (idleTimeoutBuilder_ == null) { + if (idleTimeout_ != null) { + idleTimeout_ = + com.google.protobuf.Duration.newBuilder(idleTimeout_).mergeFrom(value).buildPartial(); + } else { + idleTimeout_ = value; + } + onChanged(); + } else { + idleTimeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Duration of time after the last request that an instance must wait before
+     * the instance is shut down.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + */ + public Builder clearIdleTimeout() { + if (idleTimeoutBuilder_ == null) { + idleTimeout_ = null; + onChanged(); + } else { + idleTimeout_ = null; + idleTimeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Duration of time after the last request that an instance must wait before
+     * the instance is shut down.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + */ + public com.google.protobuf.Duration.Builder getIdleTimeoutBuilder() { + + onChanged(); + return getIdleTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Duration of time after the last request that an instance must wait before
+     * the instance is shut down.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + */ + public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() { + if (idleTimeoutBuilder_ != null) { + return idleTimeoutBuilder_.getMessageOrBuilder(); + } else { + return idleTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : idleTimeout_; + } + } + /** + * + * + *
+     * Duration of time after the last request that an instance must wait before
+     * the instance is shut down.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getIdleTimeoutFieldBuilder() { + if (idleTimeoutBuilder_ == null) { + idleTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getIdleTimeout(), getParentForChildren(), isClean()); + idleTimeout_ = null; + } + return idleTimeoutBuilder_; + } + + private int maxInstances_; + /** + * + * + *
+     * Maximum number of instances to create for this version.
+     * 
+ * + * int32 max_instances = 2; + * + * @return The maxInstances. + */ + @java.lang.Override + public int getMaxInstances() { + return maxInstances_; + } + /** + * + * + *
+     * Maximum number of instances to create for this version.
+     * 
+ * + * int32 max_instances = 2; + * + * @param value The maxInstances to set. + * @return This builder for chaining. + */ + public Builder setMaxInstances(int value) { + + maxInstances_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of instances to create for this version.
+     * 
+ * + * int32 max_instances = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxInstances() { + + maxInstances_ = 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.appengine.v1.BasicScaling) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.BasicScaling) + private static final com.google.appengine.v1.BasicScaling DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.BasicScaling(); + } + + public static com.google.appengine.v1.BasicScaling getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BasicScaling parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BasicScaling(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.appengine.v1.BasicScaling getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BasicScalingOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BasicScalingOrBuilder.java new file mode 100644 index 00000000..ebbb8f7d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BasicScalingOrBuilder.java @@ -0,0 +1,76 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface BasicScalingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.BasicScaling) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Duration of time after the last request that an instance must wait before
+   * the instance is shut down.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + * + * @return Whether the idleTimeout field is set. + */ + boolean hasIdleTimeout(); + /** + * + * + *
+   * Duration of time after the last request that an instance must wait before
+   * the instance is shut down.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + * + * @return The idleTimeout. + */ + com.google.protobuf.Duration getIdleTimeout(); + /** + * + * + *
+   * Duration of time after the last request that an instance must wait before
+   * the instance is shut down.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1; + */ + com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder(); + + /** + * + * + *
+   * Maximum number of instances to create for this version.
+   * 
+ * + * int32 max_instances = 2; + * + * @return The maxInstances. + */ + int getMaxInstances(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesRequest.java new file mode 100644 index 00000000..cdf2debf --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesRequest.java @@ -0,0 +1,1142 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Firewall.BatchUpdateIngressRules`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.BatchUpdateIngressRulesRequest} + */ +public final class BatchUpdateIngressRulesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.BatchUpdateIngressRulesRequest) + BatchUpdateIngressRulesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchUpdateIngressRulesRequest.newBuilder() to construct. + private BatchUpdateIngressRulesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchUpdateIngressRulesRequest() { + name_ = ""; + ingressRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchUpdateIngressRulesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchUpdateIngressRulesRequest( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ingressRules_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ingressRules_.add( + input.readMessage( + com.google.appengine.v1.firewall.FirewallRule.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)) { + ingressRules_ = java.util.Collections.unmodifiableList(ingressRules_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.BatchUpdateIngressRulesRequest.class, + com.google.appengine.v1.BatchUpdateIngressRulesRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the Firewall collection to set.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the Firewall collection to set.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INGRESS_RULES_FIELD_NUMBER = 2; + private java.util.List ingressRules_; + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + @java.lang.Override + public java.util.List getIngressRulesList() { + return ingressRules_; + } + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + @java.lang.Override + public java.util.List + getIngressRulesOrBuilderList() { + return ingressRules_; + } + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + @java.lang.Override + public int getIngressRulesCount() { + return ingressRules_.size(); + } + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule getIngressRules(int index) { + return ingressRules_.get(index); + } + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getIngressRulesOrBuilder( + int index) { + return ingressRules_.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < ingressRules_.size(); i++) { + output.writeMessage(2, ingressRules_.get(i)); + } + 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_); + } + for (int i = 0; i < ingressRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, ingressRules_.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.appengine.v1.BatchUpdateIngressRulesRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.BatchUpdateIngressRulesRequest other = + (com.google.appengine.v1.BatchUpdateIngressRulesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getIngressRulesList().equals(other.getIngressRulesList())) 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(); + if (getIngressRulesCount() > 0) { + hash = (37 * hash) + INGRESS_RULES_FIELD_NUMBER; + hash = (53 * hash) + getIngressRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest 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.appengine.v1.BatchUpdateIngressRulesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest 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.appengine.v1.BatchUpdateIngressRulesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest 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.appengine.v1.BatchUpdateIngressRulesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest 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.appengine.v1.BatchUpdateIngressRulesRequest 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 message for `Firewall.BatchUpdateIngressRules`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.BatchUpdateIngressRulesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.BatchUpdateIngressRulesRequest) + com.google.appengine.v1.BatchUpdateIngressRulesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.BatchUpdateIngressRulesRequest.class, + com.google.appengine.v1.BatchUpdateIngressRulesRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.BatchUpdateIngressRulesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIngressRulesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (ingressRulesBuilder_ == null) { + ingressRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ingressRulesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.BatchUpdateIngressRulesRequest getDefaultInstanceForType() { + return com.google.appengine.v1.BatchUpdateIngressRulesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.BatchUpdateIngressRulesRequest build() { + com.google.appengine.v1.BatchUpdateIngressRulesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.BatchUpdateIngressRulesRequest buildPartial() { + com.google.appengine.v1.BatchUpdateIngressRulesRequest result = + new com.google.appengine.v1.BatchUpdateIngressRulesRequest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (ingressRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ingressRules_ = java.util.Collections.unmodifiableList(ingressRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ingressRules_ = ingressRules_; + } else { + result.ingressRules_ = ingressRulesBuilder_.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.appengine.v1.BatchUpdateIngressRulesRequest) { + return mergeFrom((com.google.appengine.v1.BatchUpdateIngressRulesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.BatchUpdateIngressRulesRequest other) { + if (other == com.google.appengine.v1.BatchUpdateIngressRulesRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (ingressRulesBuilder_ == null) { + if (!other.ingressRules_.isEmpty()) { + if (ingressRules_.isEmpty()) { + ingressRules_ = other.ingressRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIngressRulesIsMutable(); + ingressRules_.addAll(other.ingressRules_); + } + onChanged(); + } + } else { + if (!other.ingressRules_.isEmpty()) { + if (ingressRulesBuilder_.isEmpty()) { + ingressRulesBuilder_.dispose(); + ingressRulesBuilder_ = null; + ingressRules_ = other.ingressRules_; + bitField0_ = (bitField0_ & ~0x00000001); + ingressRulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIngressRulesFieldBuilder() + : null; + } else { + ingressRulesBuilder_.addAllMessages(other.ingressRules_); + } + } + } + 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.appengine.v1.BatchUpdateIngressRulesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.BatchUpdateIngressRulesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the Firewall collection to set.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the Firewall collection to set.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the Firewall collection to set.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Firewall collection to set.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Firewall collection to set.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List ingressRules_ = + java.util.Collections.emptyList(); + + private void ensureIngressRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ingressRules_ = + new java.util.ArrayList(ingressRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + ingressRulesBuilder_; + + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public java.util.List getIngressRulesList() { + if (ingressRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ingressRules_); + } else { + return ingressRulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public int getIngressRulesCount() { + if (ingressRulesBuilder_ == null) { + return ingressRules_.size(); + } else { + return ingressRulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public com.google.appengine.v1.firewall.FirewallRule getIngressRules(int index) { + if (ingressRulesBuilder_ == null) { + return ingressRules_.get(index); + } else { + return ingressRulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public Builder setIngressRules(int index, com.google.appengine.v1.firewall.FirewallRule value) { + if (ingressRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIngressRulesIsMutable(); + ingressRules_.set(index, value); + onChanged(); + } else { + ingressRulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public Builder setIngressRules( + int index, com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.set(index, builderForValue.build()); + onChanged(); + } else { + ingressRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public Builder addIngressRules(com.google.appengine.v1.firewall.FirewallRule value) { + if (ingressRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIngressRulesIsMutable(); + ingressRules_.add(value); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public Builder addIngressRules(int index, com.google.appengine.v1.firewall.FirewallRule value) { + if (ingressRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIngressRulesIsMutable(); + ingressRules_.add(index, value); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public Builder addIngressRules( + com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.add(builderForValue.build()); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public Builder addIngressRules( + int index, com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.add(index, builderForValue.build()); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public Builder addAllIngressRules( + java.lang.Iterable values) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ingressRules_); + onChanged(); + } else { + ingressRulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public Builder clearIngressRules() { + if (ingressRulesBuilder_ == null) { + ingressRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ingressRulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public Builder removeIngressRules(int index) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.remove(index); + onChanged(); + } else { + ingressRulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder getIngressRulesBuilder(int index) { + return getIngressRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getIngressRulesOrBuilder( + int index) { + if (ingressRulesBuilder_ == null) { + return ingressRules_.get(index); + } else { + return ingressRulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public java.util.List + getIngressRulesOrBuilderList() { + if (ingressRulesBuilder_ != null) { + return ingressRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ingressRules_); + } + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder addIngressRulesBuilder() { + return getIngressRulesFieldBuilder() + .addBuilder(com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder addIngressRulesBuilder(int index) { + return getIngressRulesFieldBuilder() + .addBuilder(index, com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of FirewallRules to replace the existing set.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + public java.util.List + getIngressRulesBuilderList() { + return getIngressRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + getIngressRulesFieldBuilder() { + if (ingressRulesBuilder_ == null) { + ingressRulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder>( + ingressRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + ingressRules_ = null; + } + return ingressRulesBuilder_; + } + + @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.appengine.v1.BatchUpdateIngressRulesRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.BatchUpdateIngressRulesRequest) + private static final com.google.appengine.v1.BatchUpdateIngressRulesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.BatchUpdateIngressRulesRequest(); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchUpdateIngressRulesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchUpdateIngressRulesRequest(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.appengine.v1.BatchUpdateIngressRulesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesRequestOrBuilder.java new file mode 100644 index 00000000..5f4568b0 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface BatchUpdateIngressRulesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.BatchUpdateIngressRulesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Firewall collection to set.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the Firewall collection to set.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + java.util.List getIngressRulesList(); + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + com.google.appengine.v1.firewall.FirewallRule getIngressRules(int index); + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + int getIngressRulesCount(); + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + java.util.List + getIngressRulesOrBuilderList(); + /** + * + * + *
+   * A list of FirewallRules to replace the existing set.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 2; + */ + com.google.appengine.v1.firewall.FirewallRuleOrBuilder getIngressRulesOrBuilder(int index); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesResponse.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesResponse.java new file mode 100644 index 00000000..a1e985e7 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesResponse.java @@ -0,0 +1,956 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Response message for `Firewall.UpdateAllIngressRules`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.BatchUpdateIngressRulesResponse} + */ +public final class BatchUpdateIngressRulesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.BatchUpdateIngressRulesResponse) + BatchUpdateIngressRulesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchUpdateIngressRulesResponse.newBuilder() to construct. + private BatchUpdateIngressRulesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchUpdateIngressRulesResponse() { + ingressRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchUpdateIngressRulesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchUpdateIngressRulesResponse( + 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)) { + ingressRules_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ingressRules_.add( + input.readMessage( + com.google.appengine.v1.firewall.FirewallRule.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)) { + ingressRules_ = java.util.Collections.unmodifiableList(ingressRules_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.BatchUpdateIngressRulesResponse.class, + com.google.appengine.v1.BatchUpdateIngressRulesResponse.Builder.class); + } + + public static final int INGRESS_RULES_FIELD_NUMBER = 1; + private java.util.List ingressRules_; + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public java.util.List getIngressRulesList() { + return ingressRules_; + } + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public java.util.List + getIngressRulesOrBuilderList() { + return ingressRules_; + } + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public int getIngressRulesCount() { + return ingressRules_.size(); + } + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule getIngressRules(int index) { + return ingressRules_.get(index); + } + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getIngressRulesOrBuilder( + int index) { + return ingressRules_.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 < ingressRules_.size(); i++) { + output.writeMessage(1, ingressRules_.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 < ingressRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, ingressRules_.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.appengine.v1.BatchUpdateIngressRulesResponse)) { + return super.equals(obj); + } + com.google.appengine.v1.BatchUpdateIngressRulesResponse other = + (com.google.appengine.v1.BatchUpdateIngressRulesResponse) obj; + + if (!getIngressRulesList().equals(other.getIngressRulesList())) 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 (getIngressRulesCount() > 0) { + hash = (37 * hash) + INGRESS_RULES_FIELD_NUMBER; + hash = (53 * hash) + getIngressRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse 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.appengine.v1.BatchUpdateIngressRulesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse 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.appengine.v1.BatchUpdateIngressRulesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse 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.appengine.v1.BatchUpdateIngressRulesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse 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.appengine.v1.BatchUpdateIngressRulesResponse 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 message for `Firewall.UpdateAllIngressRules`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.BatchUpdateIngressRulesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.BatchUpdateIngressRulesResponse) + com.google.appengine.v1.BatchUpdateIngressRulesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.BatchUpdateIngressRulesResponse.class, + com.google.appengine.v1.BatchUpdateIngressRulesResponse.Builder.class); + } + + // Construct using com.google.appengine.v1.BatchUpdateIngressRulesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIngressRulesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (ingressRulesBuilder_ == null) { + ingressRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ingressRulesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_BatchUpdateIngressRulesResponse_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.BatchUpdateIngressRulesResponse getDefaultInstanceForType() { + return com.google.appengine.v1.BatchUpdateIngressRulesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.BatchUpdateIngressRulesResponse build() { + com.google.appengine.v1.BatchUpdateIngressRulesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.BatchUpdateIngressRulesResponse buildPartial() { + com.google.appengine.v1.BatchUpdateIngressRulesResponse result = + new com.google.appengine.v1.BatchUpdateIngressRulesResponse(this); + int from_bitField0_ = bitField0_; + if (ingressRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ingressRules_ = java.util.Collections.unmodifiableList(ingressRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ingressRules_ = ingressRules_; + } else { + result.ingressRules_ = ingressRulesBuilder_.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.appengine.v1.BatchUpdateIngressRulesResponse) { + return mergeFrom((com.google.appengine.v1.BatchUpdateIngressRulesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.BatchUpdateIngressRulesResponse other) { + if (other == com.google.appengine.v1.BatchUpdateIngressRulesResponse.getDefaultInstance()) + return this; + if (ingressRulesBuilder_ == null) { + if (!other.ingressRules_.isEmpty()) { + if (ingressRules_.isEmpty()) { + ingressRules_ = other.ingressRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIngressRulesIsMutable(); + ingressRules_.addAll(other.ingressRules_); + } + onChanged(); + } + } else { + if (!other.ingressRules_.isEmpty()) { + if (ingressRulesBuilder_.isEmpty()) { + ingressRulesBuilder_.dispose(); + ingressRulesBuilder_ = null; + ingressRules_ = other.ingressRules_; + bitField0_ = (bitField0_ & ~0x00000001); + ingressRulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIngressRulesFieldBuilder() + : null; + } else { + ingressRulesBuilder_.addAllMessages(other.ingressRules_); + } + } + } + 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.appengine.v1.BatchUpdateIngressRulesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.BatchUpdateIngressRulesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List ingressRules_ = + java.util.Collections.emptyList(); + + private void ensureIngressRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ingressRules_ = + new java.util.ArrayList(ingressRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + ingressRulesBuilder_; + + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public java.util.List getIngressRulesList() { + if (ingressRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ingressRules_); + } else { + return ingressRulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public int getIngressRulesCount() { + if (ingressRulesBuilder_ == null) { + return ingressRules_.size(); + } else { + return ingressRulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRule getIngressRules(int index) { + if (ingressRulesBuilder_ == null) { + return ingressRules_.get(index); + } else { + return ingressRulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder setIngressRules(int index, com.google.appengine.v1.firewall.FirewallRule value) { + if (ingressRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIngressRulesIsMutable(); + ingressRules_.set(index, value); + onChanged(); + } else { + ingressRulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder setIngressRules( + int index, com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.set(index, builderForValue.build()); + onChanged(); + } else { + ingressRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addIngressRules(com.google.appengine.v1.firewall.FirewallRule value) { + if (ingressRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIngressRulesIsMutable(); + ingressRules_.add(value); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addIngressRules(int index, com.google.appengine.v1.firewall.FirewallRule value) { + if (ingressRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIngressRulesIsMutable(); + ingressRules_.add(index, value); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addIngressRules( + com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.add(builderForValue.build()); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addIngressRules( + int index, com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.add(index, builderForValue.build()); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addAllIngressRules( + java.lang.Iterable values) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ingressRules_); + onChanged(); + } else { + ingressRulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder clearIngressRules() { + if (ingressRulesBuilder_ == null) { + ingressRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ingressRulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder removeIngressRules(int index) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.remove(index); + onChanged(); + } else { + ingressRulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder getIngressRulesBuilder(int index) { + return getIngressRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getIngressRulesOrBuilder( + int index) { + if (ingressRulesBuilder_ == null) { + return ingressRules_.get(index); + } else { + return ingressRulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public java.util.List + getIngressRulesOrBuilderList() { + if (ingressRulesBuilder_ != null) { + return ingressRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ingressRules_); + } + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder addIngressRulesBuilder() { + return getIngressRulesFieldBuilder() + .addBuilder(com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance()); + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder addIngressRulesBuilder(int index) { + return getIngressRulesFieldBuilder() + .addBuilder(index, com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance()); + } + /** + * + * + *
+     * The full list of ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public java.util.List + getIngressRulesBuilderList() { + return getIngressRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + getIngressRulesFieldBuilder() { + if (ingressRulesBuilder_ == null) { + ingressRulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder>( + ingressRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + ingressRules_ = null; + } + return ingressRulesBuilder_; + } + + @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.appengine.v1.BatchUpdateIngressRulesResponse) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.BatchUpdateIngressRulesResponse) + private static final com.google.appengine.v1.BatchUpdateIngressRulesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.BatchUpdateIngressRulesResponse(); + } + + public static com.google.appengine.v1.BatchUpdateIngressRulesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchUpdateIngressRulesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchUpdateIngressRulesResponse(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.appengine.v1.BatchUpdateIngressRulesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesResponseOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesResponseOrBuilder.java new file mode 100644 index 00000000..80159496 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/BatchUpdateIngressRulesResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface BatchUpdateIngressRulesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.BatchUpdateIngressRulesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + java.util.List getIngressRulesList(); + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + com.google.appengine.v1.firewall.FirewallRule getIngressRules(int index); + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + int getIngressRulesCount(); + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + java.util.List + getIngressRulesOrBuilderList(); + /** + * + * + *
+   * The full list of ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + com.google.appengine.v1.firewall.FirewallRuleOrBuilder getIngressRulesOrBuilder(int index); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CertificateProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CertificateProto.java new file mode 100644 index 00000000..f00b1742 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CertificateProto.java @@ -0,0 +1,124 @@ +/* + * 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/appengine/v1/certificate.proto + +package com.google.appengine.v1; + +public final class CertificateProto { + private CertificateProto() {} + + 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_appengine_v1_AuthorizedCertificate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_AuthorizedCertificate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_CertificateRawData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_CertificateRawData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_ManagedCertificate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ManagedCertificate_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/appengine/v1/certificate.proto\022" + + "\023google.appengine.v1\032\037google/protobuf/ti" + + "mestamp.proto\032\034google/api/annotations.pr" + + "oto\"\333\002\n\025AuthorizedCertificate\022\014\n\004name\030\001 " + + "\001(\t\022\n\n\002id\030\002 \001(\t\022\024\n\014display_name\030\003 \001(\t\022\024\n" + + "\014domain_names\030\004 \003(\t\022/\n\013expire_time\030\005 \001(\013" + + "2\032.google.protobuf.Timestamp\022E\n\024certific" + + "ate_raw_data\030\006 \001(\0132\'.google.appengine.v1" + + ".CertificateRawData\022D\n\023managed_certifica" + + "te\030\007 \001(\0132\'.google.appengine.v1.ManagedCe" + + "rtificate\022\037\n\027visible_domain_mappings\030\010 \003" + + "(\t\022\035\n\025domain_mappings_count\030\t \001(\005\"E\n\022Cer" + + "tificateRawData\022\032\n\022public_certificate\030\001 " + + "\001(\t\022\023\n\013private_key\030\002 \001(\t\"\202\001\n\022ManagedCert" + + "ificate\0225\n\021last_renewal_time\030\001 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\0225\n\006status\030\002 \001(\0162%" + + ".google.appengine.v1.ManagementStatus*\306\001" + + "\n\020ManagementStatus\022!\n\035MANAGEMENT_STATUS_" + + "UNSPECIFIED\020\000\022\006\n\002OK\020\001\022\013\n\007PENDING\020\002\022\037\n\033FA" + + "ILED_RETRYING_NOT_VISIBLE\020\004\022\024\n\020FAILED_PE" + + "RMANENT\020\006\022!\n\035FAILED_RETRYING_CAA_FORBIDD" + + "EN\020\007\022 \n\034FAILED_RETRYING_CAA_CHECKING\020\010B\302" + + "\001\n\027com.google.appengine.v1B\020CertificateP" + + "rotoP\001Z + * An SSL certificate obtained from a certificate authority. + * + * + * Protobuf type {@code google.appengine.v1.CertificateRawData} + */ +public final class CertificateRawData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CertificateRawData) + CertificateRawDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateRawData.newBuilder() to construct. + private CertificateRawData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateRawData() { + publicCertificate_ = ""; + privateKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateRawData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CertificateRawData( + 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(); + + publicCertificate_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + privateKey_ = 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.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_CertificateRawData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_CertificateRawData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CertificateRawData.class, + com.google.appengine.v1.CertificateRawData.Builder.class); + } + + public static final int PUBLIC_CERTIFICATE_FIELD_NUMBER = 1; + private volatile java.lang.Object publicCertificate_; + /** + * + * + *
+   * PEM encoded x.509 public key certificate. This field is set once on
+   * certificate creation. Must include the header and footer. Example:
+   * <pre>
+   * -----BEGIN CERTIFICATE-----
+   * <certificate_value>
+   * -----END CERTIFICATE-----
+   * </pre>
+   * 
+ * + * string public_certificate = 1; + * + * @return The publicCertificate. + */ + @java.lang.Override + public java.lang.String getPublicCertificate() { + java.lang.Object ref = publicCertificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicCertificate_ = s; + return s; + } + } + /** + * + * + *
+   * PEM encoded x.509 public key certificate. This field is set once on
+   * certificate creation. Must include the header and footer. Example:
+   * <pre>
+   * -----BEGIN CERTIFICATE-----
+   * <certificate_value>
+   * -----END CERTIFICATE-----
+   * </pre>
+   * 
+ * + * string public_certificate = 1; + * + * @return The bytes for publicCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicCertificateBytes() { + java.lang.Object ref = publicCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIVATE_KEY_FIELD_NUMBER = 2; + private volatile java.lang.Object privateKey_; + /** + * + * + *
+   * Unencrypted PEM encoded RSA private key. This field is set once on
+   * certificate creation and then encrypted. The key size must be 2048
+   * bits or fewer. Must include the header and footer. Example:
+   * <pre>
+   * -----BEGIN RSA PRIVATE KEY-----
+   * <unencrypted_key_value>
+   * -----END RSA PRIVATE KEY-----
+   * </pre>
+   * @InputOnly
+   * 
+ * + * string private_key = 2; + * + * @return The privateKey. + */ + @java.lang.Override + public java.lang.String getPrivateKey() { + java.lang.Object ref = privateKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateKey_ = s; + return s; + } + } + /** + * + * + *
+   * Unencrypted PEM encoded RSA private key. This field is set once on
+   * certificate creation and then encrypted. The key size must be 2048
+   * bits or fewer. Must include the header and footer. Example:
+   * <pre>
+   * -----BEGIN RSA PRIVATE KEY-----
+   * <unencrypted_key_value>
+   * -----END RSA PRIVATE KEY-----
+   * </pre>
+   * @InputOnly
+   * 
+ * + * string private_key = 2; + * + * @return The bytes for privateKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrivateKeyBytes() { + java.lang.Object ref = privateKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateKey_ = 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 (!getPublicCertificateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicCertificate_); + } + if (!getPrivateKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, privateKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPublicCertificateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicCertificate_); + } + if (!getPrivateKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, privateKey_); + } + 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.appengine.v1.CertificateRawData)) { + return super.equals(obj); + } + com.google.appengine.v1.CertificateRawData other = + (com.google.appengine.v1.CertificateRawData) obj; + + if (!getPublicCertificate().equals(other.getPublicCertificate())) return false; + if (!getPrivateKey().equals(other.getPrivateKey())) 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) + PUBLIC_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getPublicCertificate().hashCode(); + hash = (37 * hash) + PRIVATE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPrivateKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CertificateRawData parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CertificateRawData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CertificateRawData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CertificateRawData 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.appengine.v1.CertificateRawData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CertificateRawData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CertificateRawData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CertificateRawData 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.appengine.v1.CertificateRawData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CertificateRawData 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.appengine.v1.CertificateRawData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CertificateRawData 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.appengine.v1.CertificateRawData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An SSL certificate obtained from a certificate authority.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CertificateRawData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CertificateRawData) + com.google.appengine.v1.CertificateRawDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_CertificateRawData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_CertificateRawData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CertificateRawData.class, + com.google.appengine.v1.CertificateRawData.Builder.class); + } + + // Construct using com.google.appengine.v1.CertificateRawData.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(); + publicCertificate_ = ""; + + privateKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_CertificateRawData_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CertificateRawData getDefaultInstanceForType() { + return com.google.appengine.v1.CertificateRawData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CertificateRawData build() { + com.google.appengine.v1.CertificateRawData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CertificateRawData buildPartial() { + com.google.appengine.v1.CertificateRawData result = + new com.google.appengine.v1.CertificateRawData(this); + result.publicCertificate_ = publicCertificate_; + result.privateKey_ = privateKey_; + 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.appengine.v1.CertificateRawData) { + return mergeFrom((com.google.appengine.v1.CertificateRawData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CertificateRawData other) { + if (other == com.google.appengine.v1.CertificateRawData.getDefaultInstance()) return this; + if (!other.getPublicCertificate().isEmpty()) { + publicCertificate_ = other.publicCertificate_; + onChanged(); + } + if (!other.getPrivateKey().isEmpty()) { + privateKey_ = other.privateKey_; + 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.appengine.v1.CertificateRawData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.CertificateRawData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object publicCertificate_ = ""; + /** + * + * + *
+     * PEM encoded x.509 public key certificate. This field is set once on
+     * certificate creation. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN CERTIFICATE-----
+     * <certificate_value>
+     * -----END CERTIFICATE-----
+     * </pre>
+     * 
+ * + * string public_certificate = 1; + * + * @return The publicCertificate. + */ + public java.lang.String getPublicCertificate() { + java.lang.Object ref = publicCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * PEM encoded x.509 public key certificate. This field is set once on
+     * certificate creation. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN CERTIFICATE-----
+     * <certificate_value>
+     * -----END CERTIFICATE-----
+     * </pre>
+     * 
+ * + * string public_certificate = 1; + * + * @return The bytes for publicCertificate. + */ + public com.google.protobuf.ByteString getPublicCertificateBytes() { + java.lang.Object ref = publicCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * PEM encoded x.509 public key certificate. This field is set once on
+     * certificate creation. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN CERTIFICATE-----
+     * <certificate_value>
+     * -----END CERTIFICATE-----
+     * </pre>
+     * 
+ * + * string public_certificate = 1; + * + * @param value The publicCertificate to set. + * @return This builder for chaining. + */ + public Builder setPublicCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * PEM encoded x.509 public key certificate. This field is set once on
+     * certificate creation. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN CERTIFICATE-----
+     * <certificate_value>
+     * -----END CERTIFICATE-----
+     * </pre>
+     * 
+ * + * string public_certificate = 1; + * + * @return This builder for chaining. + */ + public Builder clearPublicCertificate() { + + publicCertificate_ = getDefaultInstance().getPublicCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+     * PEM encoded x.509 public key certificate. This field is set once on
+     * certificate creation. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN CERTIFICATE-----
+     * <certificate_value>
+     * -----END CERTIFICATE-----
+     * </pre>
+     * 
+ * + * string public_certificate = 1; + * + * @param value The bytes for publicCertificate to set. + * @return This builder for chaining. + */ + public Builder setPublicCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicCertificate_ = value; + onChanged(); + return this; + } + + private java.lang.Object privateKey_ = ""; + /** + * + * + *
+     * Unencrypted PEM encoded RSA private key. This field is set once on
+     * certificate creation and then encrypted. The key size must be 2048
+     * bits or fewer. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN RSA PRIVATE KEY-----
+     * <unencrypted_key_value>
+     * -----END RSA PRIVATE KEY-----
+     * </pre>
+     * @InputOnly
+     * 
+ * + * string private_key = 2; + * + * @return The privateKey. + */ + public java.lang.String getPrivateKey() { + java.lang.Object ref = privateKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unencrypted PEM encoded RSA private key. This field is set once on
+     * certificate creation and then encrypted. The key size must be 2048
+     * bits or fewer. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN RSA PRIVATE KEY-----
+     * <unencrypted_key_value>
+     * -----END RSA PRIVATE KEY-----
+     * </pre>
+     * @InputOnly
+     * 
+ * + * string private_key = 2; + * + * @return The bytes for privateKey. + */ + public com.google.protobuf.ByteString getPrivateKeyBytes() { + java.lang.Object ref = privateKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unencrypted PEM encoded RSA private key. This field is set once on
+     * certificate creation and then encrypted. The key size must be 2048
+     * bits or fewer. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN RSA PRIVATE KEY-----
+     * <unencrypted_key_value>
+     * -----END RSA PRIVATE KEY-----
+     * </pre>
+     * @InputOnly
+     * 
+ * + * string private_key = 2; + * + * @param value The privateKey to set. + * @return This builder for chaining. + */ + public Builder setPrivateKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + privateKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Unencrypted PEM encoded RSA private key. This field is set once on
+     * certificate creation and then encrypted. The key size must be 2048
+     * bits or fewer. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN RSA PRIVATE KEY-----
+     * <unencrypted_key_value>
+     * -----END RSA PRIVATE KEY-----
+     * </pre>
+     * @InputOnly
+     * 
+ * + * string private_key = 2; + * + * @return This builder for chaining. + */ + public Builder clearPrivateKey() { + + privateKey_ = getDefaultInstance().getPrivateKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Unencrypted PEM encoded RSA private key. This field is set once on
+     * certificate creation and then encrypted. The key size must be 2048
+     * bits or fewer. Must include the header and footer. Example:
+     * <pre>
+     * -----BEGIN RSA PRIVATE KEY-----
+     * <unencrypted_key_value>
+     * -----END RSA PRIVATE KEY-----
+     * </pre>
+     * @InputOnly
+     * 
+ * + * string private_key = 2; + * + * @param value The bytes for privateKey to set. + * @return This builder for chaining. + */ + public Builder setPrivateKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + privateKey_ = 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.appengine.v1.CertificateRawData) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CertificateRawData) + private static final com.google.appengine.v1.CertificateRawData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CertificateRawData(); + } + + public static com.google.appengine.v1.CertificateRawData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateRawData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CertificateRawData(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.appengine.v1.CertificateRawData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CertificateRawDataOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CertificateRawDataOrBuilder.java new file mode 100644 index 00000000..e968f530 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CertificateRawDataOrBuilder.java @@ -0,0 +1,103 @@ +/* + * 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/appengine/v1/certificate.proto + +package com.google.appengine.v1; + +public interface CertificateRawDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CertificateRawData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * PEM encoded x.509 public key certificate. This field is set once on
+   * certificate creation. Must include the header and footer. Example:
+   * <pre>
+   * -----BEGIN CERTIFICATE-----
+   * <certificate_value>
+   * -----END CERTIFICATE-----
+   * </pre>
+   * 
+ * + * string public_certificate = 1; + * + * @return The publicCertificate. + */ + java.lang.String getPublicCertificate(); + /** + * + * + *
+   * PEM encoded x.509 public key certificate. This field is set once on
+   * certificate creation. Must include the header and footer. Example:
+   * <pre>
+   * -----BEGIN CERTIFICATE-----
+   * <certificate_value>
+   * -----END CERTIFICATE-----
+   * </pre>
+   * 
+ * + * string public_certificate = 1; + * + * @return The bytes for publicCertificate. + */ + com.google.protobuf.ByteString getPublicCertificateBytes(); + + /** + * + * + *
+   * Unencrypted PEM encoded RSA private key. This field is set once on
+   * certificate creation and then encrypted. The key size must be 2048
+   * bits or fewer. Must include the header and footer. Example:
+   * <pre>
+   * -----BEGIN RSA PRIVATE KEY-----
+   * <unencrypted_key_value>
+   * -----END RSA PRIVATE KEY-----
+   * </pre>
+   * @InputOnly
+   * 
+ * + * string private_key = 2; + * + * @return The privateKey. + */ + java.lang.String getPrivateKey(); + /** + * + * + *
+   * Unencrypted PEM encoded RSA private key. This field is set once on
+   * certificate creation and then encrypted. The key size must be 2048
+   * bits or fewer. Must include the header and footer. Example:
+   * <pre>
+   * -----BEGIN RSA PRIVATE KEY-----
+   * <unencrypted_key_value>
+   * -----END RSA PRIVATE KEY-----
+   * </pre>
+   * @InputOnly
+   * 
+ * + * string private_key = 2; + * + * @return The bytes for privateKey. + */ + com.google.protobuf.ByteString getPrivateKeyBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CloudBuildOptions.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CloudBuildOptions.java new file mode 100644 index 00000000..1c60cb5d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CloudBuildOptions.java @@ -0,0 +1,954 @@ +/* + * 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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Options for the build operations performed as a part of the version
+ * deployment. Only applicable for App Engine flexible environment when creating
+ * a version using source code directly.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.CloudBuildOptions} + */ +public final class CloudBuildOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CloudBuildOptions) + CloudBuildOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudBuildOptions.newBuilder() to construct. + private CloudBuildOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudBuildOptions() { + appYamlPath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudBuildOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CloudBuildOptions( + 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(); + + appYamlPath_ = s; + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (cloudBuildTimeout_ != null) { + subBuilder = cloudBuildTimeout_.toBuilder(); + } + cloudBuildTimeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cloudBuildTimeout_); + cloudBuildTimeout_ = 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.appengine.v1.DeployProto + .internal_static_google_appengine_v1_CloudBuildOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_CloudBuildOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CloudBuildOptions.class, + com.google.appengine.v1.CloudBuildOptions.Builder.class); + } + + public static final int APP_YAML_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object appYamlPath_; + /** + * + * + *
+   * Path to the yaml file used in deployment, used to determine runtime
+   * configuration details.
+   * Required for flexible environment builds.
+   * See https://cloud.google.com/appengine/docs/standard/python/config/appref
+   * for more details.
+   * 
+ * + * string app_yaml_path = 1; + * + * @return The appYamlPath. + */ + @java.lang.Override + public java.lang.String getAppYamlPath() { + java.lang.Object ref = appYamlPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appYamlPath_ = s; + return s; + } + } + /** + * + * + *
+   * Path to the yaml file used in deployment, used to determine runtime
+   * configuration details.
+   * Required for flexible environment builds.
+   * See https://cloud.google.com/appengine/docs/standard/python/config/appref
+   * for more details.
+   * 
+ * + * string app_yaml_path = 1; + * + * @return The bytes for appYamlPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppYamlPathBytes() { + java.lang.Object ref = appYamlPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appYamlPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_BUILD_TIMEOUT_FIELD_NUMBER = 2; + private com.google.protobuf.Duration cloudBuildTimeout_; + /** + * + * + *
+   * The Cloud Build timeout used as part of any dependent builds performed by
+   * version creation. Defaults to 10 minutes.
+   * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + * + * @return Whether the cloudBuildTimeout field is set. + */ + @java.lang.Override + public boolean hasCloudBuildTimeout() { + return cloudBuildTimeout_ != null; + } + /** + * + * + *
+   * The Cloud Build timeout used as part of any dependent builds performed by
+   * version creation. Defaults to 10 minutes.
+   * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + * + * @return The cloudBuildTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getCloudBuildTimeout() { + return cloudBuildTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : cloudBuildTimeout_; + } + /** + * + * + *
+   * The Cloud Build timeout used as part of any dependent builds performed by
+   * version creation. Defaults to 10 minutes.
+   * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getCloudBuildTimeoutOrBuilder() { + return getCloudBuildTimeout(); + } + + 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 (!getAppYamlPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, appYamlPath_); + } + if (cloudBuildTimeout_ != null) { + output.writeMessage(2, getCloudBuildTimeout()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAppYamlPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, appYamlPath_); + } + if (cloudBuildTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCloudBuildTimeout()); + } + 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.appengine.v1.CloudBuildOptions)) { + return super.equals(obj); + } + com.google.appengine.v1.CloudBuildOptions other = + (com.google.appengine.v1.CloudBuildOptions) obj; + + if (!getAppYamlPath().equals(other.getAppYamlPath())) return false; + if (hasCloudBuildTimeout() != other.hasCloudBuildTimeout()) return false; + if (hasCloudBuildTimeout()) { + if (!getCloudBuildTimeout().equals(other.getCloudBuildTimeout())) 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) + APP_YAML_PATH_FIELD_NUMBER; + hash = (53 * hash) + getAppYamlPath().hashCode(); + if (hasCloudBuildTimeout()) { + hash = (37 * hash) + CLOUD_BUILD_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getCloudBuildTimeout().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CloudBuildOptions parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CloudBuildOptions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CloudBuildOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CloudBuildOptions 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.appengine.v1.CloudBuildOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CloudBuildOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CloudBuildOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CloudBuildOptions 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.appengine.v1.CloudBuildOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CloudBuildOptions 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.appengine.v1.CloudBuildOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CloudBuildOptions 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.appengine.v1.CloudBuildOptions 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; + } + /** + * + * + *
+   * Options for the build operations performed as a part of the version
+   * deployment. Only applicable for App Engine flexible environment when creating
+   * a version using source code directly.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CloudBuildOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CloudBuildOptions) + com.google.appengine.v1.CloudBuildOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_CloudBuildOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_CloudBuildOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CloudBuildOptions.class, + com.google.appengine.v1.CloudBuildOptions.Builder.class); + } + + // Construct using com.google.appengine.v1.CloudBuildOptions.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(); + appYamlPath_ = ""; + + if (cloudBuildTimeoutBuilder_ == null) { + cloudBuildTimeout_ = null; + } else { + cloudBuildTimeout_ = null; + cloudBuildTimeoutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_CloudBuildOptions_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CloudBuildOptions getDefaultInstanceForType() { + return com.google.appengine.v1.CloudBuildOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CloudBuildOptions build() { + com.google.appengine.v1.CloudBuildOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CloudBuildOptions buildPartial() { + com.google.appengine.v1.CloudBuildOptions result = + new com.google.appengine.v1.CloudBuildOptions(this); + result.appYamlPath_ = appYamlPath_; + if (cloudBuildTimeoutBuilder_ == null) { + result.cloudBuildTimeout_ = cloudBuildTimeout_; + } else { + result.cloudBuildTimeout_ = cloudBuildTimeoutBuilder_.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.appengine.v1.CloudBuildOptions) { + return mergeFrom((com.google.appengine.v1.CloudBuildOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CloudBuildOptions other) { + if (other == com.google.appengine.v1.CloudBuildOptions.getDefaultInstance()) return this; + if (!other.getAppYamlPath().isEmpty()) { + appYamlPath_ = other.appYamlPath_; + onChanged(); + } + if (other.hasCloudBuildTimeout()) { + mergeCloudBuildTimeout(other.getCloudBuildTimeout()); + } + 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.appengine.v1.CloudBuildOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.CloudBuildOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object appYamlPath_ = ""; + /** + * + * + *
+     * Path to the yaml file used in deployment, used to determine runtime
+     * configuration details.
+     * Required for flexible environment builds.
+     * See https://cloud.google.com/appengine/docs/standard/python/config/appref
+     * for more details.
+     * 
+ * + * string app_yaml_path = 1; + * + * @return The appYamlPath. + */ + public java.lang.String getAppYamlPath() { + java.lang.Object ref = appYamlPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appYamlPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to the yaml file used in deployment, used to determine runtime
+     * configuration details.
+     * Required for flexible environment builds.
+     * See https://cloud.google.com/appengine/docs/standard/python/config/appref
+     * for more details.
+     * 
+ * + * string app_yaml_path = 1; + * + * @return The bytes for appYamlPath. + */ + public com.google.protobuf.ByteString getAppYamlPathBytes() { + java.lang.Object ref = appYamlPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appYamlPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to the yaml file used in deployment, used to determine runtime
+     * configuration details.
+     * Required for flexible environment builds.
+     * See https://cloud.google.com/appengine/docs/standard/python/config/appref
+     * for more details.
+     * 
+ * + * string app_yaml_path = 1; + * + * @param value The appYamlPath to set. + * @return This builder for chaining. + */ + public Builder setAppYamlPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + appYamlPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the yaml file used in deployment, used to determine runtime
+     * configuration details.
+     * Required for flexible environment builds.
+     * See https://cloud.google.com/appengine/docs/standard/python/config/appref
+     * for more details.
+     * 
+ * + * string app_yaml_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearAppYamlPath() { + + appYamlPath_ = getDefaultInstance().getAppYamlPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the yaml file used in deployment, used to determine runtime
+     * configuration details.
+     * Required for flexible environment builds.
+     * See https://cloud.google.com/appengine/docs/standard/python/config/appref
+     * for more details.
+     * 
+ * + * string app_yaml_path = 1; + * + * @param value The bytes for appYamlPath to set. + * @return This builder for chaining. + */ + public Builder setAppYamlPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + appYamlPath_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration cloudBuildTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + cloudBuildTimeoutBuilder_; + /** + * + * + *
+     * The Cloud Build timeout used as part of any dependent builds performed by
+     * version creation. Defaults to 10 minutes.
+     * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + * + * @return Whether the cloudBuildTimeout field is set. + */ + public boolean hasCloudBuildTimeout() { + return cloudBuildTimeoutBuilder_ != null || cloudBuildTimeout_ != null; + } + /** + * + * + *
+     * The Cloud Build timeout used as part of any dependent builds performed by
+     * version creation. Defaults to 10 minutes.
+     * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + * + * @return The cloudBuildTimeout. + */ + public com.google.protobuf.Duration getCloudBuildTimeout() { + if (cloudBuildTimeoutBuilder_ == null) { + return cloudBuildTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : cloudBuildTimeout_; + } else { + return cloudBuildTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The Cloud Build timeout used as part of any dependent builds performed by
+     * version creation. Defaults to 10 minutes.
+     * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + */ + public Builder setCloudBuildTimeout(com.google.protobuf.Duration value) { + if (cloudBuildTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudBuildTimeout_ = value; + onChanged(); + } else { + cloudBuildTimeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The Cloud Build timeout used as part of any dependent builds performed by
+     * version creation. Defaults to 10 minutes.
+     * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + */ + public Builder setCloudBuildTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (cloudBuildTimeoutBuilder_ == null) { + cloudBuildTimeout_ = builderForValue.build(); + onChanged(); + } else { + cloudBuildTimeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The Cloud Build timeout used as part of any dependent builds performed by
+     * version creation. Defaults to 10 minutes.
+     * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + */ + public Builder mergeCloudBuildTimeout(com.google.protobuf.Duration value) { + if (cloudBuildTimeoutBuilder_ == null) { + if (cloudBuildTimeout_ != null) { + cloudBuildTimeout_ = + com.google.protobuf.Duration.newBuilder(cloudBuildTimeout_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudBuildTimeout_ = value; + } + onChanged(); + } else { + cloudBuildTimeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The Cloud Build timeout used as part of any dependent builds performed by
+     * version creation. Defaults to 10 minutes.
+     * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + */ + public Builder clearCloudBuildTimeout() { + if (cloudBuildTimeoutBuilder_ == null) { + cloudBuildTimeout_ = null; + onChanged(); + } else { + cloudBuildTimeout_ = null; + cloudBuildTimeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The Cloud Build timeout used as part of any dependent builds performed by
+     * version creation. Defaults to 10 minutes.
+     * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + */ + public com.google.protobuf.Duration.Builder getCloudBuildTimeoutBuilder() { + + onChanged(); + return getCloudBuildTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Cloud Build timeout used as part of any dependent builds performed by
+     * version creation. Defaults to 10 minutes.
+     * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + */ + public com.google.protobuf.DurationOrBuilder getCloudBuildTimeoutOrBuilder() { + if (cloudBuildTimeoutBuilder_ != null) { + return cloudBuildTimeoutBuilder_.getMessageOrBuilder(); + } else { + return cloudBuildTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : cloudBuildTimeout_; + } + } + /** + * + * + *
+     * The Cloud Build timeout used as part of any dependent builds performed by
+     * version creation. Defaults to 10 minutes.
+     * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getCloudBuildTimeoutFieldBuilder() { + if (cloudBuildTimeoutBuilder_ == null) { + cloudBuildTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getCloudBuildTimeout(), getParentForChildren(), isClean()); + cloudBuildTimeout_ = null; + } + return cloudBuildTimeoutBuilder_; + } + + @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.appengine.v1.CloudBuildOptions) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CloudBuildOptions) + private static final com.google.appengine.v1.CloudBuildOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CloudBuildOptions(); + } + + public static com.google.appengine.v1.CloudBuildOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudBuildOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudBuildOptions(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.appengine.v1.CloudBuildOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CloudBuildOptionsOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CloudBuildOptionsOrBuilder.java new file mode 100644 index 00000000..f9d3007f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CloudBuildOptionsOrBuilder.java @@ -0,0 +1,96 @@ +/* + * 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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +public interface CloudBuildOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CloudBuildOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Path to the yaml file used in deployment, used to determine runtime
+   * configuration details.
+   * Required for flexible environment builds.
+   * See https://cloud.google.com/appengine/docs/standard/python/config/appref
+   * for more details.
+   * 
+ * + * string app_yaml_path = 1; + * + * @return The appYamlPath. + */ + java.lang.String getAppYamlPath(); + /** + * + * + *
+   * Path to the yaml file used in deployment, used to determine runtime
+   * configuration details.
+   * Required for flexible environment builds.
+   * See https://cloud.google.com/appengine/docs/standard/python/config/appref
+   * for more details.
+   * 
+ * + * string app_yaml_path = 1; + * + * @return The bytes for appYamlPath. + */ + com.google.protobuf.ByteString getAppYamlPathBytes(); + + /** + * + * + *
+   * The Cloud Build timeout used as part of any dependent builds performed by
+   * version creation. Defaults to 10 minutes.
+   * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + * + * @return Whether the cloudBuildTimeout field is set. + */ + boolean hasCloudBuildTimeout(); + /** + * + * + *
+   * The Cloud Build timeout used as part of any dependent builds performed by
+   * version creation. Defaults to 10 minutes.
+   * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + * + * @return The cloudBuildTimeout. + */ + com.google.protobuf.Duration getCloudBuildTimeout(); + /** + * + * + *
+   * The Cloud Build timeout used as part of any dependent builds performed by
+   * version creation. Defaults to 10 minutes.
+   * 
+ * + * .google.protobuf.Duration cloud_build_timeout = 2; + */ + com.google.protobuf.DurationOrBuilder getCloudBuildTimeoutOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ContainerInfo.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ContainerInfo.java new file mode 100644 index 00000000..98bbfe9c --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ContainerInfo.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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Docker image that is used to create a container and start a VM instance for
+ * the version that you deploy. Only applicable for instances running in the App
+ * Engine flexible environment.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ContainerInfo} + */ +public final class ContainerInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ContainerInfo) + ContainerInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerInfo.newBuilder() to construct. + private ContainerInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerInfo() { + image_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContainerInfo( + 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(); + + image_ = 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.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ContainerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ContainerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ContainerInfo.class, + com.google.appengine.v1.ContainerInfo.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 1; + private volatile java.lang.Object image_; + /** + * + * + *
+   * URI to the hosted container image in Google Container Registry. The URI
+   * must be fully qualified and include a tag or digest.
+   * Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+   * 
+ * + * string image = 1; + * + * @return The image. + */ + @java.lang.Override + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } + } + /** + * + * + *
+   * URI to the hosted container image in Google Container Registry. The URI
+   * must be fully qualified and include a tag or digest.
+   * Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+   * 
+ * + * string image = 1; + * + * @return The bytes for image. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + image_ = 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 (!getImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, image_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, image_); + } + 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.appengine.v1.ContainerInfo)) { + return super.equals(obj); + } + com.google.appengine.v1.ContainerInfo other = (com.google.appengine.v1.ContainerInfo) obj; + + if (!getImage().equals(other.getImage())) 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) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ContainerInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ContainerInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ContainerInfo parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ContainerInfo 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.appengine.v1.ContainerInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ContainerInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ContainerInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ContainerInfo 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.appengine.v1.ContainerInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ContainerInfo 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.appengine.v1.ContainerInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ContainerInfo 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.appengine.v1.ContainerInfo 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; + } + /** + * + * + *
+   * Docker image that is used to create a container and start a VM instance for
+   * the version that you deploy. Only applicable for instances running in the App
+   * Engine flexible environment.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ContainerInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ContainerInfo) + com.google.appengine.v1.ContainerInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ContainerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ContainerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ContainerInfo.class, + com.google.appengine.v1.ContainerInfo.Builder.class); + } + + // Construct using com.google.appengine.v1.ContainerInfo.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(); + image_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ContainerInfo_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ContainerInfo getDefaultInstanceForType() { + return com.google.appengine.v1.ContainerInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ContainerInfo build() { + com.google.appengine.v1.ContainerInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ContainerInfo buildPartial() { + com.google.appengine.v1.ContainerInfo result = + new com.google.appengine.v1.ContainerInfo(this); + result.image_ = image_; + 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.appengine.v1.ContainerInfo) { + return mergeFrom((com.google.appengine.v1.ContainerInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ContainerInfo other) { + if (other == com.google.appengine.v1.ContainerInfo.getDefaultInstance()) return this; + if (!other.getImage().isEmpty()) { + image_ = other.image_; + 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.appengine.v1.ContainerInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ContainerInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object image_ = ""; + /** + * + * + *
+     * URI to the hosted container image in Google Container Registry. The URI
+     * must be fully qualified and include a tag or digest.
+     * Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+     * 
+ * + * string image = 1; + * + * @return The image. + */ + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URI to the hosted container image in Google Container Registry. The URI
+     * must be fully qualified and include a tag or digest.
+     * Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+     * 
+ * + * string image = 1; + * + * @return The bytes for image. + */ + public com.google.protobuf.ByteString getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URI to the hosted container image in Google Container Registry. The URI
+     * must be fully qualified and include a tag or digest.
+     * Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+     * 
+ * + * string image = 1; + * + * @param value The image to set. + * @return This builder for chaining. + */ + public Builder setImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + image_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URI to the hosted container image in Google Container Registry. The URI
+     * must be fully qualified and include a tag or digest.
+     * Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+     * 
+ * + * string image = 1; + * + * @return This builder for chaining. + */ + public Builder clearImage() { + + image_ = getDefaultInstance().getImage(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI to the hosted container image in Google Container Registry. The URI
+     * must be fully qualified and include a tag or digest.
+     * Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+     * 
+ * + * string image = 1; + * + * @param value The bytes for image to set. + * @return This builder for chaining. + */ + public Builder setImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + image_ = 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.appengine.v1.ContainerInfo) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ContainerInfo) + private static final com.google.appengine.v1.ContainerInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ContainerInfo(); + } + + public static com.google.appengine.v1.ContainerInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerInfo(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.appengine.v1.ContainerInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ContainerInfoOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ContainerInfoOrBuilder.java new file mode 100644 index 00000000..40a5b32b --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ContainerInfoOrBuilder.java @@ -0,0 +1,54 @@ +/* + * 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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +public interface ContainerInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ContainerInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URI to the hosted container image in Google Container Registry. The URI
+   * must be fully qualified and include a tag or digest.
+   * Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+   * 
+ * + * string image = 1; + * + * @return The image. + */ + java.lang.String getImage(); + /** + * + * + *
+   * URI to the hosted container image in Google Container Registry. The URI
+   * must be fully qualified and include a tag or digest.
+   * Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
+   * 
+ * + * string image = 1; + * + * @return The bytes for image. + */ + com.google.protobuf.ByteString getImageBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CpuUtilization.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CpuUtilization.java new file mode 100644 index 00000000..de8fd04a --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CpuUtilization.java @@ -0,0 +1,829 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Target scaling by CPU usage.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.CpuUtilization} + */ +public final class CpuUtilization extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CpuUtilization) + CpuUtilizationOrBuilder { + private static final long serialVersionUID = 0L; + // Use CpuUtilization.newBuilder() to construct. + private CpuUtilization(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CpuUtilization() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CpuUtilization(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CpuUtilization( + 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.Duration.Builder subBuilder = null; + if (aggregationWindowLength_ != null) { + subBuilder = aggregationWindowLength_.toBuilder(); + } + aggregationWindowLength_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(aggregationWindowLength_); + aggregationWindowLength_ = subBuilder.buildPartial(); + } + + break; + } + case 17: + { + targetUtilization_ = input.readDouble(); + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_CpuUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_CpuUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CpuUtilization.class, + com.google.appengine.v1.CpuUtilization.Builder.class); + } + + public static final int AGGREGATION_WINDOW_LENGTH_FIELD_NUMBER = 1; + private com.google.protobuf.Duration aggregationWindowLength_; + /** + * + * + *
+   * Period of time over which CPU utilization is calculated.
+   * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + * + * @return Whether the aggregationWindowLength field is set. + */ + @java.lang.Override + public boolean hasAggregationWindowLength() { + return aggregationWindowLength_ != null; + } + /** + * + * + *
+   * Period of time over which CPU utilization is calculated.
+   * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + * + * @return The aggregationWindowLength. + */ + @java.lang.Override + public com.google.protobuf.Duration getAggregationWindowLength() { + return aggregationWindowLength_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : aggregationWindowLength_; + } + /** + * + * + *
+   * Period of time over which CPU utilization is calculated.
+   * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getAggregationWindowLengthOrBuilder() { + return getAggregationWindowLength(); + } + + public static final int TARGET_UTILIZATION_FIELD_NUMBER = 2; + private double targetUtilization_; + /** + * + * + *
+   * Target CPU utilization ratio to maintain when scaling. Must be between 0
+   * and 1.
+   * 
+ * + * double target_utilization = 2; + * + * @return The targetUtilization. + */ + @java.lang.Override + public double getTargetUtilization() { + return targetUtilization_; + } + + 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 (aggregationWindowLength_ != null) { + output.writeMessage(1, getAggregationWindowLength()); + } + if (targetUtilization_ != 0D) { + output.writeDouble(2, targetUtilization_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (aggregationWindowLength_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAggregationWindowLength()); + } + if (targetUtilization_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, targetUtilization_); + } + 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.appengine.v1.CpuUtilization)) { + return super.equals(obj); + } + com.google.appengine.v1.CpuUtilization other = (com.google.appengine.v1.CpuUtilization) obj; + + if (hasAggregationWindowLength() != other.hasAggregationWindowLength()) return false; + if (hasAggregationWindowLength()) { + if (!getAggregationWindowLength().equals(other.getAggregationWindowLength())) return false; + } + if (java.lang.Double.doubleToLongBits(getTargetUtilization()) + != java.lang.Double.doubleToLongBits(other.getTargetUtilization())) 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 (hasAggregationWindowLength()) { + hash = (37 * hash) + AGGREGATION_WINDOW_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getAggregationWindowLength().hashCode(); + } + hash = (37 * hash) + TARGET_UTILIZATION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTargetUtilization())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CpuUtilization parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CpuUtilization parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CpuUtilization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CpuUtilization 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.appengine.v1.CpuUtilization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CpuUtilization parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CpuUtilization parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CpuUtilization 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.appengine.v1.CpuUtilization parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CpuUtilization 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.appengine.v1.CpuUtilization parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CpuUtilization 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.appengine.v1.CpuUtilization 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; + } + /** + * + * + *
+   * Target scaling by CPU usage.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CpuUtilization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CpuUtilization) + com.google.appengine.v1.CpuUtilizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_CpuUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_CpuUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CpuUtilization.class, + com.google.appengine.v1.CpuUtilization.Builder.class); + } + + // Construct using com.google.appengine.v1.CpuUtilization.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 (aggregationWindowLengthBuilder_ == null) { + aggregationWindowLength_ = null; + } else { + aggregationWindowLength_ = null; + aggregationWindowLengthBuilder_ = null; + } + targetUtilization_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_CpuUtilization_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CpuUtilization getDefaultInstanceForType() { + return com.google.appengine.v1.CpuUtilization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CpuUtilization build() { + com.google.appengine.v1.CpuUtilization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CpuUtilization buildPartial() { + com.google.appengine.v1.CpuUtilization result = + new com.google.appengine.v1.CpuUtilization(this); + if (aggregationWindowLengthBuilder_ == null) { + result.aggregationWindowLength_ = aggregationWindowLength_; + } else { + result.aggregationWindowLength_ = aggregationWindowLengthBuilder_.build(); + } + result.targetUtilization_ = targetUtilization_; + 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.appengine.v1.CpuUtilization) { + return mergeFrom((com.google.appengine.v1.CpuUtilization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CpuUtilization other) { + if (other == com.google.appengine.v1.CpuUtilization.getDefaultInstance()) return this; + if (other.hasAggregationWindowLength()) { + mergeAggregationWindowLength(other.getAggregationWindowLength()); + } + if (other.getTargetUtilization() != 0D) { + setTargetUtilization(other.getTargetUtilization()); + } + 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.appengine.v1.CpuUtilization parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.CpuUtilization) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration aggregationWindowLength_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + aggregationWindowLengthBuilder_; + /** + * + * + *
+     * Period of time over which CPU utilization is calculated.
+     * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + * + * @return Whether the aggregationWindowLength field is set. + */ + public boolean hasAggregationWindowLength() { + return aggregationWindowLengthBuilder_ != null || aggregationWindowLength_ != null; + } + /** + * + * + *
+     * Period of time over which CPU utilization is calculated.
+     * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + * + * @return The aggregationWindowLength. + */ + public com.google.protobuf.Duration getAggregationWindowLength() { + if (aggregationWindowLengthBuilder_ == null) { + return aggregationWindowLength_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : aggregationWindowLength_; + } else { + return aggregationWindowLengthBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Period of time over which CPU utilization is calculated.
+     * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + */ + public Builder setAggregationWindowLength(com.google.protobuf.Duration value) { + if (aggregationWindowLengthBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationWindowLength_ = value; + onChanged(); + } else { + aggregationWindowLengthBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Period of time over which CPU utilization is calculated.
+     * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + */ + public Builder setAggregationWindowLength( + com.google.protobuf.Duration.Builder builderForValue) { + if (aggregationWindowLengthBuilder_ == null) { + aggregationWindowLength_ = builderForValue.build(); + onChanged(); + } else { + aggregationWindowLengthBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Period of time over which CPU utilization is calculated.
+     * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + */ + public Builder mergeAggregationWindowLength(com.google.protobuf.Duration value) { + if (aggregationWindowLengthBuilder_ == null) { + if (aggregationWindowLength_ != null) { + aggregationWindowLength_ = + com.google.protobuf.Duration.newBuilder(aggregationWindowLength_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationWindowLength_ = value; + } + onChanged(); + } else { + aggregationWindowLengthBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Period of time over which CPU utilization is calculated.
+     * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + */ + public Builder clearAggregationWindowLength() { + if (aggregationWindowLengthBuilder_ == null) { + aggregationWindowLength_ = null; + onChanged(); + } else { + aggregationWindowLength_ = null; + aggregationWindowLengthBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Period of time over which CPU utilization is calculated.
+     * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + */ + public com.google.protobuf.Duration.Builder getAggregationWindowLengthBuilder() { + + onChanged(); + return getAggregationWindowLengthFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Period of time over which CPU utilization is calculated.
+     * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + */ + public com.google.protobuf.DurationOrBuilder getAggregationWindowLengthOrBuilder() { + if (aggregationWindowLengthBuilder_ != null) { + return aggregationWindowLengthBuilder_.getMessageOrBuilder(); + } else { + return aggregationWindowLength_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : aggregationWindowLength_; + } + } + /** + * + * + *
+     * Period of time over which CPU utilization is calculated.
+     * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getAggregationWindowLengthFieldBuilder() { + if (aggregationWindowLengthBuilder_ == null) { + aggregationWindowLengthBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getAggregationWindowLength(), getParentForChildren(), isClean()); + aggregationWindowLength_ = null; + } + return aggregationWindowLengthBuilder_; + } + + private double targetUtilization_; + /** + * + * + *
+     * Target CPU utilization ratio to maintain when scaling. Must be between 0
+     * and 1.
+     * 
+ * + * double target_utilization = 2; + * + * @return The targetUtilization. + */ + @java.lang.Override + public double getTargetUtilization() { + return targetUtilization_; + } + /** + * + * + *
+     * Target CPU utilization ratio to maintain when scaling. Must be between 0
+     * and 1.
+     * 
+ * + * double target_utilization = 2; + * + * @param value The targetUtilization to set. + * @return This builder for chaining. + */ + public Builder setTargetUtilization(double value) { + + targetUtilization_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target CPU utilization ratio to maintain when scaling. Must be between 0
+     * and 1.
+     * 
+ * + * double target_utilization = 2; + * + * @return This builder for chaining. + */ + public Builder clearTargetUtilization() { + + targetUtilization_ = 0D; + 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.appengine.v1.CpuUtilization) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CpuUtilization) + private static final com.google.appengine.v1.CpuUtilization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CpuUtilization(); + } + + public static com.google.appengine.v1.CpuUtilization getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CpuUtilization parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CpuUtilization(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.appengine.v1.CpuUtilization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CpuUtilizationOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CpuUtilizationOrBuilder.java new file mode 100644 index 00000000..7bf5aeeb --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CpuUtilizationOrBuilder.java @@ -0,0 +1,74 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface CpuUtilizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CpuUtilization) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Period of time over which CPU utilization is calculated.
+   * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + * + * @return Whether the aggregationWindowLength field is set. + */ + boolean hasAggregationWindowLength(); + /** + * + * + *
+   * Period of time over which CPU utilization is calculated.
+   * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + * + * @return The aggregationWindowLength. + */ + com.google.protobuf.Duration getAggregationWindowLength(); + /** + * + * + *
+   * Period of time over which CPU utilization is calculated.
+   * 
+ * + * .google.protobuf.Duration aggregation_window_length = 1; + */ + com.google.protobuf.DurationOrBuilder getAggregationWindowLengthOrBuilder(); + + /** + * + * + *
+   * Target CPU utilization ratio to maintain when scaling. Must be between 0
+   * and 1.
+   * 
+ * + * double target_utilization = 2; + * + * @return The targetUtilization. + */ + double getTargetUtilization(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateApplicationRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateApplicationRequest.java new file mode 100644 index 00000000..c31d7d7b --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateApplicationRequest.java @@ -0,0 +1,732 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Applications.CreateApplication`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.CreateApplicationRequest} + */ +public final class CreateApplicationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CreateApplicationRequest) + CreateApplicationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateApplicationRequest.newBuilder() to construct. + private CreateApplicationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateApplicationRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateApplicationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateApplicationRequest( + 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: + { + com.google.appengine.v1.Application.Builder subBuilder = null; + if (application_ != null) { + subBuilder = application_.toBuilder(); + } + application_ = + input.readMessage( + com.google.appengine.v1.Application.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(application_); + application_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateApplicationRequest.class, + com.google.appengine.v1.CreateApplicationRequest.Builder.class); + } + + public static final int APPLICATION_FIELD_NUMBER = 2; + private com.google.appengine.v1.Application application_; + /** + * + * + *
+   * Application configuration.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return Whether the application field is set. + */ + @java.lang.Override + public boolean hasApplication() { + return application_ != null; + } + /** + * + * + *
+   * Application configuration.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return The application. + */ + @java.lang.Override + public com.google.appengine.v1.Application getApplication() { + return application_ == null + ? com.google.appengine.v1.Application.getDefaultInstance() + : application_; + } + /** + * + * + *
+   * Application configuration.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + */ + @java.lang.Override + public com.google.appengine.v1.ApplicationOrBuilder getApplicationOrBuilder() { + return getApplication(); + } + + 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 (application_ != null) { + output.writeMessage(2, getApplication()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (application_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getApplication()); + } + 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.appengine.v1.CreateApplicationRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.CreateApplicationRequest other = + (com.google.appengine.v1.CreateApplicationRequest) obj; + + if (hasApplication() != other.hasApplication()) return false; + if (hasApplication()) { + if (!getApplication().equals(other.getApplication())) 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 (hasApplication()) { + hash = (37 * hash) + APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getApplication().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CreateApplicationRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateApplicationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateApplicationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateApplicationRequest 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.appengine.v1.CreateApplicationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateApplicationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateApplicationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateApplicationRequest 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.appengine.v1.CreateApplicationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateApplicationRequest 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.appengine.v1.CreateApplicationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateApplicationRequest 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.appengine.v1.CreateApplicationRequest 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 message for `Applications.CreateApplication`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CreateApplicationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CreateApplicationRequest) + com.google.appengine.v1.CreateApplicationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateApplicationRequest.class, + com.google.appengine.v1.CreateApplicationRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.CreateApplicationRequest.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 (applicationBuilder_ == null) { + application_ = null; + } else { + application_ = null; + applicationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateApplicationRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CreateApplicationRequest getDefaultInstanceForType() { + return com.google.appengine.v1.CreateApplicationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CreateApplicationRequest build() { + com.google.appengine.v1.CreateApplicationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CreateApplicationRequest buildPartial() { + com.google.appengine.v1.CreateApplicationRequest result = + new com.google.appengine.v1.CreateApplicationRequest(this); + if (applicationBuilder_ == null) { + result.application_ = application_; + } else { + result.application_ = applicationBuilder_.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.appengine.v1.CreateApplicationRequest) { + return mergeFrom((com.google.appengine.v1.CreateApplicationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CreateApplicationRequest other) { + if (other == com.google.appengine.v1.CreateApplicationRequest.getDefaultInstance()) + return this; + if (other.hasApplication()) { + mergeApplication(other.getApplication()); + } + 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.appengine.v1.CreateApplicationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.CreateApplicationRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.appengine.v1.Application application_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application, + com.google.appengine.v1.Application.Builder, + com.google.appengine.v1.ApplicationOrBuilder> + applicationBuilder_; + /** + * + * + *
+     * Application configuration.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return Whether the application field is set. + */ + public boolean hasApplication() { + return applicationBuilder_ != null || application_ != null; + } + /** + * + * + *
+     * Application configuration.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return The application. + */ + public com.google.appengine.v1.Application getApplication() { + if (applicationBuilder_ == null) { + return application_ == null + ? com.google.appengine.v1.Application.getDefaultInstance() + : application_; + } else { + return applicationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Application configuration.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public Builder setApplication(com.google.appengine.v1.Application value) { + if (applicationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + application_ = value; + onChanged(); + } else { + applicationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Application configuration.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public Builder setApplication(com.google.appengine.v1.Application.Builder builderForValue) { + if (applicationBuilder_ == null) { + application_ = builderForValue.build(); + onChanged(); + } else { + applicationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Application configuration.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public Builder mergeApplication(com.google.appengine.v1.Application value) { + if (applicationBuilder_ == null) { + if (application_ != null) { + application_ = + com.google.appengine.v1.Application.newBuilder(application_) + .mergeFrom(value) + .buildPartial(); + } else { + application_ = value; + } + onChanged(); + } else { + applicationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Application configuration.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public Builder clearApplication() { + if (applicationBuilder_ == null) { + application_ = null; + onChanged(); + } else { + application_ = null; + applicationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Application configuration.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public com.google.appengine.v1.Application.Builder getApplicationBuilder() { + + onChanged(); + return getApplicationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Application configuration.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public com.google.appengine.v1.ApplicationOrBuilder getApplicationOrBuilder() { + if (applicationBuilder_ != null) { + return applicationBuilder_.getMessageOrBuilder(); + } else { + return application_ == null + ? com.google.appengine.v1.Application.getDefaultInstance() + : application_; + } + } + /** + * + * + *
+     * Application configuration.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application, + com.google.appengine.v1.Application.Builder, + com.google.appengine.v1.ApplicationOrBuilder> + getApplicationFieldBuilder() { + if (applicationBuilder_ == null) { + applicationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application, + com.google.appengine.v1.Application.Builder, + com.google.appengine.v1.ApplicationOrBuilder>( + getApplication(), getParentForChildren(), isClean()); + application_ = null; + } + return applicationBuilder_; + } + + @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.appengine.v1.CreateApplicationRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CreateApplicationRequest) + private static final com.google.appengine.v1.CreateApplicationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CreateApplicationRequest(); + } + + public static com.google.appengine.v1.CreateApplicationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateApplicationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateApplicationRequest(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.appengine.v1.CreateApplicationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateApplicationRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateApplicationRequestOrBuilder.java new file mode 100644 index 00000000..4dbf7a65 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateApplicationRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface CreateApplicationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CreateApplicationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Application configuration.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return Whether the application field is set. + */ + boolean hasApplication(); + /** + * + * + *
+   * Application configuration.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return The application. + */ + com.google.appengine.v1.Application getApplication(); + /** + * + * + *
+   * Application configuration.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + */ + com.google.appengine.v1.ApplicationOrBuilder getApplicationOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateAuthorizedCertificateRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateAuthorizedCertificateRequest.java new file mode 100644 index 00000000..8db382f2 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateAuthorizedCertificateRequest.java @@ -0,0 +1,916 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `AuthorizedCertificates.CreateAuthorizedCertificate`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.CreateAuthorizedCertificateRequest} + */ +public final class CreateAuthorizedCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CreateAuthorizedCertificateRequest) + CreateAuthorizedCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAuthorizedCertificateRequest.newBuilder() to construct. + private CreateAuthorizedCertificateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAuthorizedCertificateRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAuthorizedCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateAuthorizedCertificateRequest( + 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: + { + com.google.appengine.v1.AuthorizedCertificate.Builder subBuilder = null; + if (certificate_ != null) { + subBuilder = certificate_.toBuilder(); + } + certificate_ = + input.readMessage( + com.google.appengine.v1.AuthorizedCertificate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificate_); + certificate_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateAuthorizedCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateAuthorizedCertificateRequest.class, + com.google.appengine.v1.CreateAuthorizedCertificateRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent `Application` resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent `Application` resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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 CERTIFICATE_FIELD_NUMBER = 2; + private com.google.appengine.v1.AuthorizedCertificate certificate_; + /** + * + * + *
+   * SSL certificate data.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return Whether the certificate field is set. + */ + @java.lang.Override + public boolean hasCertificate() { + return certificate_ != null; + } + /** + * + * + *
+   * SSL certificate data.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return The certificate. + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificate getCertificate() { + return certificate_ == null + ? com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance() + : certificate_; + } + /** + * + * + *
+   * SSL certificate data.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificateOrBuilder getCertificateOrBuilder() { + return getCertificate(); + } + + 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 (certificate_ != null) { + output.writeMessage(2, getCertificate()); + } + 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 (certificate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCertificate()); + } + 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.appengine.v1.CreateAuthorizedCertificateRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.CreateAuthorizedCertificateRequest other = + (com.google.appengine.v1.CreateAuthorizedCertificateRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasCertificate() != other.hasCertificate()) return false; + if (hasCertificate()) { + if (!getCertificate().equals(other.getCertificate())) 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(); + if (hasCertificate()) { + hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getCertificate().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest 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.appengine.v1.CreateAuthorizedCertificateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest 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.appengine.v1.CreateAuthorizedCertificateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest 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.appengine.v1.CreateAuthorizedCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest 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.appengine.v1.CreateAuthorizedCertificateRequest 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 message for `AuthorizedCertificates.CreateAuthorizedCertificate`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CreateAuthorizedCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CreateAuthorizedCertificateRequest) + com.google.appengine.v1.CreateAuthorizedCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateAuthorizedCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateAuthorizedCertificateRequest.class, + com.google.appengine.v1.CreateAuthorizedCertificateRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.CreateAuthorizedCertificateRequest.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_ = ""; + + if (certificateBuilder_ == null) { + certificate_ = null; + } else { + certificate_ = null; + certificateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CreateAuthorizedCertificateRequest getDefaultInstanceForType() { + return com.google.appengine.v1.CreateAuthorizedCertificateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CreateAuthorizedCertificateRequest build() { + com.google.appengine.v1.CreateAuthorizedCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CreateAuthorizedCertificateRequest buildPartial() { + com.google.appengine.v1.CreateAuthorizedCertificateRequest result = + new com.google.appengine.v1.CreateAuthorizedCertificateRequest(this); + result.parent_ = parent_; + if (certificateBuilder_ == null) { + result.certificate_ = certificate_; + } else { + result.certificate_ = certificateBuilder_.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.appengine.v1.CreateAuthorizedCertificateRequest) { + return mergeFrom((com.google.appengine.v1.CreateAuthorizedCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CreateAuthorizedCertificateRequest other) { + if (other == com.google.appengine.v1.CreateAuthorizedCertificateRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasCertificate()) { + mergeCertificate(other.getCertificate()); + } + 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.appengine.v1.CreateAuthorizedCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.CreateAuthorizedCertificateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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 com.google.appengine.v1.AuthorizedCertificate certificate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.AuthorizedCertificate, + com.google.appengine.v1.AuthorizedCertificate.Builder, + com.google.appengine.v1.AuthorizedCertificateOrBuilder> + certificateBuilder_; + /** + * + * + *
+     * SSL certificate data.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return Whether the certificate field is set. + */ + public boolean hasCertificate() { + return certificateBuilder_ != null || certificate_ != null; + } + /** + * + * + *
+     * SSL certificate data.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return The certificate. + */ + public com.google.appengine.v1.AuthorizedCertificate getCertificate() { + if (certificateBuilder_ == null) { + return certificate_ == null + ? com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance() + : certificate_; + } else { + return certificateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * SSL certificate data.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public Builder setCertificate(com.google.appengine.v1.AuthorizedCertificate value) { + if (certificateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificate_ = value; + onChanged(); + } else { + certificateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * SSL certificate data.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public Builder setCertificate( + com.google.appengine.v1.AuthorizedCertificate.Builder builderForValue) { + if (certificateBuilder_ == null) { + certificate_ = builderForValue.build(); + onChanged(); + } else { + certificateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * SSL certificate data.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public Builder mergeCertificate(com.google.appengine.v1.AuthorizedCertificate value) { + if (certificateBuilder_ == null) { + if (certificate_ != null) { + certificate_ = + com.google.appengine.v1.AuthorizedCertificate.newBuilder(certificate_) + .mergeFrom(value) + .buildPartial(); + } else { + certificate_ = value; + } + onChanged(); + } else { + certificateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * SSL certificate data.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public Builder clearCertificate() { + if (certificateBuilder_ == null) { + certificate_ = null; + onChanged(); + } else { + certificate_ = null; + certificateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * SSL certificate data.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public com.google.appengine.v1.AuthorizedCertificate.Builder getCertificateBuilder() { + + onChanged(); + return getCertificateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * SSL certificate data.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public com.google.appengine.v1.AuthorizedCertificateOrBuilder getCertificateOrBuilder() { + if (certificateBuilder_ != null) { + return certificateBuilder_.getMessageOrBuilder(); + } else { + return certificate_ == null + ? com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance() + : certificate_; + } + } + /** + * + * + *
+     * SSL certificate data.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.AuthorizedCertificate, + com.google.appengine.v1.AuthorizedCertificate.Builder, + com.google.appengine.v1.AuthorizedCertificateOrBuilder> + getCertificateFieldBuilder() { + if (certificateBuilder_ == null) { + certificateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.AuthorizedCertificate, + com.google.appengine.v1.AuthorizedCertificate.Builder, + com.google.appengine.v1.AuthorizedCertificateOrBuilder>( + getCertificate(), getParentForChildren(), isClean()); + certificate_ = null; + } + return certificateBuilder_; + } + + @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.appengine.v1.CreateAuthorizedCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CreateAuthorizedCertificateRequest) + private static final com.google.appengine.v1.CreateAuthorizedCertificateRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CreateAuthorizedCertificateRequest(); + } + + public static com.google.appengine.v1.CreateAuthorizedCertificateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAuthorizedCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateAuthorizedCertificateRequest(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.appengine.v1.CreateAuthorizedCertificateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateAuthorizedCertificateRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateAuthorizedCertificateRequestOrBuilder.java new file mode 100644 index 00000000..58e73e0c --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateAuthorizedCertificateRequestOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface CreateAuthorizedCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CreateAuthorizedCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent `Application` resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent `Application` resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * SSL certificate data.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return Whether the certificate field is set. + */ + boolean hasCertificate(); + /** + * + * + *
+   * SSL certificate data.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return The certificate. + */ + com.google.appengine.v1.AuthorizedCertificate getCertificate(); + /** + * + * + *
+   * SSL certificate data.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + com.google.appengine.v1.AuthorizedCertificateOrBuilder getCertificateOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateDomainMappingRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateDomainMappingRequest.java new file mode 100644 index 00000000..5f31fcaa --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateDomainMappingRequest.java @@ -0,0 +1,1074 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `DomainMappings.CreateDomainMapping`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.CreateDomainMappingRequest} + */ +public final class CreateDomainMappingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CreateDomainMappingRequest) + CreateDomainMappingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDomainMappingRequest.newBuilder() to construct. + private CreateDomainMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDomainMappingRequest() { + parent_ = ""; + overrideStrategy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDomainMappingRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDomainMappingRequest( + 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: + { + com.google.appengine.v1.DomainMapping.Builder subBuilder = null; + if (domainMapping_ != null) { + subBuilder = domainMapping_.toBuilder(); + } + domainMapping_ = + input.readMessage( + com.google.appengine.v1.DomainMapping.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(domainMapping_); + domainMapping_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + int rawValue = input.readEnum(); + + overrideStrategy_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateDomainMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateDomainMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateDomainMappingRequest.class, + com.google.appengine.v1.CreateDomainMappingRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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 DOMAIN_MAPPING_FIELD_NUMBER = 2; + private com.google.appengine.v1.DomainMapping domainMapping_; + /** + * + * + *
+   * Domain mapping configuration.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return Whether the domainMapping field is set. + */ + @java.lang.Override + public boolean hasDomainMapping() { + return domainMapping_ != null; + } + /** + * + * + *
+   * Domain mapping configuration.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return The domainMapping. + */ + @java.lang.Override + public com.google.appengine.v1.DomainMapping getDomainMapping() { + return domainMapping_ == null + ? com.google.appengine.v1.DomainMapping.getDefaultInstance() + : domainMapping_; + } + /** + * + * + *
+   * Domain mapping configuration.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + @java.lang.Override + public com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingOrBuilder() { + return getDomainMapping(); + } + + public static final int OVERRIDE_STRATEGY_FIELD_NUMBER = 4; + private int overrideStrategy_; + /** + * + * + *
+   * Whether the domain creation should override any existing mappings for this
+   * domain. By default, overrides are rejected.
+   * 
+ * + * .google.appengine.v1.DomainOverrideStrategy override_strategy = 4; + * + * @return The enum numeric value on the wire for overrideStrategy. + */ + @java.lang.Override + public int getOverrideStrategyValue() { + return overrideStrategy_; + } + /** + * + * + *
+   * Whether the domain creation should override any existing mappings for this
+   * domain. By default, overrides are rejected.
+   * 
+ * + * .google.appengine.v1.DomainOverrideStrategy override_strategy = 4; + * + * @return The overrideStrategy. + */ + @java.lang.Override + public com.google.appengine.v1.DomainOverrideStrategy getOverrideStrategy() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.DomainOverrideStrategy result = + com.google.appengine.v1.DomainOverrideStrategy.valueOf(overrideStrategy_); + return result == null ? com.google.appengine.v1.DomainOverrideStrategy.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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (domainMapping_ != null) { + output.writeMessage(2, getDomainMapping()); + } + if (overrideStrategy_ + != com.google.appengine.v1.DomainOverrideStrategy.UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY + .getNumber()) { + output.writeEnum(4, overrideStrategy_); + } + 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 (domainMapping_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDomainMapping()); + } + if (overrideStrategy_ + != com.google.appengine.v1.DomainOverrideStrategy.UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, overrideStrategy_); + } + 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.appengine.v1.CreateDomainMappingRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.CreateDomainMappingRequest other = + (com.google.appengine.v1.CreateDomainMappingRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDomainMapping() != other.hasDomainMapping()) return false; + if (hasDomainMapping()) { + if (!getDomainMapping().equals(other.getDomainMapping())) return false; + } + if (overrideStrategy_ != other.overrideStrategy_) 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(); + if (hasDomainMapping()) { + hash = (37 * hash) + DOMAIN_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getDomainMapping().hashCode(); + } + hash = (37 * hash) + OVERRIDE_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + overrideStrategy_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CreateDomainMappingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateDomainMappingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateDomainMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateDomainMappingRequest 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.appengine.v1.CreateDomainMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateDomainMappingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateDomainMappingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateDomainMappingRequest 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.appengine.v1.CreateDomainMappingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateDomainMappingRequest 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.appengine.v1.CreateDomainMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateDomainMappingRequest 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.appengine.v1.CreateDomainMappingRequest 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 message for `DomainMappings.CreateDomainMapping`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CreateDomainMappingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CreateDomainMappingRequest) + com.google.appengine.v1.CreateDomainMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateDomainMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateDomainMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateDomainMappingRequest.class, + com.google.appengine.v1.CreateDomainMappingRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.CreateDomainMappingRequest.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_ = ""; + + if (domainMappingBuilder_ == null) { + domainMapping_ = null; + } else { + domainMapping_ = null; + domainMappingBuilder_ = null; + } + overrideStrategy_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateDomainMappingRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CreateDomainMappingRequest getDefaultInstanceForType() { + return com.google.appengine.v1.CreateDomainMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CreateDomainMappingRequest build() { + com.google.appengine.v1.CreateDomainMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CreateDomainMappingRequest buildPartial() { + com.google.appengine.v1.CreateDomainMappingRequest result = + new com.google.appengine.v1.CreateDomainMappingRequest(this); + result.parent_ = parent_; + if (domainMappingBuilder_ == null) { + result.domainMapping_ = domainMapping_; + } else { + result.domainMapping_ = domainMappingBuilder_.build(); + } + result.overrideStrategy_ = overrideStrategy_; + 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.appengine.v1.CreateDomainMappingRequest) { + return mergeFrom((com.google.appengine.v1.CreateDomainMappingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CreateDomainMappingRequest other) { + if (other == com.google.appengine.v1.CreateDomainMappingRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDomainMapping()) { + mergeDomainMapping(other.getDomainMapping()); + } + if (other.overrideStrategy_ != 0) { + setOverrideStrategyValue(other.getOverrideStrategyValue()); + } + 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.appengine.v1.CreateDomainMappingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.CreateDomainMappingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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 com.google.appengine.v1.DomainMapping domainMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.DomainMapping, + com.google.appengine.v1.DomainMapping.Builder, + com.google.appengine.v1.DomainMappingOrBuilder> + domainMappingBuilder_; + /** + * + * + *
+     * Domain mapping configuration.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return Whether the domainMapping field is set. + */ + public boolean hasDomainMapping() { + return domainMappingBuilder_ != null || domainMapping_ != null; + } + /** + * + * + *
+     * Domain mapping configuration.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return The domainMapping. + */ + public com.google.appengine.v1.DomainMapping getDomainMapping() { + if (domainMappingBuilder_ == null) { + return domainMapping_ == null + ? com.google.appengine.v1.DomainMapping.getDefaultInstance() + : domainMapping_; + } else { + return domainMappingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Domain mapping configuration.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public Builder setDomainMapping(com.google.appengine.v1.DomainMapping value) { + if (domainMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + domainMapping_ = value; + onChanged(); + } else { + domainMappingBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Domain mapping configuration.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public Builder setDomainMapping(com.google.appengine.v1.DomainMapping.Builder builderForValue) { + if (domainMappingBuilder_ == null) { + domainMapping_ = builderForValue.build(); + onChanged(); + } else { + domainMappingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Domain mapping configuration.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public Builder mergeDomainMapping(com.google.appengine.v1.DomainMapping value) { + if (domainMappingBuilder_ == null) { + if (domainMapping_ != null) { + domainMapping_ = + com.google.appengine.v1.DomainMapping.newBuilder(domainMapping_) + .mergeFrom(value) + .buildPartial(); + } else { + domainMapping_ = value; + } + onChanged(); + } else { + domainMappingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Domain mapping configuration.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public Builder clearDomainMapping() { + if (domainMappingBuilder_ == null) { + domainMapping_ = null; + onChanged(); + } else { + domainMapping_ = null; + domainMappingBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Domain mapping configuration.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public com.google.appengine.v1.DomainMapping.Builder getDomainMappingBuilder() { + + onChanged(); + return getDomainMappingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Domain mapping configuration.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingOrBuilder() { + if (domainMappingBuilder_ != null) { + return domainMappingBuilder_.getMessageOrBuilder(); + } else { + return domainMapping_ == null + ? com.google.appengine.v1.DomainMapping.getDefaultInstance() + : domainMapping_; + } + } + /** + * + * + *
+     * Domain mapping configuration.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.DomainMapping, + com.google.appengine.v1.DomainMapping.Builder, + com.google.appengine.v1.DomainMappingOrBuilder> + getDomainMappingFieldBuilder() { + if (domainMappingBuilder_ == null) { + domainMappingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.DomainMapping, + com.google.appengine.v1.DomainMapping.Builder, + com.google.appengine.v1.DomainMappingOrBuilder>( + getDomainMapping(), getParentForChildren(), isClean()); + domainMapping_ = null; + } + return domainMappingBuilder_; + } + + private int overrideStrategy_ = 0; + /** + * + * + *
+     * Whether the domain creation should override any existing mappings for this
+     * domain. By default, overrides are rejected.
+     * 
+ * + * .google.appengine.v1.DomainOverrideStrategy override_strategy = 4; + * + * @return The enum numeric value on the wire for overrideStrategy. + */ + @java.lang.Override + public int getOverrideStrategyValue() { + return overrideStrategy_; + } + /** + * + * + *
+     * Whether the domain creation should override any existing mappings for this
+     * domain. By default, overrides are rejected.
+     * 
+ * + * .google.appengine.v1.DomainOverrideStrategy override_strategy = 4; + * + * @param value The enum numeric value on the wire for overrideStrategy to set. + * @return This builder for chaining. + */ + public Builder setOverrideStrategyValue(int value) { + + overrideStrategy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the domain creation should override any existing mappings for this
+     * domain. By default, overrides are rejected.
+     * 
+ * + * .google.appengine.v1.DomainOverrideStrategy override_strategy = 4; + * + * @return The overrideStrategy. + */ + @java.lang.Override + public com.google.appengine.v1.DomainOverrideStrategy getOverrideStrategy() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.DomainOverrideStrategy result = + com.google.appengine.v1.DomainOverrideStrategy.valueOf(overrideStrategy_); + return result == null ? com.google.appengine.v1.DomainOverrideStrategy.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Whether the domain creation should override any existing mappings for this
+     * domain. By default, overrides are rejected.
+     * 
+ * + * .google.appengine.v1.DomainOverrideStrategy override_strategy = 4; + * + * @param value The overrideStrategy to set. + * @return This builder for chaining. + */ + public Builder setOverrideStrategy(com.google.appengine.v1.DomainOverrideStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + + overrideStrategy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the domain creation should override any existing mappings for this
+     * domain. By default, overrides are rejected.
+     * 
+ * + * .google.appengine.v1.DomainOverrideStrategy override_strategy = 4; + * + * @return This builder for chaining. + */ + public Builder clearOverrideStrategy() { + + overrideStrategy_ = 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.appengine.v1.CreateDomainMappingRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CreateDomainMappingRequest) + private static final com.google.appengine.v1.CreateDomainMappingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CreateDomainMappingRequest(); + } + + public static com.google.appengine.v1.CreateDomainMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDomainMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDomainMappingRequest(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.appengine.v1.CreateDomainMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateDomainMappingRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateDomainMappingRequestOrBuilder.java new file mode 100644 index 00000000..deb069d0 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateDomainMappingRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface CreateDomainMappingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CreateDomainMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Domain mapping configuration.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return Whether the domainMapping field is set. + */ + boolean hasDomainMapping(); + /** + * + * + *
+   * Domain mapping configuration.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return The domainMapping. + */ + com.google.appengine.v1.DomainMapping getDomainMapping(); + /** + * + * + *
+   * Domain mapping configuration.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingOrBuilder(); + + /** + * + * + *
+   * Whether the domain creation should override any existing mappings for this
+   * domain. By default, overrides are rejected.
+   * 
+ * + * .google.appengine.v1.DomainOverrideStrategy override_strategy = 4; + * + * @return The enum numeric value on the wire for overrideStrategy. + */ + int getOverrideStrategyValue(); + /** + * + * + *
+   * Whether the domain creation should override any existing mappings for this
+   * domain. By default, overrides are rejected.
+   * 
+ * + * .google.appengine.v1.DomainOverrideStrategy override_strategy = 4; + * + * @return The overrideStrategy. + */ + com.google.appengine.v1.DomainOverrideStrategy getOverrideStrategy(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateIngressRuleRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateIngressRuleRequest.java new file mode 100644 index 00000000..ed844ef7 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateIngressRuleRequest.java @@ -0,0 +1,1003 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Firewall.CreateIngressRule`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.CreateIngressRuleRequest} + */ +public final class CreateIngressRuleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CreateIngressRuleRequest) + CreateIngressRuleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateIngressRuleRequest.newBuilder() to construct. + private CreateIngressRuleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateIngressRuleRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateIngressRuleRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateIngressRuleRequest( + 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: + { + com.google.appengine.v1.firewall.FirewallRule.Builder subBuilder = null; + if (rule_ != null) { + subBuilder = rule_.toBuilder(); + } + rule_ = + input.readMessage( + com.google.appengine.v1.firewall.FirewallRule.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rule_); + rule_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateIngressRuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateIngressRuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateIngressRuleRequest.class, + com.google.appengine.v1.CreateIngressRuleRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent Firewall collection in which to create a new rule.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent Firewall collection in which to create a new rule.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string parent = 1; + * + * @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 RULE_FIELD_NUMBER = 2; + private com.google.appengine.v1.firewall.FirewallRule rule_; + /** + * + * + *
+   * A FirewallRule containing the new resource.
+   * The user may optionally provide a position at which the new rule will be
+   * placed. The positions define a sequential list starting at 1. If a rule
+   * already exists at the given position, rules greater than the provided
+   * position will be moved forward by one.
+   * If no position is provided, the server will place the rule as the second to
+   * last rule in the sequence before the required default allow-all or deny-all
+   * rule.
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return Whether the rule field is set. + */ + @java.lang.Override + public boolean hasRule() { + return rule_ != null; + } + /** + * + * + *
+   * A FirewallRule containing the new resource.
+   * The user may optionally provide a position at which the new rule will be
+   * placed. The positions define a sequential list starting at 1. If a rule
+   * already exists at the given position, rules greater than the provided
+   * position will be moved forward by one.
+   * If no position is provided, the server will place the rule as the second to
+   * last rule in the sequence before the required default allow-all or deny-all
+   * rule.
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return The rule. + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule getRule() { + return rule_ == null + ? com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance() + : rule_; + } + /** + * + * + *
+   * A FirewallRule containing the new resource.
+   * The user may optionally provide a position at which the new rule will be
+   * placed. The positions define a sequential list starting at 1. If a rule
+   * already exists at the given position, rules greater than the provided
+   * position will be moved forward by one.
+   * If no position is provided, the server will place the rule as the second to
+   * last rule in the sequence before the required default allow-all or deny-all
+   * rule.
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getRuleOrBuilder() { + return getRule(); + } + + 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 (rule_ != null) { + output.writeMessage(2, getRule()); + } + 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 (rule_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRule()); + } + 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.appengine.v1.CreateIngressRuleRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.CreateIngressRuleRequest other = + (com.google.appengine.v1.CreateIngressRuleRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasRule() != other.hasRule()) return false; + if (hasRule()) { + if (!getRule().equals(other.getRule())) 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(); + if (hasRule()) { + hash = (37 * hash) + RULE_FIELD_NUMBER; + hash = (53 * hash) + getRule().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CreateIngressRuleRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateIngressRuleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateIngressRuleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateIngressRuleRequest 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.appengine.v1.CreateIngressRuleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateIngressRuleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateIngressRuleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateIngressRuleRequest 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.appengine.v1.CreateIngressRuleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateIngressRuleRequest 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.appengine.v1.CreateIngressRuleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateIngressRuleRequest 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.appengine.v1.CreateIngressRuleRequest 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 message for `Firewall.CreateIngressRule`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CreateIngressRuleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CreateIngressRuleRequest) + com.google.appengine.v1.CreateIngressRuleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateIngressRuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateIngressRuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateIngressRuleRequest.class, + com.google.appengine.v1.CreateIngressRuleRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.CreateIngressRuleRequest.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_ = ""; + + if (ruleBuilder_ == null) { + rule_ = null; + } else { + rule_ = null; + ruleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateIngressRuleRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CreateIngressRuleRequest getDefaultInstanceForType() { + return com.google.appengine.v1.CreateIngressRuleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CreateIngressRuleRequest build() { + com.google.appengine.v1.CreateIngressRuleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CreateIngressRuleRequest buildPartial() { + com.google.appengine.v1.CreateIngressRuleRequest result = + new com.google.appengine.v1.CreateIngressRuleRequest(this); + result.parent_ = parent_; + if (ruleBuilder_ == null) { + result.rule_ = rule_; + } else { + result.rule_ = ruleBuilder_.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.appengine.v1.CreateIngressRuleRequest) { + return mergeFrom((com.google.appengine.v1.CreateIngressRuleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CreateIngressRuleRequest other) { + if (other == com.google.appengine.v1.CreateIngressRuleRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasRule()) { + mergeRule(other.getRule()); + } + 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.appengine.v1.CreateIngressRuleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.CreateIngressRuleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent Firewall collection in which to create a new rule.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Firewall collection in which to create a new rule.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Firewall collection in which to create a new rule.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent Firewall collection in which to create a new rule.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent Firewall collection in which to create a new rule.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @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 com.google.appengine.v1.firewall.FirewallRule rule_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + ruleBuilder_; + /** + * + * + *
+     * A FirewallRule containing the new resource.
+     * The user may optionally provide a position at which the new rule will be
+     * placed. The positions define a sequential list starting at 1. If a rule
+     * already exists at the given position, rules greater than the provided
+     * position will be moved forward by one.
+     * If no position is provided, the server will place the rule as the second to
+     * last rule in the sequence before the required default allow-all or deny-all
+     * rule.
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return Whether the rule field is set. + */ + public boolean hasRule() { + return ruleBuilder_ != null || rule_ != null; + } + /** + * + * + *
+     * A FirewallRule containing the new resource.
+     * The user may optionally provide a position at which the new rule will be
+     * placed. The positions define a sequential list starting at 1. If a rule
+     * already exists at the given position, rules greater than the provided
+     * position will be moved forward by one.
+     * If no position is provided, the server will place the rule as the second to
+     * last rule in the sequence before the required default allow-all or deny-all
+     * rule.
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return The rule. + */ + public com.google.appengine.v1.firewall.FirewallRule getRule() { + if (ruleBuilder_ == null) { + return rule_ == null + ? com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance() + : rule_; + } else { + return ruleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A FirewallRule containing the new resource.
+     * The user may optionally provide a position at which the new rule will be
+     * placed. The positions define a sequential list starting at 1. If a rule
+     * already exists at the given position, rules greater than the provided
+     * position will be moved forward by one.
+     * If no position is provided, the server will place the rule as the second to
+     * last rule in the sequence before the required default allow-all or deny-all
+     * rule.
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public Builder setRule(com.google.appengine.v1.firewall.FirewallRule value) { + if (ruleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rule_ = value; + onChanged(); + } else { + ruleBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A FirewallRule containing the new resource.
+     * The user may optionally provide a position at which the new rule will be
+     * placed. The positions define a sequential list starting at 1. If a rule
+     * already exists at the given position, rules greater than the provided
+     * position will be moved forward by one.
+     * If no position is provided, the server will place the rule as the second to
+     * last rule in the sequence before the required default allow-all or deny-all
+     * rule.
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public Builder setRule(com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ruleBuilder_ == null) { + rule_ = builderForValue.build(); + onChanged(); + } else { + ruleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A FirewallRule containing the new resource.
+     * The user may optionally provide a position at which the new rule will be
+     * placed. The positions define a sequential list starting at 1. If a rule
+     * already exists at the given position, rules greater than the provided
+     * position will be moved forward by one.
+     * If no position is provided, the server will place the rule as the second to
+     * last rule in the sequence before the required default allow-all or deny-all
+     * rule.
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public Builder mergeRule(com.google.appengine.v1.firewall.FirewallRule value) { + if (ruleBuilder_ == null) { + if (rule_ != null) { + rule_ = + com.google.appengine.v1.firewall.FirewallRule.newBuilder(rule_) + .mergeFrom(value) + .buildPartial(); + } else { + rule_ = value; + } + onChanged(); + } else { + ruleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A FirewallRule containing the new resource.
+     * The user may optionally provide a position at which the new rule will be
+     * placed. The positions define a sequential list starting at 1. If a rule
+     * already exists at the given position, rules greater than the provided
+     * position will be moved forward by one.
+     * If no position is provided, the server will place the rule as the second to
+     * last rule in the sequence before the required default allow-all or deny-all
+     * rule.
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public Builder clearRule() { + if (ruleBuilder_ == null) { + rule_ = null; + onChanged(); + } else { + rule_ = null; + ruleBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A FirewallRule containing the new resource.
+     * The user may optionally provide a position at which the new rule will be
+     * placed. The positions define a sequential list starting at 1. If a rule
+     * already exists at the given position, rules greater than the provided
+     * position will be moved forward by one.
+     * If no position is provided, the server will place the rule as the second to
+     * last rule in the sequence before the required default allow-all or deny-all
+     * rule.
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder getRuleBuilder() { + + onChanged(); + return getRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A FirewallRule containing the new resource.
+     * The user may optionally provide a position at which the new rule will be
+     * placed. The positions define a sequential list starting at 1. If a rule
+     * already exists at the given position, rules greater than the provided
+     * position will be moved forward by one.
+     * If no position is provided, the server will place the rule as the second to
+     * last rule in the sequence before the required default allow-all or deny-all
+     * rule.
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getRuleOrBuilder() { + if (ruleBuilder_ != null) { + return ruleBuilder_.getMessageOrBuilder(); + } else { + return rule_ == null + ? com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance() + : rule_; + } + } + /** + * + * + *
+     * A FirewallRule containing the new resource.
+     * The user may optionally provide a position at which the new rule will be
+     * placed. The positions define a sequential list starting at 1. If a rule
+     * already exists at the given position, rules greater than the provided
+     * position will be moved forward by one.
+     * If no position is provided, the server will place the rule as the second to
+     * last rule in the sequence before the required default allow-all or deny-all
+     * rule.
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + getRuleFieldBuilder() { + if (ruleBuilder_ == null) { + ruleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder>( + getRule(), getParentForChildren(), isClean()); + rule_ = null; + } + return ruleBuilder_; + } + + @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.appengine.v1.CreateIngressRuleRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CreateIngressRuleRequest) + private static final com.google.appengine.v1.CreateIngressRuleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CreateIngressRuleRequest(); + } + + public static com.google.appengine.v1.CreateIngressRuleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateIngressRuleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateIngressRuleRequest(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.appengine.v1.CreateIngressRuleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateIngressRuleRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateIngressRuleRequestOrBuilder.java new file mode 100644 index 00000000..90cedf15 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateIngressRuleRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface CreateIngressRuleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CreateIngressRuleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent Firewall collection in which to create a new rule.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent Firewall collection in which to create a new rule.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * A FirewallRule containing the new resource.
+   * The user may optionally provide a position at which the new rule will be
+   * placed. The positions define a sequential list starting at 1. If a rule
+   * already exists at the given position, rules greater than the provided
+   * position will be moved forward by one.
+   * If no position is provided, the server will place the rule as the second to
+   * last rule in the sequence before the required default allow-all or deny-all
+   * rule.
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return Whether the rule field is set. + */ + boolean hasRule(); + /** + * + * + *
+   * A FirewallRule containing the new resource.
+   * The user may optionally provide a position at which the new rule will be
+   * placed. The positions define a sequential list starting at 1. If a rule
+   * already exists at the given position, rules greater than the provided
+   * position will be moved forward by one.
+   * If no position is provided, the server will place the rule as the second to
+   * last rule in the sequence before the required default allow-all or deny-all
+   * rule.
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return The rule. + */ + com.google.appengine.v1.firewall.FirewallRule getRule(); + /** + * + * + *
+   * A FirewallRule containing the new resource.
+   * The user may optionally provide a position at which the new rule will be
+   * placed. The positions define a sequential list starting at 1. If a rule
+   * already exists at the given position, rules greater than the provided
+   * position will be moved forward by one.
+   * If no position is provided, the server will place the rule as the second to
+   * last rule in the sequence before the required default allow-all or deny-all
+   * rule.
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + com.google.appengine.v1.firewall.FirewallRuleOrBuilder getRuleOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMetadataV1.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMetadataV1.java new file mode 100644 index 00000000..f94bbdfe --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMetadataV1.java @@ -0,0 +1,644 @@ +/* + * 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/appengine/v1/operation.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Metadata for the given [google.longrunning.Operation][google.longrunning.Operation] during a
+ * [google.appengine.v1.CreateVersionRequest][google.appengine.v1.CreateVersionRequest].
+ * 
+ * + * Protobuf type {@code google.appengine.v1.CreateVersionMetadataV1} + */ +public final class CreateVersionMetadataV1 extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CreateVersionMetadataV1) + CreateVersionMetadataV1OrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateVersionMetadataV1.newBuilder() to construct. + private CreateVersionMetadataV1(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateVersionMetadataV1() { + cloudBuildId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateVersionMetadataV1(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateVersionMetadataV1( + 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(); + + cloudBuildId_ = 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.appengine.v1.OperationProto + .internal_static_google_appengine_v1_CreateVersionMetadataV1_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.OperationProto + .internal_static_google_appengine_v1_CreateVersionMetadataV1_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateVersionMetadataV1.class, + com.google.appengine.v1.CreateVersionMetadataV1.Builder.class); + } + + public static final int CLOUD_BUILD_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object cloudBuildId_; + /** + * + * + *
+   * The Cloud Build ID if one was created as part of the version create.
+   * @OutputOnly
+   * 
+ * + * string cloud_build_id = 1; + * + * @return The cloudBuildId. + */ + @java.lang.Override + public java.lang.String getCloudBuildId() { + java.lang.Object ref = cloudBuildId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudBuildId_ = s; + return s; + } + } + /** + * + * + *
+   * The Cloud Build ID if one was created as part of the version create.
+   * @OutputOnly
+   * 
+ * + * string cloud_build_id = 1; + * + * @return The bytes for cloudBuildId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudBuildIdBytes() { + java.lang.Object ref = cloudBuildId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudBuildId_ = 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 (!getCloudBuildIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cloudBuildId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCloudBuildIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cloudBuildId_); + } + 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.appengine.v1.CreateVersionMetadataV1)) { + return super.equals(obj); + } + com.google.appengine.v1.CreateVersionMetadataV1 other = + (com.google.appengine.v1.CreateVersionMetadataV1) obj; + + if (!getCloudBuildId().equals(other.getCloudBuildId())) 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) + CLOUD_BUILD_ID_FIELD_NUMBER; + hash = (53 * hash) + getCloudBuildId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 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.appengine.v1.CreateVersionMetadataV1 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 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.appengine.v1.CreateVersionMetadataV1 parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 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.appengine.v1.CreateVersionMetadataV1 parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 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.appengine.v1.CreateVersionMetadataV1 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 for the given [google.longrunning.Operation][google.longrunning.Operation] during a
+   * [google.appengine.v1.CreateVersionRequest][google.appengine.v1.CreateVersionRequest].
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CreateVersionMetadataV1} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CreateVersionMetadataV1) + com.google.appengine.v1.CreateVersionMetadataV1OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.OperationProto + .internal_static_google_appengine_v1_CreateVersionMetadataV1_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.OperationProto + .internal_static_google_appengine_v1_CreateVersionMetadataV1_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateVersionMetadataV1.class, + com.google.appengine.v1.CreateVersionMetadataV1.Builder.class); + } + + // Construct using com.google.appengine.v1.CreateVersionMetadataV1.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(); + cloudBuildId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.OperationProto + .internal_static_google_appengine_v1_CreateVersionMetadataV1_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CreateVersionMetadataV1 getDefaultInstanceForType() { + return com.google.appengine.v1.CreateVersionMetadataV1.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CreateVersionMetadataV1 build() { + com.google.appengine.v1.CreateVersionMetadataV1 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CreateVersionMetadataV1 buildPartial() { + com.google.appengine.v1.CreateVersionMetadataV1 result = + new com.google.appengine.v1.CreateVersionMetadataV1(this); + result.cloudBuildId_ = cloudBuildId_; + 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.appengine.v1.CreateVersionMetadataV1) { + return mergeFrom((com.google.appengine.v1.CreateVersionMetadataV1) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CreateVersionMetadataV1 other) { + if (other == com.google.appengine.v1.CreateVersionMetadataV1.getDefaultInstance()) + return this; + if (!other.getCloudBuildId().isEmpty()) { + cloudBuildId_ = other.cloudBuildId_; + 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.appengine.v1.CreateVersionMetadataV1 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.CreateVersionMetadataV1) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object cloudBuildId_ = ""; + /** + * + * + *
+     * The Cloud Build ID if one was created as part of the version create.
+     * @OutputOnly
+     * 
+ * + * string cloud_build_id = 1; + * + * @return The cloudBuildId. + */ + public java.lang.String getCloudBuildId() { + java.lang.Object ref = cloudBuildId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudBuildId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Cloud Build ID if one was created as part of the version create.
+     * @OutputOnly
+     * 
+ * + * string cloud_build_id = 1; + * + * @return The bytes for cloudBuildId. + */ + public com.google.protobuf.ByteString getCloudBuildIdBytes() { + java.lang.Object ref = cloudBuildId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudBuildId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Cloud Build ID if one was created as part of the version create.
+     * @OutputOnly
+     * 
+ * + * string cloud_build_id = 1; + * + * @param value The cloudBuildId to set. + * @return This builder for chaining. + */ + public Builder setCloudBuildId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudBuildId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud Build ID if one was created as part of the version create.
+     * @OutputOnly
+     * 
+ * + * string cloud_build_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearCloudBuildId() { + + cloudBuildId_ = getDefaultInstance().getCloudBuildId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud Build ID if one was created as part of the version create.
+     * @OutputOnly
+     * 
+ * + * string cloud_build_id = 1; + * + * @param value The bytes for cloudBuildId to set. + * @return This builder for chaining. + */ + public Builder setCloudBuildIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudBuildId_ = 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.appengine.v1.CreateVersionMetadataV1) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CreateVersionMetadataV1) + private static final com.google.appengine.v1.CreateVersionMetadataV1 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CreateVersionMetadataV1(); + } + + public static com.google.appengine.v1.CreateVersionMetadataV1 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateVersionMetadataV1 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateVersionMetadataV1(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.appengine.v1.CreateVersionMetadataV1 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMetadataV1OrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMetadataV1OrBuilder.java new file mode 100644 index 00000000..ade1e6e9 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMetadataV1OrBuilder.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/appengine/v1/operation.proto + +package com.google.appengine.v1; + +public interface CreateVersionMetadataV1OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CreateVersionMetadataV1) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Cloud Build ID if one was created as part of the version create.
+   * @OutputOnly
+   * 
+ * + * string cloud_build_id = 1; + * + * @return The cloudBuildId. + */ + java.lang.String getCloudBuildId(); + /** + * + * + *
+   * The Cloud Build ID if one was created as part of the version create.
+   * @OutputOnly
+   * 
+ * + * string cloud_build_id = 1; + * + * @return The bytes for cloudBuildId. + */ + com.google.protobuf.ByteString getCloudBuildIdBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMethod.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMethod.java new file mode 100644 index 00000000..4d39eae5 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMethod.java @@ -0,0 +1,732 @@ +/* + * 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/appengine/v1/audit_data.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Detailed information about CreateVersion call.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.CreateVersionMethod} + */ +public final class CreateVersionMethod extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CreateVersionMethod) + CreateVersionMethodOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateVersionMethod.newBuilder() to construct. + private CreateVersionMethod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateVersionMethod() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateVersionMethod(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateVersionMethod( + 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.appengine.v1.CreateVersionRequest.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = + input.readMessage( + com.google.appengine.v1.CreateVersionRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = 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.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_CreateVersionMethod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_CreateVersionMethod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateVersionMethod.class, + com.google.appengine.v1.CreateVersionMethod.Builder.class); + } + + public static final int REQUEST_FIELD_NUMBER = 1; + private com.google.appengine.v1.CreateVersionRequest request_; + /** + * + * + *
+   * Create version request.
+   * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + * + * @return Whether the request field is set. + */ + @java.lang.Override + public boolean hasRequest() { + return request_ != null; + } + /** + * + * + *
+   * Create version request.
+   * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + * + * @return The request. + */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionRequest getRequest() { + return request_ == null + ? com.google.appengine.v1.CreateVersionRequest.getDefaultInstance() + : request_; + } + /** + * + * + *
+   * Create version request.
+   * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionRequestOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + 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 (request_ != null) { + output.writeMessage(1, getRequest()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRequest()); + } + 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.appengine.v1.CreateVersionMethod)) { + return super.equals(obj); + } + com.google.appengine.v1.CreateVersionMethod other = + (com.google.appengine.v1.CreateVersionMethod) obj; + + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest().equals(other.getRequest())) 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 (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CreateVersionMethod parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateVersionMethod parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateVersionMethod parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateVersionMethod 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.appengine.v1.CreateVersionMethod parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateVersionMethod parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateVersionMethod parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateVersionMethod 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.appengine.v1.CreateVersionMethod parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateVersionMethod 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.appengine.v1.CreateVersionMethod parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateVersionMethod 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.appengine.v1.CreateVersionMethod 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; + } + /** + * + * + *
+   * Detailed information about CreateVersion call.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CreateVersionMethod} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CreateVersionMethod) + com.google.appengine.v1.CreateVersionMethodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_CreateVersionMethod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_CreateVersionMethod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateVersionMethod.class, + com.google.appengine.v1.CreateVersionMethod.Builder.class); + } + + // Construct using com.google.appengine.v1.CreateVersionMethod.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 (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_CreateVersionMethod_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CreateVersionMethod getDefaultInstanceForType() { + return com.google.appengine.v1.CreateVersionMethod.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CreateVersionMethod build() { + com.google.appengine.v1.CreateVersionMethod result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CreateVersionMethod buildPartial() { + com.google.appengine.v1.CreateVersionMethod result = + new com.google.appengine.v1.CreateVersionMethod(this); + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.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.appengine.v1.CreateVersionMethod) { + return mergeFrom((com.google.appengine.v1.CreateVersionMethod) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CreateVersionMethod other) { + if (other == com.google.appengine.v1.CreateVersionMethod.getDefaultInstance()) return this; + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + 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.appengine.v1.CreateVersionMethod parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.CreateVersionMethod) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.appengine.v1.CreateVersionRequest request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CreateVersionRequest, + com.google.appengine.v1.CreateVersionRequest.Builder, + com.google.appengine.v1.CreateVersionRequestOrBuilder> + requestBuilder_; + /** + * + * + *
+     * Create version request.
+     * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + * + * @return Whether the request field is set. + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + * + * + *
+     * Create version request.
+     * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + * + * @return The request. + */ + public com.google.appengine.v1.CreateVersionRequest getRequest() { + if (requestBuilder_ == null) { + return request_ == null + ? com.google.appengine.v1.CreateVersionRequest.getDefaultInstance() + : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Create version request.
+     * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + */ + public Builder setRequest(com.google.appengine.v1.CreateVersionRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Create version request.
+     * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + */ + public Builder setRequest( + com.google.appengine.v1.CreateVersionRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Create version request.
+     * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + */ + public Builder mergeRequest(com.google.appengine.v1.CreateVersionRequest value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.appengine.v1.CreateVersionRequest.newBuilder(request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Create version request.
+     * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Create version request.
+     * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + */ + public com.google.appengine.v1.CreateVersionRequest.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Create version request.
+     * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + */ + public com.google.appengine.v1.CreateVersionRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null + ? com.google.appengine.v1.CreateVersionRequest.getDefaultInstance() + : request_; + } + } + /** + * + * + *
+     * Create version request.
+     * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CreateVersionRequest, + com.google.appengine.v1.CreateVersionRequest.Builder, + com.google.appengine.v1.CreateVersionRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CreateVersionRequest, + com.google.appengine.v1.CreateVersionRequest.Builder, + com.google.appengine.v1.CreateVersionRequestOrBuilder>( + getRequest(), getParentForChildren(), isClean()); + request_ = null; + } + return requestBuilder_; + } + + @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.appengine.v1.CreateVersionMethod) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CreateVersionMethod) + private static final com.google.appengine.v1.CreateVersionMethod DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CreateVersionMethod(); + } + + public static com.google.appengine.v1.CreateVersionMethod getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateVersionMethod parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateVersionMethod(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.appengine.v1.CreateVersionMethod getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMethodOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMethodOrBuilder.java new file mode 100644 index 00000000..627071b2 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionMethodOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/appengine/v1/audit_data.proto + +package com.google.appengine.v1; + +public interface CreateVersionMethodOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CreateVersionMethod) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Create version request.
+   * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + * + * @return Whether the request field is set. + */ + boolean hasRequest(); + /** + * + * + *
+   * Create version request.
+   * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + * + * @return The request. + */ + com.google.appengine.v1.CreateVersionRequest getRequest(); + /** + * + * + *
+   * Create version request.
+   * 
+ * + * .google.appengine.v1.CreateVersionRequest request = 1; + */ + com.google.appengine.v1.CreateVersionRequestOrBuilder getRequestOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionRequest.java new file mode 100644 index 00000000..860cc29a --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionRequest.java @@ -0,0 +1,909 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Versions.CreateVersion`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.CreateVersionRequest} + */ +public final class CreateVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.CreateVersionRequest) + CreateVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateVersionRequest.newBuilder() to construct. + private CreateVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateVersionRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateVersionRequest( + 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: + { + com.google.appengine.v1.Version.Builder subBuilder = null; + if (version_ != null) { + subBuilder = version_.toBuilder(); + } + version_ = + input.readMessage(com.google.appengine.v1.Version.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(version_); + version_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateVersionRequest.class, + com.google.appengine.v1.CreateVersionRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent resource to create this version under. Example:
+   * `apps/myapp/services/default`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent resource to create this version under. Example:
+   * `apps/myapp/services/default`.
+   * 
+ * + * string parent = 1; + * + * @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 VERSION_FIELD_NUMBER = 2; + private com.google.appengine.v1.Version version_; + /** + * + * + *
+   * Application deployment configuration.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + * + * + *
+   * Application deployment configuration.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return The version. + */ + @java.lang.Override + public com.google.appengine.v1.Version getVersion() { + return version_ == null ? com.google.appengine.v1.Version.getDefaultInstance() : version_; + } + /** + * + * + *
+   * Application deployment configuration.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + */ + @java.lang.Override + public com.google.appengine.v1.VersionOrBuilder getVersionOrBuilder() { + return getVersion(); + } + + 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 (version_ != null) { + output.writeMessage(2, getVersion()); + } + 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 (version_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVersion()); + } + 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.appengine.v1.CreateVersionRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.CreateVersionRequest other = + (com.google.appengine.v1.CreateVersionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion().equals(other.getVersion())) 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(); + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.CreateVersionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateVersionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateVersionRequest 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.appengine.v1.CreateVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.CreateVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.CreateVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateVersionRequest 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.appengine.v1.CreateVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateVersionRequest 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.appengine.v1.CreateVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.CreateVersionRequest 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.appengine.v1.CreateVersionRequest 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 message for `Versions.CreateVersion`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.CreateVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.CreateVersionRequest) + com.google.appengine.v1.CreateVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.CreateVersionRequest.class, + com.google.appengine.v1.CreateVersionRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.CreateVersionRequest.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_ = ""; + + if (versionBuilder_ == null) { + version_ = null; + } else { + version_ = null; + versionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_CreateVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.CreateVersionRequest getDefaultInstanceForType() { + return com.google.appengine.v1.CreateVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.CreateVersionRequest build() { + com.google.appengine.v1.CreateVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.CreateVersionRequest buildPartial() { + com.google.appengine.v1.CreateVersionRequest result = + new com.google.appengine.v1.CreateVersionRequest(this); + result.parent_ = parent_; + if (versionBuilder_ == null) { + result.version_ = version_; + } else { + result.version_ = versionBuilder_.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.appengine.v1.CreateVersionRequest) { + return mergeFrom((com.google.appengine.v1.CreateVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.CreateVersionRequest other) { + if (other == com.google.appengine.v1.CreateVersionRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + 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.appengine.v1.CreateVersionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.CreateVersionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent resource to create this version under. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent resource to create this version under. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent resource to create this version under. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent resource to create this version under. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent resource to create this version under. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @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 com.google.appengine.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Version, + com.google.appengine.v1.Version.Builder, + com.google.appengine.v1.VersionOrBuilder> + versionBuilder_; + /** + * + * + *
+     * Application deployment configuration.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return versionBuilder_ != null || version_ != null; + } + /** + * + * + *
+     * Application deployment configuration.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return The version. + */ + public com.google.appengine.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? com.google.appengine.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Application deployment configuration.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public Builder setVersion(com.google.appengine.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + onChanged(); + } else { + versionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Application deployment configuration.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public Builder setVersion(com.google.appengine.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + onChanged(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Application deployment configuration.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public Builder mergeVersion(com.google.appengine.v1.Version value) { + if (versionBuilder_ == null) { + if (version_ != null) { + version_ = + com.google.appengine.v1.Version.newBuilder(version_).mergeFrom(value).buildPartial(); + } else { + version_ = value; + } + onChanged(); + } else { + versionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Application deployment configuration.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public Builder clearVersion() { + if (versionBuilder_ == null) { + version_ = null; + onChanged(); + } else { + version_ = null; + versionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Application deployment configuration.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public com.google.appengine.v1.Version.Builder getVersionBuilder() { + + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Application deployment configuration.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public com.google.appengine.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? com.google.appengine.v1.Version.getDefaultInstance() : version_; + } + } + /** + * + * + *
+     * Application deployment configuration.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Version, + com.google.appengine.v1.Version.Builder, + com.google.appengine.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Version, + com.google.appengine.v1.Version.Builder, + com.google.appengine.v1.VersionOrBuilder>( + getVersion(), getParentForChildren(), isClean()); + version_ = null; + } + return versionBuilder_; + } + + @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.appengine.v1.CreateVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.CreateVersionRequest) + private static final com.google.appengine.v1.CreateVersionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.CreateVersionRequest(); + } + + public static com.google.appengine.v1.CreateVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateVersionRequest(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.appengine.v1.CreateVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionRequestOrBuilder.java new file mode 100644 index 00000000..66cd2286 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/CreateVersionRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface CreateVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.CreateVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent resource to create this version under. Example:
+   * `apps/myapp/services/default`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent resource to create this version under. Example:
+   * `apps/myapp/services/default`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Application deployment configuration.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + * + * + *
+   * Application deployment configuration.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return The version. + */ + com.google.appengine.v1.Version getVersion(); + /** + * + * + *
+   * Application deployment configuration.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + */ + com.google.appengine.v1.VersionOrBuilder getVersionOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DebugInstanceRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DebugInstanceRequest.java new file mode 100644 index 00000000..05279a4a --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DebugInstanceRequest.java @@ -0,0 +1,848 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Instances.DebugInstance`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.DebugInstanceRequest} + */ +public final class DebugInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.DebugInstanceRequest) + DebugInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DebugInstanceRequest.newBuilder() to construct. + private DebugInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DebugInstanceRequest() { + name_ = ""; + sshKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DebugInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DebugInstanceRequest( + 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; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + sshKey_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DebugInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DebugInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DebugInstanceRequest.class, + com.google.appengine.v1.DebugInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SSH_KEY_FIELD_NUMBER = 2; + private volatile java.lang.Object sshKey_; + /** + * + * + *
+   * Public SSH key to add to the instance. Examples:
+   * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
+   * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
+   * For more information, see
+   * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
+   * 
+ * + * string ssh_key = 2; + * + * @return The sshKey. + */ + @java.lang.Override + public java.lang.String getSshKey() { + java.lang.Object ref = sshKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sshKey_ = s; + return s; + } + } + /** + * + * + *
+   * Public SSH key to add to the instance. Examples:
+   * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
+   * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
+   * For more information, see
+   * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
+   * 
+ * + * string ssh_key = 2; + * + * @return The bytes for sshKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSshKeyBytes() { + java.lang.Object ref = sshKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sshKey_ = 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_); + } + if (!getSshKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sshKey_); + } + 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 (!getSshKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sshKey_); + } + 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.appengine.v1.DebugInstanceRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.DebugInstanceRequest other = + (com.google.appengine.v1.DebugInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSshKey().equals(other.getSshKey())) 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) + SSH_KEY_FIELD_NUMBER; + hash = (53 * hash) + getSshKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.DebugInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DebugInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DebugInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DebugInstanceRequest 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.appengine.v1.DebugInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DebugInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DebugInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DebugInstanceRequest 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.appengine.v1.DebugInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DebugInstanceRequest 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.appengine.v1.DebugInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DebugInstanceRequest 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.appengine.v1.DebugInstanceRequest 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 message for `Instances.DebugInstance`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.DebugInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.DebugInstanceRequest) + com.google.appengine.v1.DebugInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DebugInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DebugInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DebugInstanceRequest.class, + com.google.appengine.v1.DebugInstanceRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.DebugInstanceRequest.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_ = ""; + + sshKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DebugInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.DebugInstanceRequest getDefaultInstanceForType() { + return com.google.appengine.v1.DebugInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.DebugInstanceRequest build() { + com.google.appengine.v1.DebugInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.DebugInstanceRequest buildPartial() { + com.google.appengine.v1.DebugInstanceRequest result = + new com.google.appengine.v1.DebugInstanceRequest(this); + result.name_ = name_; + result.sshKey_ = sshKey_; + 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.appengine.v1.DebugInstanceRequest) { + return mergeFrom((com.google.appengine.v1.DebugInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.DebugInstanceRequest other) { + if (other == com.google.appengine.v1.DebugInstanceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getSshKey().isEmpty()) { + sshKey_ = other.sshKey_; + 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.appengine.v1.DebugInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.DebugInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object sshKey_ = ""; + /** + * + * + *
+     * Public SSH key to add to the instance. Examples:
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
+     * For more information, see
+     * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
+     * 
+ * + * string ssh_key = 2; + * + * @return The sshKey. + */ + public java.lang.String getSshKey() { + java.lang.Object ref = sshKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sshKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Public SSH key to add to the instance. Examples:
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
+     * For more information, see
+     * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
+     * 
+ * + * string ssh_key = 2; + * + * @return The bytes for sshKey. + */ + public com.google.protobuf.ByteString getSshKeyBytes() { + java.lang.Object ref = sshKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sshKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Public SSH key to add to the instance. Examples:
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
+     * For more information, see
+     * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
+     * 
+ * + * string ssh_key = 2; + * + * @param value The sshKey to set. + * @return This builder for chaining. + */ + public Builder setSshKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sshKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Public SSH key to add to the instance. Examples:
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
+     * For more information, see
+     * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
+     * 
+ * + * string ssh_key = 2; + * + * @return This builder for chaining. + */ + public Builder clearSshKey() { + + sshKey_ = getDefaultInstance().getSshKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Public SSH key to add to the instance. Examples:
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
+     * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
+     * For more information, see
+     * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
+     * 
+ * + * string ssh_key = 2; + * + * @param value The bytes for sshKey to set. + * @return This builder for chaining. + */ + public Builder setSshKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sshKey_ = 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.appengine.v1.DebugInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.DebugInstanceRequest) + private static final com.google.appengine.v1.DebugInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.DebugInstanceRequest(); + } + + public static com.google.appengine.v1.DebugInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebugInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DebugInstanceRequest(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.appengine.v1.DebugInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DebugInstanceRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DebugInstanceRequestOrBuilder.java new file mode 100644 index 00000000..5f182cd5 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DebugInstanceRequestOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface DebugInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.DebugInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Public SSH key to add to the instance. Examples:
+   * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
+   * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
+   * For more information, see
+   * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
+   * 
+ * + * string ssh_key = 2; + * + * @return The sshKey. + */ + java.lang.String getSshKey(); + /** + * + * + *
+   * Public SSH key to add to the instance. Examples:
+   * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
+   * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
+   * For more information, see
+   * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
+   * 
+ * + * string ssh_key = 2; + * + * @return The bytes for sshKey. + */ + com.google.protobuf.ByteString getSshKeyBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteAuthorizedCertificateRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteAuthorizedCertificateRequest.java new file mode 100644 index 00000000..6e9effcc --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteAuthorizedCertificateRequest.java @@ -0,0 +1,645 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `AuthorizedCertificates.DeleteAuthorizedCertificate`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteAuthorizedCertificateRequest} + */ +public final class DeleteAuthorizedCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.DeleteAuthorizedCertificateRequest) + DeleteAuthorizedCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAuthorizedCertificateRequest.newBuilder() to construct. + private DeleteAuthorizedCertificateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAuthorizedCertificateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAuthorizedCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAuthorizedCertificateRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteAuthorizedCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteAuthorizedCertificateRequest.class, + com.google.appengine.v1.DeleteAuthorizedCertificateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource to delete. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource to delete. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.DeleteAuthorizedCertificateRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.DeleteAuthorizedCertificateRequest other = + (com.google.appengine.v1.DeleteAuthorizedCertificateRequest) 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.appengine.v1.DeleteAuthorizedCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteAuthorizedCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteAuthorizedCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteAuthorizedCertificateRequest 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.appengine.v1.DeleteAuthorizedCertificateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteAuthorizedCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteAuthorizedCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteAuthorizedCertificateRequest 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.appengine.v1.DeleteAuthorizedCertificateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteAuthorizedCertificateRequest 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.appengine.v1.DeleteAuthorizedCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteAuthorizedCertificateRequest 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.appengine.v1.DeleteAuthorizedCertificateRequest 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 message for `AuthorizedCertificates.DeleteAuthorizedCertificate`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteAuthorizedCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.DeleteAuthorizedCertificateRequest) + com.google.appengine.v1.DeleteAuthorizedCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteAuthorizedCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteAuthorizedCertificateRequest.class, + com.google.appengine.v1.DeleteAuthorizedCertificateRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.DeleteAuthorizedCertificateRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteAuthorizedCertificateRequest getDefaultInstanceForType() { + return com.google.appengine.v1.DeleteAuthorizedCertificateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.DeleteAuthorizedCertificateRequest build() { + com.google.appengine.v1.DeleteAuthorizedCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteAuthorizedCertificateRequest buildPartial() { + com.google.appengine.v1.DeleteAuthorizedCertificateRequest result = + new com.google.appengine.v1.DeleteAuthorizedCertificateRequest(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.appengine.v1.DeleteAuthorizedCertificateRequest) { + return mergeFrom((com.google.appengine.v1.DeleteAuthorizedCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.DeleteAuthorizedCertificateRequest other) { + if (other == com.google.appengine.v1.DeleteAuthorizedCertificateRequest.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.appengine.v1.DeleteAuthorizedCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.DeleteAuthorizedCertificateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.DeleteAuthorizedCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.DeleteAuthorizedCertificateRequest) + private static final com.google.appengine.v1.DeleteAuthorizedCertificateRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.DeleteAuthorizedCertificateRequest(); + } + + public static com.google.appengine.v1.DeleteAuthorizedCertificateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAuthorizedCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAuthorizedCertificateRequest(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.appengine.v1.DeleteAuthorizedCertificateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteAuthorizedCertificateRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteAuthorizedCertificateRequestOrBuilder.java new file mode 100644 index 00000000..5db965b3 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteAuthorizedCertificateRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface DeleteAuthorizedCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.DeleteAuthorizedCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource to delete. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource to delete. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteDomainMappingRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteDomainMappingRequest.java new file mode 100644 index 00000000..d65e8728 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteDomainMappingRequest.java @@ -0,0 +1,643 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `DomainMappings.DeleteDomainMapping`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteDomainMappingRequest} + */ +public final class DeleteDomainMappingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.DeleteDomainMappingRequest) + DeleteDomainMappingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDomainMappingRequest.newBuilder() to construct. + private DeleteDomainMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDomainMappingRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDomainMappingRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteDomainMappingRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteDomainMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteDomainMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteDomainMappingRequest.class, + com.google.appengine.v1.DeleteDomainMappingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource to delete. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource to delete. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.DeleteDomainMappingRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.DeleteDomainMappingRequest other = + (com.google.appengine.v1.DeleteDomainMappingRequest) 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.appengine.v1.DeleteDomainMappingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteDomainMappingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteDomainMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteDomainMappingRequest 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.appengine.v1.DeleteDomainMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteDomainMappingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteDomainMappingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteDomainMappingRequest 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.appengine.v1.DeleteDomainMappingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteDomainMappingRequest 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.appengine.v1.DeleteDomainMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteDomainMappingRequest 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.appengine.v1.DeleteDomainMappingRequest 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 message for `DomainMappings.DeleteDomainMapping`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteDomainMappingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.DeleteDomainMappingRequest) + com.google.appengine.v1.DeleteDomainMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteDomainMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteDomainMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteDomainMappingRequest.class, + com.google.appengine.v1.DeleteDomainMappingRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.DeleteDomainMappingRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteDomainMappingRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteDomainMappingRequest getDefaultInstanceForType() { + return com.google.appengine.v1.DeleteDomainMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.DeleteDomainMappingRequest build() { + com.google.appengine.v1.DeleteDomainMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteDomainMappingRequest buildPartial() { + com.google.appengine.v1.DeleteDomainMappingRequest result = + new com.google.appengine.v1.DeleteDomainMappingRequest(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.appengine.v1.DeleteDomainMappingRequest) { + return mergeFrom((com.google.appengine.v1.DeleteDomainMappingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.DeleteDomainMappingRequest other) { + if (other == com.google.appengine.v1.DeleteDomainMappingRequest.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.appengine.v1.DeleteDomainMappingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.DeleteDomainMappingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to delete. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.DeleteDomainMappingRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.DeleteDomainMappingRequest) + private static final com.google.appengine.v1.DeleteDomainMappingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.DeleteDomainMappingRequest(); + } + + public static com.google.appengine.v1.DeleteDomainMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDomainMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDomainMappingRequest(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.appengine.v1.DeleteDomainMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteDomainMappingRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteDomainMappingRequestOrBuilder.java new file mode 100644 index 00000000..02cb1523 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteDomainMappingRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface DeleteDomainMappingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.DeleteDomainMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource to delete. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource to delete. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteIngressRuleRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteIngressRuleRequest.java new file mode 100644 index 00000000..7f19d1ff --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteIngressRuleRequest.java @@ -0,0 +1,642 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Firewall.DeleteIngressRule`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteIngressRuleRequest} + */ +public final class DeleteIngressRuleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.DeleteIngressRuleRequest) + DeleteIngressRuleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteIngressRuleRequest.newBuilder() to construct. + private DeleteIngressRuleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteIngressRuleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteIngressRuleRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteIngressRuleRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteIngressRuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteIngressRuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteIngressRuleRequest.class, + com.google.appengine.v1.DeleteIngressRuleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the Firewall resource to delete.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the Firewall resource to delete.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.DeleteIngressRuleRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.DeleteIngressRuleRequest other = + (com.google.appengine.v1.DeleteIngressRuleRequest) 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.appengine.v1.DeleteIngressRuleRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteIngressRuleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteIngressRuleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteIngressRuleRequest 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.appengine.v1.DeleteIngressRuleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteIngressRuleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteIngressRuleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteIngressRuleRequest 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.appengine.v1.DeleteIngressRuleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteIngressRuleRequest 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.appengine.v1.DeleteIngressRuleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteIngressRuleRequest 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.appengine.v1.DeleteIngressRuleRequest 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 message for `Firewall.DeleteIngressRule`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteIngressRuleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.DeleteIngressRuleRequest) + com.google.appengine.v1.DeleteIngressRuleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteIngressRuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteIngressRuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteIngressRuleRequest.class, + com.google.appengine.v1.DeleteIngressRuleRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.DeleteIngressRuleRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteIngressRuleRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteIngressRuleRequest getDefaultInstanceForType() { + return com.google.appengine.v1.DeleteIngressRuleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.DeleteIngressRuleRequest build() { + com.google.appengine.v1.DeleteIngressRuleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteIngressRuleRequest buildPartial() { + com.google.appengine.v1.DeleteIngressRuleRequest result = + new com.google.appengine.v1.DeleteIngressRuleRequest(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.appengine.v1.DeleteIngressRuleRequest) { + return mergeFrom((com.google.appengine.v1.DeleteIngressRuleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.DeleteIngressRuleRequest other) { + if (other == com.google.appengine.v1.DeleteIngressRuleRequest.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.appengine.v1.DeleteIngressRuleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.DeleteIngressRuleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the Firewall resource to delete.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the Firewall resource to delete.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the Firewall resource to delete.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Firewall resource to delete.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Firewall resource to delete.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.DeleteIngressRuleRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.DeleteIngressRuleRequest) + private static final com.google.appengine.v1.DeleteIngressRuleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.DeleteIngressRuleRequest(); + } + + public static com.google.appengine.v1.DeleteIngressRuleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteIngressRuleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteIngressRuleRequest(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.appengine.v1.DeleteIngressRuleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteIngressRuleRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteIngressRuleRequestOrBuilder.java new file mode 100644 index 00000000..6010edb5 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteIngressRuleRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface DeleteIngressRuleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.DeleteIngressRuleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Firewall resource to delete.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the Firewall resource to delete.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteInstanceRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteInstanceRequest.java new file mode 100644 index 00000000..70831610 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteInstanceRequest.java @@ -0,0 +1,641 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Instances.DeleteInstance`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteInstanceRequest} + */ +public final class DeleteInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.DeleteInstanceRequest) + DeleteInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteInstanceRequest.newBuilder() to construct. + private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteInstanceRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteInstanceRequest.class, + com.google.appengine.v1.DeleteInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.DeleteInstanceRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.DeleteInstanceRequest other = + (com.google.appengine.v1.DeleteInstanceRequest) 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.appengine.v1.DeleteInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteInstanceRequest 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.appengine.v1.DeleteInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteInstanceRequest 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.appengine.v1.DeleteInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteInstanceRequest 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.appengine.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteInstanceRequest 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.appengine.v1.DeleteInstanceRequest 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 message for `Instances.DeleteInstance`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.DeleteInstanceRequest) + com.google.appengine.v1.DeleteInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteInstanceRequest.class, + com.google.appengine.v1.DeleteInstanceRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.DeleteInstanceRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteInstanceRequest getDefaultInstanceForType() { + return com.google.appengine.v1.DeleteInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.DeleteInstanceRequest build() { + com.google.appengine.v1.DeleteInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteInstanceRequest buildPartial() { + com.google.appengine.v1.DeleteInstanceRequest result = + new com.google.appengine.v1.DeleteInstanceRequest(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.appengine.v1.DeleteInstanceRequest) { + return mergeFrom((com.google.appengine.v1.DeleteInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.DeleteInstanceRequest other) { + if (other == com.google.appengine.v1.DeleteInstanceRequest.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.appengine.v1.DeleteInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.DeleteInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.DeleteInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.DeleteInstanceRequest) + private static final com.google.appengine.v1.DeleteInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.DeleteInstanceRequest(); + } + + public static com.google.appengine.v1.DeleteInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteInstanceRequest(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.appengine.v1.DeleteInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteInstanceRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteInstanceRequestOrBuilder.java new file mode 100644 index 00000000..d66db587 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteInstanceRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface DeleteInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.DeleteInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteServiceRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteServiceRequest.java new file mode 100644 index 00000000..1e691f4c --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteServiceRequest.java @@ -0,0 +1,634 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Services.DeleteService`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteServiceRequest} + */ +public final class DeleteServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.DeleteServiceRequest) + DeleteServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteServiceRequest.newBuilder() to construct. + private DeleteServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteServiceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteServiceRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteServiceRequest.class, + com.google.appengine.v1.DeleteServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource requested. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource requested. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.DeleteServiceRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.DeleteServiceRequest other = + (com.google.appengine.v1.DeleteServiceRequest) 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.appengine.v1.DeleteServiceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteServiceRequest 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.appengine.v1.DeleteServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteServiceRequest 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.appengine.v1.DeleteServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteServiceRequest 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.appengine.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteServiceRequest 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.appengine.v1.DeleteServiceRequest 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 message for `Services.DeleteService`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.DeleteServiceRequest) + com.google.appengine.v1.DeleteServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteServiceRequest.class, + com.google.appengine.v1.DeleteServiceRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.DeleteServiceRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteServiceRequest getDefaultInstanceForType() { + return com.google.appengine.v1.DeleteServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.DeleteServiceRequest build() { + com.google.appengine.v1.DeleteServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteServiceRequest buildPartial() { + com.google.appengine.v1.DeleteServiceRequest result = + new com.google.appengine.v1.DeleteServiceRequest(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.appengine.v1.DeleteServiceRequest) { + return mergeFrom((com.google.appengine.v1.DeleteServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.DeleteServiceRequest other) { + if (other == com.google.appengine.v1.DeleteServiceRequest.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.appengine.v1.DeleteServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.DeleteServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.DeleteServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.DeleteServiceRequest) + private static final com.google.appengine.v1.DeleteServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.DeleteServiceRequest(); + } + + public static com.google.appengine.v1.DeleteServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteServiceRequest(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.appengine.v1.DeleteServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteServiceRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteServiceRequestOrBuilder.java new file mode 100644 index 00000000..fbf605eb --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteServiceRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface DeleteServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.DeleteServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource requested. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource requested. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteVersionRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteVersionRequest.java new file mode 100644 index 00000000..39d13f50 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteVersionRequest.java @@ -0,0 +1,641 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Versions.DeleteVersion`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteVersionRequest} + */ +public final class DeleteVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.DeleteVersionRequest) + DeleteVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteVersionRequest.newBuilder() to construct. + private DeleteVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteVersionRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteVersionRequest.class, + com.google.appengine.v1.DeleteVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.DeleteVersionRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.DeleteVersionRequest other = + (com.google.appengine.v1.DeleteVersionRequest) 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.appengine.v1.DeleteVersionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteVersionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteVersionRequest 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.appengine.v1.DeleteVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DeleteVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DeleteVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteVersionRequest 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.appengine.v1.DeleteVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteVersionRequest 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.appengine.v1.DeleteVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DeleteVersionRequest 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.appengine.v1.DeleteVersionRequest 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 message for `Versions.DeleteVersion`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.DeleteVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.DeleteVersionRequest) + com.google.appengine.v1.DeleteVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DeleteVersionRequest.class, + com.google.appengine.v1.DeleteVersionRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.DeleteVersionRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_DeleteVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteVersionRequest getDefaultInstanceForType() { + return com.google.appengine.v1.DeleteVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.DeleteVersionRequest build() { + com.google.appengine.v1.DeleteVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.DeleteVersionRequest buildPartial() { + com.google.appengine.v1.DeleteVersionRequest result = + new com.google.appengine.v1.DeleteVersionRequest(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.appengine.v1.DeleteVersionRequest) { + return mergeFrom((com.google.appengine.v1.DeleteVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.DeleteVersionRequest other) { + if (other == com.google.appengine.v1.DeleteVersionRequest.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.appengine.v1.DeleteVersionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.DeleteVersionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.DeleteVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.DeleteVersionRequest) + private static final com.google.appengine.v1.DeleteVersionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.DeleteVersionRequest(); + } + + public static com.google.appengine.v1.DeleteVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteVersionRequest(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.appengine.v1.DeleteVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteVersionRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteVersionRequestOrBuilder.java new file mode 100644 index 00000000..9ca00534 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeleteVersionRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface DeleteVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.DeleteVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeployProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeployProto.java new file mode 100644 index 00000000..cb67ef41 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeployProto.java @@ -0,0 +1,147 @@ +/* + * 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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +public final class DeployProto { + private DeployProto() {} + + 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_appengine_v1_Deployment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Deployment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Deployment_FilesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Deployment_FilesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_FileInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_FileInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_ContainerInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ContainerInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_CloudBuildOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_CloudBuildOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_ZipInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ZipInfo_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/appengine/v1/deploy.proto\022\023goog" + + "le.appengine.v1\032\036google/protobuf/duratio" + + "n.proto\032\034google/api/annotations.proto\"\273\002" + + "\n\nDeployment\0229\n\005files\030\001 \003(\0132*.google.app" + + "engine.v1.Deployment.FilesEntry\0225\n\tconta" + + "iner\030\002 \001(\0132\".google.appengine.v1.Contain" + + "erInfo\022)\n\003zip\030\003 \001(\0132\034.google.appengine.v" + + "1.ZipInfo\022C\n\023cloud_build_options\030\006 \001(\0132&" + + ".google.appengine.v1.CloudBuildOptions\032K" + + "\n\nFilesEntry\022\013\n\003key\030\001 \001(\t\022,\n\005value\030\002 \001(\013" + + "2\035.google.appengine.v1.FileInfo:\0028\001\"C\n\010F" + + "ileInfo\022\022\n\nsource_url\030\001 \001(\t\022\020\n\010sha1_sum\030" + + "\002 \001(\t\022\021\n\tmime_type\030\003 \001(\t\"\036\n\rContainerInf" + + "o\022\r\n\005image\030\001 \001(\t\"b\n\021CloudBuildOptions\022\025\n" + + "\rapp_yaml_path\030\001 \001(\t\0226\n\023cloud_build_time" + + "out\030\002 \001(\0132\031.google.protobuf.Duration\"2\n\007" + + "ZipInfo\022\022\n\nsource_url\030\003 \001(\t\022\023\n\013files_cou" + + "nt\030\004 \001(\005B\275\001\n\027com.google.appengine.v1B\013De" + + "ployProtoP\001Z + * Code and application artifacts used to deploy a version to App Engine. + * + * + * Protobuf type {@code google.appengine.v1.Deployment} + */ +public final class Deployment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Deployment) + DeploymentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Deployment.newBuilder() to construct. + private Deployment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Deployment() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Deployment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Deployment( + 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)) { + files_ = + com.google.protobuf.MapField.newMapField(FilesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + files__ = + input.readMessage( + FilesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + files_.getMutableMap().put(files__.getKey(), files__.getValue()); + break; + } + case 18: + { + com.google.appengine.v1.ContainerInfo.Builder subBuilder = null; + if (container_ != null) { + subBuilder = container_.toBuilder(); + } + container_ = + input.readMessage( + com.google.appengine.v1.ContainerInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(container_); + container_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.appengine.v1.ZipInfo.Builder subBuilder = null; + if (zip_ != null) { + subBuilder = zip_.toBuilder(); + } + zip_ = input.readMessage(com.google.appengine.v1.ZipInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(zip_); + zip_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.appengine.v1.CloudBuildOptions.Builder subBuilder = null; + if (cloudBuildOptions_ != null) { + subBuilder = cloudBuildOptions_.toBuilder(); + } + cloudBuildOptions_ = + input.readMessage( + com.google.appengine.v1.CloudBuildOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cloudBuildOptions_); + cloudBuildOptions_ = 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.appengine.v1.DeployProto + .internal_static_google_appengine_v1_Deployment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetFiles(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_Deployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Deployment.class, + com.google.appengine.v1.Deployment.Builder.class); + } + + public static final int FILES_FIELD_NUMBER = 1; + + private static final class FilesDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_Deployment_FilesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.appengine.v1.FileInfo.getDefaultInstance()); + } + + private com.google.protobuf.MapField files_; + + private com.google.protobuf.MapField + internalGetFiles() { + if (files_ == null) { + return com.google.protobuf.MapField.emptyMapField(FilesDefaultEntryHolder.defaultEntry); + } + return files_; + } + + public int getFilesCount() { + return internalGetFiles().getMap().size(); + } + /** + * + * + *
+   * Manifest of the files stored in Google Cloud Storage that are included
+   * as part of this version. All files must be readable using the
+   * credentials supplied with this call.
+   * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + @java.lang.Override + public boolean containsFiles(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetFiles().getMap().containsKey(key); + } + /** Use {@link #getFilesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFiles() { + return getFilesMap(); + } + /** + * + * + *
+   * Manifest of the files stored in Google Cloud Storage that are included
+   * as part of this version. All files must be readable using the
+   * credentials supplied with this call.
+   * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + @java.lang.Override + public java.util.Map getFilesMap() { + return internalGetFiles().getMap(); + } + /** + * + * + *
+   * Manifest of the files stored in Google Cloud Storage that are included
+   * as part of this version. All files must be readable using the
+   * credentials supplied with this call.
+   * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + @java.lang.Override + public com.google.appengine.v1.FileInfo getFilesOrDefault( + java.lang.String key, com.google.appengine.v1.FileInfo defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFiles().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Manifest of the files stored in Google Cloud Storage that are included
+   * as part of this version. All files must be readable using the
+   * credentials supplied with this call.
+   * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + @java.lang.Override + public com.google.appengine.v1.FileInfo getFilesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFiles().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CONTAINER_FIELD_NUMBER = 2; + private com.google.appengine.v1.ContainerInfo container_; + /** + * + * + *
+   * The Docker image for the container that runs the version.
+   * Only applicable for instances running in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + * + * @return Whether the container field is set. + */ + @java.lang.Override + public boolean hasContainer() { + return container_ != null; + } + /** + * + * + *
+   * The Docker image for the container that runs the version.
+   * Only applicable for instances running in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + * + * @return The container. + */ + @java.lang.Override + public com.google.appengine.v1.ContainerInfo getContainer() { + return container_ == null + ? com.google.appengine.v1.ContainerInfo.getDefaultInstance() + : container_; + } + /** + * + * + *
+   * The Docker image for the container that runs the version.
+   * Only applicable for instances running in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + */ + @java.lang.Override + public com.google.appengine.v1.ContainerInfoOrBuilder getContainerOrBuilder() { + return getContainer(); + } + + public static final int ZIP_FIELD_NUMBER = 3; + private com.google.appengine.v1.ZipInfo zip_; + /** + * + * + *
+   * The zip file for this deployment, if this is a zip deployment.
+   * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + * + * @return Whether the zip field is set. + */ + @java.lang.Override + public boolean hasZip() { + return zip_ != null; + } + /** + * + * + *
+   * The zip file for this deployment, if this is a zip deployment.
+   * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + * + * @return The zip. + */ + @java.lang.Override + public com.google.appengine.v1.ZipInfo getZip() { + return zip_ == null ? com.google.appengine.v1.ZipInfo.getDefaultInstance() : zip_; + } + /** + * + * + *
+   * The zip file for this deployment, if this is a zip deployment.
+   * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + */ + @java.lang.Override + public com.google.appengine.v1.ZipInfoOrBuilder getZipOrBuilder() { + return getZip(); + } + + public static final int CLOUD_BUILD_OPTIONS_FIELD_NUMBER = 6; + private com.google.appengine.v1.CloudBuildOptions cloudBuildOptions_; + /** + * + * + *
+   * Options for any Google Cloud Build builds created as a part of this
+   * deployment.
+   * These options will only be used if a new build is created, such as when
+   * deploying to the App Engine flexible environment using files or zip.
+   * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + * + * @return Whether the cloudBuildOptions field is set. + */ + @java.lang.Override + public boolean hasCloudBuildOptions() { + return cloudBuildOptions_ != null; + } + /** + * + * + *
+   * Options for any Google Cloud Build builds created as a part of this
+   * deployment.
+   * These options will only be used if a new build is created, such as when
+   * deploying to the App Engine flexible environment using files or zip.
+   * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + * + * @return The cloudBuildOptions. + */ + @java.lang.Override + public com.google.appengine.v1.CloudBuildOptions getCloudBuildOptions() { + return cloudBuildOptions_ == null + ? com.google.appengine.v1.CloudBuildOptions.getDefaultInstance() + : cloudBuildOptions_; + } + /** + * + * + *
+   * Options for any Google Cloud Build builds created as a part of this
+   * deployment.
+   * These options will only be used if a new build is created, such as when
+   * deploying to the App Engine flexible environment using files or zip.
+   * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + */ + @java.lang.Override + public com.google.appengine.v1.CloudBuildOptionsOrBuilder getCloudBuildOptionsOrBuilder() { + return getCloudBuildOptions(); + } + + 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 { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetFiles(), FilesDefaultEntryHolder.defaultEntry, 1); + if (container_ != null) { + output.writeMessage(2, getContainer()); + } + if (zip_ != null) { + output.writeMessage(3, getZip()); + } + if (cloudBuildOptions_ != null) { + output.writeMessage(6, getCloudBuildOptions()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetFiles().getMap().entrySet()) { + com.google.protobuf.MapEntry files__ = + FilesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, files__); + } + if (container_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContainer()); + } + if (zip_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getZip()); + } + if (cloudBuildOptions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCloudBuildOptions()); + } + 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.appengine.v1.Deployment)) { + return super.equals(obj); + } + com.google.appengine.v1.Deployment other = (com.google.appengine.v1.Deployment) obj; + + if (!internalGetFiles().equals(other.internalGetFiles())) return false; + if (hasContainer() != other.hasContainer()) return false; + if (hasContainer()) { + if (!getContainer().equals(other.getContainer())) return false; + } + if (hasZip() != other.hasZip()) return false; + if (hasZip()) { + if (!getZip().equals(other.getZip())) return false; + } + if (hasCloudBuildOptions() != other.hasCloudBuildOptions()) return false; + if (hasCloudBuildOptions()) { + if (!getCloudBuildOptions().equals(other.getCloudBuildOptions())) 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 (!internalGetFiles().getMap().isEmpty()) { + hash = (37 * hash) + FILES_FIELD_NUMBER; + hash = (53 * hash) + internalGetFiles().hashCode(); + } + if (hasContainer()) { + hash = (37 * hash) + CONTAINER_FIELD_NUMBER; + hash = (53 * hash) + getContainer().hashCode(); + } + if (hasZip()) { + hash = (37 * hash) + ZIP_FIELD_NUMBER; + hash = (53 * hash) + getZip().hashCode(); + } + if (hasCloudBuildOptions()) { + hash = (37 * hash) + CLOUD_BUILD_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getCloudBuildOptions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Deployment parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Deployment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Deployment parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Deployment 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.appengine.v1.Deployment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Deployment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Deployment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Deployment 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.appengine.v1.Deployment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Deployment 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.appengine.v1.Deployment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Deployment 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.appengine.v1.Deployment 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; + } + /** + * + * + *
+   * Code and application artifacts used to deploy a version to App Engine.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Deployment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Deployment) + com.google.appengine.v1.DeploymentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_Deployment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetFiles(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutableFiles(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_Deployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Deployment.class, + com.google.appengine.v1.Deployment.Builder.class); + } + + // Construct using com.google.appengine.v1.Deployment.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(); + internalGetMutableFiles().clear(); + if (containerBuilder_ == null) { + container_ = null; + } else { + container_ = null; + containerBuilder_ = null; + } + if (zipBuilder_ == null) { + zip_ = null; + } else { + zip_ = null; + zipBuilder_ = null; + } + if (cloudBuildOptionsBuilder_ == null) { + cloudBuildOptions_ = null; + } else { + cloudBuildOptions_ = null; + cloudBuildOptionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_Deployment_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Deployment getDefaultInstanceForType() { + return com.google.appengine.v1.Deployment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Deployment build() { + com.google.appengine.v1.Deployment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Deployment buildPartial() { + com.google.appengine.v1.Deployment result = new com.google.appengine.v1.Deployment(this); + int from_bitField0_ = bitField0_; + result.files_ = internalGetFiles(); + result.files_.makeImmutable(); + if (containerBuilder_ == null) { + result.container_ = container_; + } else { + result.container_ = containerBuilder_.build(); + } + if (zipBuilder_ == null) { + result.zip_ = zip_; + } else { + result.zip_ = zipBuilder_.build(); + } + if (cloudBuildOptionsBuilder_ == null) { + result.cloudBuildOptions_ = cloudBuildOptions_; + } else { + result.cloudBuildOptions_ = cloudBuildOptionsBuilder_.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.appengine.v1.Deployment) { + return mergeFrom((com.google.appengine.v1.Deployment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Deployment other) { + if (other == com.google.appengine.v1.Deployment.getDefaultInstance()) return this; + internalGetMutableFiles().mergeFrom(other.internalGetFiles()); + if (other.hasContainer()) { + mergeContainer(other.getContainer()); + } + if (other.hasZip()) { + mergeZip(other.getZip()); + } + if (other.hasCloudBuildOptions()) { + mergeCloudBuildOptions(other.getCloudBuildOptions()); + } + 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.appengine.v1.Deployment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Deployment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.MapField files_; + + private com.google.protobuf.MapField + internalGetFiles() { + if (files_ == null) { + return com.google.protobuf.MapField.emptyMapField(FilesDefaultEntryHolder.defaultEntry); + } + return files_; + } + + private com.google.protobuf.MapField + internalGetMutableFiles() { + onChanged(); + ; + if (files_ == null) { + files_ = com.google.protobuf.MapField.newMapField(FilesDefaultEntryHolder.defaultEntry); + } + if (!files_.isMutable()) { + files_ = files_.copy(); + } + return files_; + } + + public int getFilesCount() { + return internalGetFiles().getMap().size(); + } + /** + * + * + *
+     * Manifest of the files stored in Google Cloud Storage that are included
+     * as part of this version. All files must be readable using the
+     * credentials supplied with this call.
+     * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + @java.lang.Override + public boolean containsFiles(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetFiles().getMap().containsKey(key); + } + /** Use {@link #getFilesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFiles() { + return getFilesMap(); + } + /** + * + * + *
+     * Manifest of the files stored in Google Cloud Storage that are included
+     * as part of this version. All files must be readable using the
+     * credentials supplied with this call.
+     * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + @java.lang.Override + public java.util.Map getFilesMap() { + return internalGetFiles().getMap(); + } + /** + * + * + *
+     * Manifest of the files stored in Google Cloud Storage that are included
+     * as part of this version. All files must be readable using the
+     * credentials supplied with this call.
+     * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + @java.lang.Override + public com.google.appengine.v1.FileInfo getFilesOrDefault( + java.lang.String key, com.google.appengine.v1.FileInfo defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFiles().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Manifest of the files stored in Google Cloud Storage that are included
+     * as part of this version. All files must be readable using the
+     * credentials supplied with this call.
+     * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + @java.lang.Override + public com.google.appengine.v1.FileInfo getFilesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFiles().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFiles() { + internalGetMutableFiles().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Manifest of the files stored in Google Cloud Storage that are included
+     * as part of this version. All files must be readable using the
+     * credentials supplied with this call.
+     * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + public Builder removeFiles(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableFiles().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableFiles() { + return internalGetMutableFiles().getMutableMap(); + } + /** + * + * + *
+     * Manifest of the files stored in Google Cloud Storage that are included
+     * as part of this version. All files must be readable using the
+     * credentials supplied with this call.
+     * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + public Builder putFiles(java.lang.String key, com.google.appengine.v1.FileInfo value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableFiles().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Manifest of the files stored in Google Cloud Storage that are included
+     * as part of this version. All files must be readable using the
+     * credentials supplied with this call.
+     * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + public Builder putAllFiles( + java.util.Map values) { + internalGetMutableFiles().getMutableMap().putAll(values); + return this; + } + + private com.google.appengine.v1.ContainerInfo container_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ContainerInfo, + com.google.appengine.v1.ContainerInfo.Builder, + com.google.appengine.v1.ContainerInfoOrBuilder> + containerBuilder_; + /** + * + * + *
+     * The Docker image for the container that runs the version.
+     * Only applicable for instances running in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + * + * @return Whether the container field is set. + */ + public boolean hasContainer() { + return containerBuilder_ != null || container_ != null; + } + /** + * + * + *
+     * The Docker image for the container that runs the version.
+     * Only applicable for instances running in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + * + * @return The container. + */ + public com.google.appengine.v1.ContainerInfo getContainer() { + if (containerBuilder_ == null) { + return container_ == null + ? com.google.appengine.v1.ContainerInfo.getDefaultInstance() + : container_; + } else { + return containerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The Docker image for the container that runs the version.
+     * Only applicable for instances running in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + */ + public Builder setContainer(com.google.appengine.v1.ContainerInfo value) { + if (containerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + container_ = value; + onChanged(); + } else { + containerBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The Docker image for the container that runs the version.
+     * Only applicable for instances running in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + */ + public Builder setContainer(com.google.appengine.v1.ContainerInfo.Builder builderForValue) { + if (containerBuilder_ == null) { + container_ = builderForValue.build(); + onChanged(); + } else { + containerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The Docker image for the container that runs the version.
+     * Only applicable for instances running in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + */ + public Builder mergeContainer(com.google.appengine.v1.ContainerInfo value) { + if (containerBuilder_ == null) { + if (container_ != null) { + container_ = + com.google.appengine.v1.ContainerInfo.newBuilder(container_) + .mergeFrom(value) + .buildPartial(); + } else { + container_ = value; + } + onChanged(); + } else { + containerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The Docker image for the container that runs the version.
+     * Only applicable for instances running in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + */ + public Builder clearContainer() { + if (containerBuilder_ == null) { + container_ = null; + onChanged(); + } else { + container_ = null; + containerBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The Docker image for the container that runs the version.
+     * Only applicable for instances running in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + */ + public com.google.appengine.v1.ContainerInfo.Builder getContainerBuilder() { + + onChanged(); + return getContainerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Docker image for the container that runs the version.
+     * Only applicable for instances running in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + */ + public com.google.appengine.v1.ContainerInfoOrBuilder getContainerOrBuilder() { + if (containerBuilder_ != null) { + return containerBuilder_.getMessageOrBuilder(); + } else { + return container_ == null + ? com.google.appengine.v1.ContainerInfo.getDefaultInstance() + : container_; + } + } + /** + * + * + *
+     * The Docker image for the container that runs the version.
+     * Only applicable for instances running in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ContainerInfo, + com.google.appengine.v1.ContainerInfo.Builder, + com.google.appengine.v1.ContainerInfoOrBuilder> + getContainerFieldBuilder() { + if (containerBuilder_ == null) { + containerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ContainerInfo, + com.google.appengine.v1.ContainerInfo.Builder, + com.google.appengine.v1.ContainerInfoOrBuilder>( + getContainer(), getParentForChildren(), isClean()); + container_ = null; + } + return containerBuilder_; + } + + private com.google.appengine.v1.ZipInfo zip_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ZipInfo, + com.google.appengine.v1.ZipInfo.Builder, + com.google.appengine.v1.ZipInfoOrBuilder> + zipBuilder_; + /** + * + * + *
+     * The zip file for this deployment, if this is a zip deployment.
+     * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + * + * @return Whether the zip field is set. + */ + public boolean hasZip() { + return zipBuilder_ != null || zip_ != null; + } + /** + * + * + *
+     * The zip file for this deployment, if this is a zip deployment.
+     * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + * + * @return The zip. + */ + public com.google.appengine.v1.ZipInfo getZip() { + if (zipBuilder_ == null) { + return zip_ == null ? com.google.appengine.v1.ZipInfo.getDefaultInstance() : zip_; + } else { + return zipBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The zip file for this deployment, if this is a zip deployment.
+     * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + */ + public Builder setZip(com.google.appengine.v1.ZipInfo value) { + if (zipBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + zip_ = value; + onChanged(); + } else { + zipBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The zip file for this deployment, if this is a zip deployment.
+     * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + */ + public Builder setZip(com.google.appengine.v1.ZipInfo.Builder builderForValue) { + if (zipBuilder_ == null) { + zip_ = builderForValue.build(); + onChanged(); + } else { + zipBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The zip file for this deployment, if this is a zip deployment.
+     * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + */ + public Builder mergeZip(com.google.appengine.v1.ZipInfo value) { + if (zipBuilder_ == null) { + if (zip_ != null) { + zip_ = com.google.appengine.v1.ZipInfo.newBuilder(zip_).mergeFrom(value).buildPartial(); + } else { + zip_ = value; + } + onChanged(); + } else { + zipBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The zip file for this deployment, if this is a zip deployment.
+     * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + */ + public Builder clearZip() { + if (zipBuilder_ == null) { + zip_ = null; + onChanged(); + } else { + zip_ = null; + zipBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The zip file for this deployment, if this is a zip deployment.
+     * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + */ + public com.google.appengine.v1.ZipInfo.Builder getZipBuilder() { + + onChanged(); + return getZipFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The zip file for this deployment, if this is a zip deployment.
+     * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + */ + public com.google.appengine.v1.ZipInfoOrBuilder getZipOrBuilder() { + if (zipBuilder_ != null) { + return zipBuilder_.getMessageOrBuilder(); + } else { + return zip_ == null ? com.google.appengine.v1.ZipInfo.getDefaultInstance() : zip_; + } + } + /** + * + * + *
+     * The zip file for this deployment, if this is a zip deployment.
+     * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ZipInfo, + com.google.appengine.v1.ZipInfo.Builder, + com.google.appengine.v1.ZipInfoOrBuilder> + getZipFieldBuilder() { + if (zipBuilder_ == null) { + zipBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ZipInfo, + com.google.appengine.v1.ZipInfo.Builder, + com.google.appengine.v1.ZipInfoOrBuilder>( + getZip(), getParentForChildren(), isClean()); + zip_ = null; + } + return zipBuilder_; + } + + private com.google.appengine.v1.CloudBuildOptions cloudBuildOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CloudBuildOptions, + com.google.appengine.v1.CloudBuildOptions.Builder, + com.google.appengine.v1.CloudBuildOptionsOrBuilder> + cloudBuildOptionsBuilder_; + /** + * + * + *
+     * Options for any Google Cloud Build builds created as a part of this
+     * deployment.
+     * These options will only be used if a new build is created, such as when
+     * deploying to the App Engine flexible environment using files or zip.
+     * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + * + * @return Whether the cloudBuildOptions field is set. + */ + public boolean hasCloudBuildOptions() { + return cloudBuildOptionsBuilder_ != null || cloudBuildOptions_ != null; + } + /** + * + * + *
+     * Options for any Google Cloud Build builds created as a part of this
+     * deployment.
+     * These options will only be used if a new build is created, such as when
+     * deploying to the App Engine flexible environment using files or zip.
+     * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + * + * @return The cloudBuildOptions. + */ + public com.google.appengine.v1.CloudBuildOptions getCloudBuildOptions() { + if (cloudBuildOptionsBuilder_ == null) { + return cloudBuildOptions_ == null + ? com.google.appengine.v1.CloudBuildOptions.getDefaultInstance() + : cloudBuildOptions_; + } else { + return cloudBuildOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Options for any Google Cloud Build builds created as a part of this
+     * deployment.
+     * These options will only be used if a new build is created, such as when
+     * deploying to the App Engine flexible environment using files or zip.
+     * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + */ + public Builder setCloudBuildOptions(com.google.appengine.v1.CloudBuildOptions value) { + if (cloudBuildOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudBuildOptions_ = value; + onChanged(); + } else { + cloudBuildOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Options for any Google Cloud Build builds created as a part of this
+     * deployment.
+     * These options will only be used if a new build is created, such as when
+     * deploying to the App Engine flexible environment using files or zip.
+     * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + */ + public Builder setCloudBuildOptions( + com.google.appengine.v1.CloudBuildOptions.Builder builderForValue) { + if (cloudBuildOptionsBuilder_ == null) { + cloudBuildOptions_ = builderForValue.build(); + onChanged(); + } else { + cloudBuildOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Options for any Google Cloud Build builds created as a part of this
+     * deployment.
+     * These options will only be used if a new build is created, such as when
+     * deploying to the App Engine flexible environment using files or zip.
+     * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + */ + public Builder mergeCloudBuildOptions(com.google.appengine.v1.CloudBuildOptions value) { + if (cloudBuildOptionsBuilder_ == null) { + if (cloudBuildOptions_ != null) { + cloudBuildOptions_ = + com.google.appengine.v1.CloudBuildOptions.newBuilder(cloudBuildOptions_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudBuildOptions_ = value; + } + onChanged(); + } else { + cloudBuildOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Options for any Google Cloud Build builds created as a part of this
+     * deployment.
+     * These options will only be used if a new build is created, such as when
+     * deploying to the App Engine flexible environment using files or zip.
+     * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + */ + public Builder clearCloudBuildOptions() { + if (cloudBuildOptionsBuilder_ == null) { + cloudBuildOptions_ = null; + onChanged(); + } else { + cloudBuildOptions_ = null; + cloudBuildOptionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Options for any Google Cloud Build builds created as a part of this
+     * deployment.
+     * These options will only be used if a new build is created, such as when
+     * deploying to the App Engine flexible environment using files or zip.
+     * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + */ + public com.google.appengine.v1.CloudBuildOptions.Builder getCloudBuildOptionsBuilder() { + + onChanged(); + return getCloudBuildOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Options for any Google Cloud Build builds created as a part of this
+     * deployment.
+     * These options will only be used if a new build is created, such as when
+     * deploying to the App Engine flexible environment using files or zip.
+     * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + */ + public com.google.appengine.v1.CloudBuildOptionsOrBuilder getCloudBuildOptionsOrBuilder() { + if (cloudBuildOptionsBuilder_ != null) { + return cloudBuildOptionsBuilder_.getMessageOrBuilder(); + } else { + return cloudBuildOptions_ == null + ? com.google.appengine.v1.CloudBuildOptions.getDefaultInstance() + : cloudBuildOptions_; + } + } + /** + * + * + *
+     * Options for any Google Cloud Build builds created as a part of this
+     * deployment.
+     * These options will only be used if a new build is created, such as when
+     * deploying to the App Engine flexible environment using files or zip.
+     * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CloudBuildOptions, + com.google.appengine.v1.CloudBuildOptions.Builder, + com.google.appengine.v1.CloudBuildOptionsOrBuilder> + getCloudBuildOptionsFieldBuilder() { + if (cloudBuildOptionsBuilder_ == null) { + cloudBuildOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CloudBuildOptions, + com.google.appengine.v1.CloudBuildOptions.Builder, + com.google.appengine.v1.CloudBuildOptionsOrBuilder>( + getCloudBuildOptions(), getParentForChildren(), isClean()); + cloudBuildOptions_ = null; + } + return cloudBuildOptionsBuilder_; + } + + @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.appengine.v1.Deployment) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Deployment) + private static final com.google.appengine.v1.Deployment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Deployment(); + } + + public static com.google.appengine.v1.Deployment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Deployment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Deployment(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.appengine.v1.Deployment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeploymentOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeploymentOrBuilder.java new file mode 100644 index 00000000..4085d8f2 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DeploymentOrBuilder.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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +public interface DeploymentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Deployment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Manifest of the files stored in Google Cloud Storage that are included
+   * as part of this version. All files must be readable using the
+   * credentials supplied with this call.
+   * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + int getFilesCount(); + /** + * + * + *
+   * Manifest of the files stored in Google Cloud Storage that are included
+   * as part of this version. All files must be readable using the
+   * credentials supplied with this call.
+   * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + boolean containsFiles(java.lang.String key); + /** Use {@link #getFilesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getFiles(); + /** + * + * + *
+   * Manifest of the files stored in Google Cloud Storage that are included
+   * as part of this version. All files must be readable using the
+   * credentials supplied with this call.
+   * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + java.util.Map getFilesMap(); + /** + * + * + *
+   * Manifest of the files stored in Google Cloud Storage that are included
+   * as part of this version. All files must be readable using the
+   * credentials supplied with this call.
+   * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + com.google.appengine.v1.FileInfo getFilesOrDefault( + java.lang.String key, com.google.appengine.v1.FileInfo defaultValue); + /** + * + * + *
+   * Manifest of the files stored in Google Cloud Storage that are included
+   * as part of this version. All files must be readable using the
+   * credentials supplied with this call.
+   * 
+ * + * map<string, .google.appengine.v1.FileInfo> files = 1; + */ + com.google.appengine.v1.FileInfo getFilesOrThrow(java.lang.String key); + + /** + * + * + *
+   * The Docker image for the container that runs the version.
+   * Only applicable for instances running in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + * + * @return Whether the container field is set. + */ + boolean hasContainer(); + /** + * + * + *
+   * The Docker image for the container that runs the version.
+   * Only applicable for instances running in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + * + * @return The container. + */ + com.google.appengine.v1.ContainerInfo getContainer(); + /** + * + * + *
+   * The Docker image for the container that runs the version.
+   * Only applicable for instances running in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.ContainerInfo container = 2; + */ + com.google.appengine.v1.ContainerInfoOrBuilder getContainerOrBuilder(); + + /** + * + * + *
+   * The zip file for this deployment, if this is a zip deployment.
+   * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + * + * @return Whether the zip field is set. + */ + boolean hasZip(); + /** + * + * + *
+   * The zip file for this deployment, if this is a zip deployment.
+   * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + * + * @return The zip. + */ + com.google.appengine.v1.ZipInfo getZip(); + /** + * + * + *
+   * The zip file for this deployment, if this is a zip deployment.
+   * 
+ * + * .google.appengine.v1.ZipInfo zip = 3; + */ + com.google.appengine.v1.ZipInfoOrBuilder getZipOrBuilder(); + + /** + * + * + *
+   * Options for any Google Cloud Build builds created as a part of this
+   * deployment.
+   * These options will only be used if a new build is created, such as when
+   * deploying to the App Engine flexible environment using files or zip.
+   * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + * + * @return Whether the cloudBuildOptions field is set. + */ + boolean hasCloudBuildOptions(); + /** + * + * + *
+   * Options for any Google Cloud Build builds created as a part of this
+   * deployment.
+   * These options will only be used if a new build is created, such as when
+   * deploying to the App Engine flexible environment using files or zip.
+   * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + * + * @return The cloudBuildOptions. + */ + com.google.appengine.v1.CloudBuildOptions getCloudBuildOptions(); + /** + * + * + *
+   * Options for any Google Cloud Build builds created as a part of this
+   * deployment.
+   * These options will only be used if a new build is created, such as when
+   * deploying to the App Engine flexible environment using files or zip.
+   * 
+ * + * .google.appengine.v1.CloudBuildOptions cloud_build_options = 6; + */ + com.google.appengine.v1.CloudBuildOptionsOrBuilder getCloudBuildOptionsOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DiskUtilization.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DiskUtilization.java new file mode 100644 index 00000000..5a1dbe52 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DiskUtilization.java @@ -0,0 +1,816 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Target scaling by disk usage.
+ * Only applicable in the App Engine flexible environment.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.DiskUtilization} + */ +public final class DiskUtilization extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.DiskUtilization) + DiskUtilizationOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiskUtilization.newBuilder() to construct. + private DiskUtilization(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiskUtilization() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiskUtilization(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DiskUtilization( + 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 112: + { + targetWriteBytesPerSecond_ = input.readInt32(); + break; + } + case 120: + { + targetWriteOpsPerSecond_ = input.readInt32(); + break; + } + case 128: + { + targetReadBytesPerSecond_ = input.readInt32(); + break; + } + case 136: + { + targetReadOpsPerSecond_ = input.readInt32(); + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_DiskUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_DiskUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DiskUtilization.class, + com.google.appengine.v1.DiskUtilization.Builder.class); + } + + public static final int TARGET_WRITE_BYTES_PER_SECOND_FIELD_NUMBER = 14; + private int targetWriteBytesPerSecond_; + /** + * + * + *
+   * Target bytes written per second.
+   * 
+ * + * int32 target_write_bytes_per_second = 14; + * + * @return The targetWriteBytesPerSecond. + */ + @java.lang.Override + public int getTargetWriteBytesPerSecond() { + return targetWriteBytesPerSecond_; + } + + public static final int TARGET_WRITE_OPS_PER_SECOND_FIELD_NUMBER = 15; + private int targetWriteOpsPerSecond_; + /** + * + * + *
+   * Target ops written per second.
+   * 
+ * + * int32 target_write_ops_per_second = 15; + * + * @return The targetWriteOpsPerSecond. + */ + @java.lang.Override + public int getTargetWriteOpsPerSecond() { + return targetWriteOpsPerSecond_; + } + + public static final int TARGET_READ_BYTES_PER_SECOND_FIELD_NUMBER = 16; + private int targetReadBytesPerSecond_; + /** + * + * + *
+   * Target bytes read per second.
+   * 
+ * + * int32 target_read_bytes_per_second = 16; + * + * @return The targetReadBytesPerSecond. + */ + @java.lang.Override + public int getTargetReadBytesPerSecond() { + return targetReadBytesPerSecond_; + } + + public static final int TARGET_READ_OPS_PER_SECOND_FIELD_NUMBER = 17; + private int targetReadOpsPerSecond_; + /** + * + * + *
+   * Target ops read per seconds.
+   * 
+ * + * int32 target_read_ops_per_second = 17; + * + * @return The targetReadOpsPerSecond. + */ + @java.lang.Override + public int getTargetReadOpsPerSecond() { + return targetReadOpsPerSecond_; + } + + 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 (targetWriteBytesPerSecond_ != 0) { + output.writeInt32(14, targetWriteBytesPerSecond_); + } + if (targetWriteOpsPerSecond_ != 0) { + output.writeInt32(15, targetWriteOpsPerSecond_); + } + if (targetReadBytesPerSecond_ != 0) { + output.writeInt32(16, targetReadBytesPerSecond_); + } + if (targetReadOpsPerSecond_ != 0) { + output.writeInt32(17, targetReadOpsPerSecond_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetWriteBytesPerSecond_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(14, targetWriteBytesPerSecond_); + } + if (targetWriteOpsPerSecond_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(15, targetWriteOpsPerSecond_); + } + if (targetReadBytesPerSecond_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(16, targetReadBytesPerSecond_); + } + if (targetReadOpsPerSecond_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(17, targetReadOpsPerSecond_); + } + 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.appengine.v1.DiskUtilization)) { + return super.equals(obj); + } + com.google.appengine.v1.DiskUtilization other = (com.google.appengine.v1.DiskUtilization) obj; + + if (getTargetWriteBytesPerSecond() != other.getTargetWriteBytesPerSecond()) return false; + if (getTargetWriteOpsPerSecond() != other.getTargetWriteOpsPerSecond()) return false; + if (getTargetReadBytesPerSecond() != other.getTargetReadBytesPerSecond()) return false; + if (getTargetReadOpsPerSecond() != other.getTargetReadOpsPerSecond()) 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_WRITE_BYTES_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + getTargetWriteBytesPerSecond(); + hash = (37 * hash) + TARGET_WRITE_OPS_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + getTargetWriteOpsPerSecond(); + hash = (37 * hash) + TARGET_READ_BYTES_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + getTargetReadBytesPerSecond(); + hash = (37 * hash) + TARGET_READ_OPS_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + getTargetReadOpsPerSecond(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.DiskUtilization parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DiskUtilization parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DiskUtilization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DiskUtilization 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.appengine.v1.DiskUtilization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DiskUtilization parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DiskUtilization parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DiskUtilization 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.appengine.v1.DiskUtilization parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DiskUtilization 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.appengine.v1.DiskUtilization parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DiskUtilization 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.appengine.v1.DiskUtilization 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; + } + /** + * + * + *
+   * Target scaling by disk usage.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.DiskUtilization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.DiskUtilization) + com.google.appengine.v1.DiskUtilizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_DiskUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_DiskUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DiskUtilization.class, + com.google.appengine.v1.DiskUtilization.Builder.class); + } + + // Construct using com.google.appengine.v1.DiskUtilization.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(); + targetWriteBytesPerSecond_ = 0; + + targetWriteOpsPerSecond_ = 0; + + targetReadBytesPerSecond_ = 0; + + targetReadOpsPerSecond_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_DiskUtilization_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.DiskUtilization getDefaultInstanceForType() { + return com.google.appengine.v1.DiskUtilization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.DiskUtilization build() { + com.google.appengine.v1.DiskUtilization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.DiskUtilization buildPartial() { + com.google.appengine.v1.DiskUtilization result = + new com.google.appengine.v1.DiskUtilization(this); + result.targetWriteBytesPerSecond_ = targetWriteBytesPerSecond_; + result.targetWriteOpsPerSecond_ = targetWriteOpsPerSecond_; + result.targetReadBytesPerSecond_ = targetReadBytesPerSecond_; + result.targetReadOpsPerSecond_ = targetReadOpsPerSecond_; + 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.appengine.v1.DiskUtilization) { + return mergeFrom((com.google.appengine.v1.DiskUtilization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.DiskUtilization other) { + if (other == com.google.appengine.v1.DiskUtilization.getDefaultInstance()) return this; + if (other.getTargetWriteBytesPerSecond() != 0) { + setTargetWriteBytesPerSecond(other.getTargetWriteBytesPerSecond()); + } + if (other.getTargetWriteOpsPerSecond() != 0) { + setTargetWriteOpsPerSecond(other.getTargetWriteOpsPerSecond()); + } + if (other.getTargetReadBytesPerSecond() != 0) { + setTargetReadBytesPerSecond(other.getTargetReadBytesPerSecond()); + } + if (other.getTargetReadOpsPerSecond() != 0) { + setTargetReadOpsPerSecond(other.getTargetReadOpsPerSecond()); + } + 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.appengine.v1.DiskUtilization parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.DiskUtilization) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int targetWriteBytesPerSecond_; + /** + * + * + *
+     * Target bytes written per second.
+     * 
+ * + * int32 target_write_bytes_per_second = 14; + * + * @return The targetWriteBytesPerSecond. + */ + @java.lang.Override + public int getTargetWriteBytesPerSecond() { + return targetWriteBytesPerSecond_; + } + /** + * + * + *
+     * Target bytes written per second.
+     * 
+ * + * int32 target_write_bytes_per_second = 14; + * + * @param value The targetWriteBytesPerSecond to set. + * @return This builder for chaining. + */ + public Builder setTargetWriteBytesPerSecond(int value) { + + targetWriteBytesPerSecond_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target bytes written per second.
+     * 
+ * + * int32 target_write_bytes_per_second = 14; + * + * @return This builder for chaining. + */ + public Builder clearTargetWriteBytesPerSecond() { + + targetWriteBytesPerSecond_ = 0; + onChanged(); + return this; + } + + private int targetWriteOpsPerSecond_; + /** + * + * + *
+     * Target ops written per second.
+     * 
+ * + * int32 target_write_ops_per_second = 15; + * + * @return The targetWriteOpsPerSecond. + */ + @java.lang.Override + public int getTargetWriteOpsPerSecond() { + return targetWriteOpsPerSecond_; + } + /** + * + * + *
+     * Target ops written per second.
+     * 
+ * + * int32 target_write_ops_per_second = 15; + * + * @param value The targetWriteOpsPerSecond to set. + * @return This builder for chaining. + */ + public Builder setTargetWriteOpsPerSecond(int value) { + + targetWriteOpsPerSecond_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target ops written per second.
+     * 
+ * + * int32 target_write_ops_per_second = 15; + * + * @return This builder for chaining. + */ + public Builder clearTargetWriteOpsPerSecond() { + + targetWriteOpsPerSecond_ = 0; + onChanged(); + return this; + } + + private int targetReadBytesPerSecond_; + /** + * + * + *
+     * Target bytes read per second.
+     * 
+ * + * int32 target_read_bytes_per_second = 16; + * + * @return The targetReadBytesPerSecond. + */ + @java.lang.Override + public int getTargetReadBytesPerSecond() { + return targetReadBytesPerSecond_; + } + /** + * + * + *
+     * Target bytes read per second.
+     * 
+ * + * int32 target_read_bytes_per_second = 16; + * + * @param value The targetReadBytesPerSecond to set. + * @return This builder for chaining. + */ + public Builder setTargetReadBytesPerSecond(int value) { + + targetReadBytesPerSecond_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target bytes read per second.
+     * 
+ * + * int32 target_read_bytes_per_second = 16; + * + * @return This builder for chaining. + */ + public Builder clearTargetReadBytesPerSecond() { + + targetReadBytesPerSecond_ = 0; + onChanged(); + return this; + } + + private int targetReadOpsPerSecond_; + /** + * + * + *
+     * Target ops read per seconds.
+     * 
+ * + * int32 target_read_ops_per_second = 17; + * + * @return The targetReadOpsPerSecond. + */ + @java.lang.Override + public int getTargetReadOpsPerSecond() { + return targetReadOpsPerSecond_; + } + /** + * + * + *
+     * Target ops read per seconds.
+     * 
+ * + * int32 target_read_ops_per_second = 17; + * + * @param value The targetReadOpsPerSecond to set. + * @return This builder for chaining. + */ + public Builder setTargetReadOpsPerSecond(int value) { + + targetReadOpsPerSecond_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target ops read per seconds.
+     * 
+ * + * int32 target_read_ops_per_second = 17; + * + * @return This builder for chaining. + */ + public Builder clearTargetReadOpsPerSecond() { + + targetReadOpsPerSecond_ = 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.appengine.v1.DiskUtilization) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.DiskUtilization) + private static final com.google.appengine.v1.DiskUtilization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.DiskUtilization(); + } + + public static com.google.appengine.v1.DiskUtilization getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskUtilization parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiskUtilization(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.appengine.v1.DiskUtilization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DiskUtilizationOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DiskUtilizationOrBuilder.java new file mode 100644 index 00000000..8047a06d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DiskUtilizationOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface DiskUtilizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.DiskUtilization) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target bytes written per second.
+   * 
+ * + * int32 target_write_bytes_per_second = 14; + * + * @return The targetWriteBytesPerSecond. + */ + int getTargetWriteBytesPerSecond(); + + /** + * + * + *
+   * Target ops written per second.
+   * 
+ * + * int32 target_write_ops_per_second = 15; + * + * @return The targetWriteOpsPerSecond. + */ + int getTargetWriteOpsPerSecond(); + + /** + * + * + *
+   * Target bytes read per second.
+   * 
+ * + * int32 target_read_bytes_per_second = 16; + * + * @return The targetReadBytesPerSecond. + */ + int getTargetReadBytesPerSecond(); + + /** + * + * + *
+   * Target ops read per seconds.
+   * 
+ * + * int32 target_read_ops_per_second = 17; + * + * @return The targetReadOpsPerSecond. + */ + int getTargetReadOpsPerSecond(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMapping.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMapping.java new file mode 100644 index 00000000..cba4584e --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMapping.java @@ -0,0 +1,1688 @@ +/* + * 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/appengine/v1/domain_mapping.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * A domain serving an App Engine application.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.DomainMapping} + */ +public final class DomainMapping extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.DomainMapping) + DomainMappingOrBuilder { + private static final long serialVersionUID = 0L; + // Use DomainMapping.newBuilder() to construct. + private DomainMapping(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DomainMapping() { + name_ = ""; + id_ = ""; + resourceRecords_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DomainMapping(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DomainMapping( + 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(); + + id_ = s; + break; + } + case 26: + { + com.google.appengine.v1.SslSettings.Builder subBuilder = null; + if (sslSettings_ != null) { + subBuilder = sslSettings_.toBuilder(); + } + sslSettings_ = + input.readMessage( + com.google.appengine.v1.SslSettings.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sslSettings_); + sslSettings_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resourceRecords_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + resourceRecords_.add( + input.readMessage( + com.google.appengine.v1.ResourceRecord.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)) { + resourceRecords_ = java.util.Collections.unmodifiableList(resourceRecords_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_DomainMapping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_DomainMapping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DomainMapping.class, + com.google.appengine.v1.DomainMapping.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Full path to the `DomainMapping` resource in the API. Example:
+   * `apps/myapp/domainMapping/example.com`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Full path to the `DomainMapping` resource in the API. Example:
+   * `apps/myapp/domainMapping/example.com`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Relative name of the domain serving the application. Example:
+   * `example.com`.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Relative name of the domain serving the application. Example:
+   * `example.com`.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SSL_SETTINGS_FIELD_NUMBER = 3; + private com.google.appengine.v1.SslSettings sslSettings_; + /** + * + * + *
+   * SSL configuration for this domain. If unconfigured, this domain will not
+   * serve with SSL.
+   * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + * + * @return Whether the sslSettings field is set. + */ + @java.lang.Override + public boolean hasSslSettings() { + return sslSettings_ != null; + } + /** + * + * + *
+   * SSL configuration for this domain. If unconfigured, this domain will not
+   * serve with SSL.
+   * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + * + * @return The sslSettings. + */ + @java.lang.Override + public com.google.appengine.v1.SslSettings getSslSettings() { + return sslSettings_ == null + ? com.google.appengine.v1.SslSettings.getDefaultInstance() + : sslSettings_; + } + /** + * + * + *
+   * SSL configuration for this domain. If unconfigured, this domain will not
+   * serve with SSL.
+   * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + */ + @java.lang.Override + public com.google.appengine.v1.SslSettingsOrBuilder getSslSettingsOrBuilder() { + return getSslSettings(); + } + + public static final int RESOURCE_RECORDS_FIELD_NUMBER = 4; + private java.util.List resourceRecords_; + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + @java.lang.Override + public java.util.List getResourceRecordsList() { + return resourceRecords_; + } + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + @java.lang.Override + public java.util.List + getResourceRecordsOrBuilderList() { + return resourceRecords_; + } + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + @java.lang.Override + public int getResourceRecordsCount() { + return resourceRecords_.size(); + } + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + @java.lang.Override + public com.google.appengine.v1.ResourceRecord getResourceRecords(int index) { + return resourceRecords_.get(index); + } + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + @java.lang.Override + public com.google.appengine.v1.ResourceRecordOrBuilder getResourceRecordsOrBuilder(int index) { + return resourceRecords_.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (sslSettings_ != null) { + output.writeMessage(3, getSslSettings()); + } + for (int i = 0; i < resourceRecords_.size(); i++) { + output.writeMessage(4, resourceRecords_.get(i)); + } + 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 (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (sslSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSslSettings()); + } + for (int i = 0; i < resourceRecords_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, resourceRecords_.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.appengine.v1.DomainMapping)) { + return super.equals(obj); + } + com.google.appengine.v1.DomainMapping other = (com.google.appengine.v1.DomainMapping) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; + if (hasSslSettings() != other.hasSslSettings()) return false; + if (hasSslSettings()) { + if (!getSslSettings().equals(other.getSslSettings())) return false; + } + if (!getResourceRecordsList().equals(other.getResourceRecordsList())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasSslSettings()) { + hash = (37 * hash) + SSL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSslSettings().hashCode(); + } + if (getResourceRecordsCount() > 0) { + hash = (37 * hash) + RESOURCE_RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getResourceRecordsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.DomainMapping parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DomainMapping parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DomainMapping parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DomainMapping 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.appengine.v1.DomainMapping parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.DomainMapping parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.DomainMapping parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DomainMapping 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.appengine.v1.DomainMapping parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DomainMapping 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.appengine.v1.DomainMapping parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.DomainMapping 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.appengine.v1.DomainMapping 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 domain serving an App Engine application.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.DomainMapping} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.DomainMapping) + com.google.appengine.v1.DomainMappingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_DomainMapping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_DomainMapping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.DomainMapping.class, + com.google.appengine.v1.DomainMapping.Builder.class); + } + + // Construct using com.google.appengine.v1.DomainMapping.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourceRecordsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + id_ = ""; + + if (sslSettingsBuilder_ == null) { + sslSettings_ = null; + } else { + sslSettings_ = null; + sslSettingsBuilder_ = null; + } + if (resourceRecordsBuilder_ == null) { + resourceRecords_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resourceRecordsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_DomainMapping_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.DomainMapping getDefaultInstanceForType() { + return com.google.appengine.v1.DomainMapping.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.DomainMapping build() { + com.google.appengine.v1.DomainMapping result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.DomainMapping buildPartial() { + com.google.appengine.v1.DomainMapping result = + new com.google.appengine.v1.DomainMapping(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.id_ = id_; + if (sslSettingsBuilder_ == null) { + result.sslSettings_ = sslSettings_; + } else { + result.sslSettings_ = sslSettingsBuilder_.build(); + } + if (resourceRecordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resourceRecords_ = java.util.Collections.unmodifiableList(resourceRecords_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceRecords_ = resourceRecords_; + } else { + result.resourceRecords_ = resourceRecordsBuilder_.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.appengine.v1.DomainMapping) { + return mergeFrom((com.google.appengine.v1.DomainMapping) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.DomainMapping other) { + if (other == com.google.appengine.v1.DomainMapping.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.hasSslSettings()) { + mergeSslSettings(other.getSslSettings()); + } + if (resourceRecordsBuilder_ == null) { + if (!other.resourceRecords_.isEmpty()) { + if (resourceRecords_.isEmpty()) { + resourceRecords_ = other.resourceRecords_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceRecordsIsMutable(); + resourceRecords_.addAll(other.resourceRecords_); + } + onChanged(); + } + } else { + if (!other.resourceRecords_.isEmpty()) { + if (resourceRecordsBuilder_.isEmpty()) { + resourceRecordsBuilder_.dispose(); + resourceRecordsBuilder_ = null; + resourceRecords_ = other.resourceRecords_; + bitField0_ = (bitField0_ & ~0x00000001); + resourceRecordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourceRecordsFieldBuilder() + : null; + } else { + resourceRecordsBuilder_.addAllMessages(other.resourceRecords_); + } + } + } + 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.appengine.v1.DomainMapping parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.DomainMapping) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Full path to the `DomainMapping` resource in the API. Example:
+     * `apps/myapp/domainMapping/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Full path to the `DomainMapping` resource in the API. Example:
+     * `apps/myapp/domainMapping/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Full path to the `DomainMapping` resource in the API. Example:
+     * `apps/myapp/domainMapping/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the `DomainMapping` resource in the API. Example:
+     * `apps/myapp/domainMapping/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the `DomainMapping` resource in the API. Example:
+     * `apps/myapp/domainMapping/example.com`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Relative name of the domain serving the application. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Relative name of the domain serving the application. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Relative name of the domain serving the application. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the domain serving the application. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the domain serving the application. Example:
+     * `example.com`.
+     * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.SslSettings sslSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.SslSettings, + com.google.appengine.v1.SslSettings.Builder, + com.google.appengine.v1.SslSettingsOrBuilder> + sslSettingsBuilder_; + /** + * + * + *
+     * SSL configuration for this domain. If unconfigured, this domain will not
+     * serve with SSL.
+     * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + * + * @return Whether the sslSettings field is set. + */ + public boolean hasSslSettings() { + return sslSettingsBuilder_ != null || sslSettings_ != null; + } + /** + * + * + *
+     * SSL configuration for this domain. If unconfigured, this domain will not
+     * serve with SSL.
+     * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + * + * @return The sslSettings. + */ + public com.google.appengine.v1.SslSettings getSslSettings() { + if (sslSettingsBuilder_ == null) { + return sslSettings_ == null + ? com.google.appengine.v1.SslSettings.getDefaultInstance() + : sslSettings_; + } else { + return sslSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * SSL configuration for this domain. If unconfigured, this domain will not
+     * serve with SSL.
+     * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + */ + public Builder setSslSettings(com.google.appengine.v1.SslSettings value) { + if (sslSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sslSettings_ = value; + onChanged(); + } else { + sslSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * SSL configuration for this domain. If unconfigured, this domain will not
+     * serve with SSL.
+     * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + */ + public Builder setSslSettings(com.google.appengine.v1.SslSettings.Builder builderForValue) { + if (sslSettingsBuilder_ == null) { + sslSettings_ = builderForValue.build(); + onChanged(); + } else { + sslSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * SSL configuration for this domain. If unconfigured, this domain will not
+     * serve with SSL.
+     * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + */ + public Builder mergeSslSettings(com.google.appengine.v1.SslSettings value) { + if (sslSettingsBuilder_ == null) { + if (sslSettings_ != null) { + sslSettings_ = + com.google.appengine.v1.SslSettings.newBuilder(sslSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + sslSettings_ = value; + } + onChanged(); + } else { + sslSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * SSL configuration for this domain. If unconfigured, this domain will not
+     * serve with SSL.
+     * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + */ + public Builder clearSslSettings() { + if (sslSettingsBuilder_ == null) { + sslSettings_ = null; + onChanged(); + } else { + sslSettings_ = null; + sslSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * SSL configuration for this domain. If unconfigured, this domain will not
+     * serve with SSL.
+     * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + */ + public com.google.appengine.v1.SslSettings.Builder getSslSettingsBuilder() { + + onChanged(); + return getSslSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * SSL configuration for this domain. If unconfigured, this domain will not
+     * serve with SSL.
+     * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + */ + public com.google.appengine.v1.SslSettingsOrBuilder getSslSettingsOrBuilder() { + if (sslSettingsBuilder_ != null) { + return sslSettingsBuilder_.getMessageOrBuilder(); + } else { + return sslSettings_ == null + ? com.google.appengine.v1.SslSettings.getDefaultInstance() + : sslSettings_; + } + } + /** + * + * + *
+     * SSL configuration for this domain. If unconfigured, this domain will not
+     * serve with SSL.
+     * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.SslSettings, + com.google.appengine.v1.SslSettings.Builder, + com.google.appengine.v1.SslSettingsOrBuilder> + getSslSettingsFieldBuilder() { + if (sslSettingsBuilder_ == null) { + sslSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.SslSettings, + com.google.appengine.v1.SslSettings.Builder, + com.google.appengine.v1.SslSettingsOrBuilder>( + getSslSettings(), getParentForChildren(), isClean()); + sslSettings_ = null; + } + return sslSettingsBuilder_; + } + + private java.util.List resourceRecords_ = + java.util.Collections.emptyList(); + + private void ensureResourceRecordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceRecords_ = + new java.util.ArrayList(resourceRecords_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.ResourceRecord, + com.google.appengine.v1.ResourceRecord.Builder, + com.google.appengine.v1.ResourceRecordOrBuilder> + resourceRecordsBuilder_; + + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public java.util.List getResourceRecordsList() { + if (resourceRecordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceRecords_); + } else { + return resourceRecordsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public int getResourceRecordsCount() { + if (resourceRecordsBuilder_ == null) { + return resourceRecords_.size(); + } else { + return resourceRecordsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public com.google.appengine.v1.ResourceRecord getResourceRecords(int index) { + if (resourceRecordsBuilder_ == null) { + return resourceRecords_.get(index); + } else { + return resourceRecordsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public Builder setResourceRecords(int index, com.google.appengine.v1.ResourceRecord value) { + if (resourceRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceRecordsIsMutable(); + resourceRecords_.set(index, value); + onChanged(); + } else { + resourceRecordsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public Builder setResourceRecords( + int index, com.google.appengine.v1.ResourceRecord.Builder builderForValue) { + if (resourceRecordsBuilder_ == null) { + ensureResourceRecordsIsMutable(); + resourceRecords_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceRecordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public Builder addResourceRecords(com.google.appengine.v1.ResourceRecord value) { + if (resourceRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceRecordsIsMutable(); + resourceRecords_.add(value); + onChanged(); + } else { + resourceRecordsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public Builder addResourceRecords(int index, com.google.appengine.v1.ResourceRecord value) { + if (resourceRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceRecordsIsMutable(); + resourceRecords_.add(index, value); + onChanged(); + } else { + resourceRecordsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public Builder addResourceRecords( + com.google.appengine.v1.ResourceRecord.Builder builderForValue) { + if (resourceRecordsBuilder_ == null) { + ensureResourceRecordsIsMutable(); + resourceRecords_.add(builderForValue.build()); + onChanged(); + } else { + resourceRecordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public Builder addResourceRecords( + int index, com.google.appengine.v1.ResourceRecord.Builder builderForValue) { + if (resourceRecordsBuilder_ == null) { + ensureResourceRecordsIsMutable(); + resourceRecords_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceRecordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public Builder addAllResourceRecords( + java.lang.Iterable values) { + if (resourceRecordsBuilder_ == null) { + ensureResourceRecordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceRecords_); + onChanged(); + } else { + resourceRecordsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public Builder clearResourceRecords() { + if (resourceRecordsBuilder_ == null) { + resourceRecords_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourceRecordsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public Builder removeResourceRecords(int index) { + if (resourceRecordsBuilder_ == null) { + ensureResourceRecordsIsMutable(); + resourceRecords_.remove(index); + onChanged(); + } else { + resourceRecordsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public com.google.appengine.v1.ResourceRecord.Builder getResourceRecordsBuilder(int index) { + return getResourceRecordsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public com.google.appengine.v1.ResourceRecordOrBuilder getResourceRecordsOrBuilder(int index) { + if (resourceRecordsBuilder_ == null) { + return resourceRecords_.get(index); + } else { + return resourceRecordsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public java.util.List + getResourceRecordsOrBuilderList() { + if (resourceRecordsBuilder_ != null) { + return resourceRecordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceRecords_); + } + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public com.google.appengine.v1.ResourceRecord.Builder addResourceRecordsBuilder() { + return getResourceRecordsFieldBuilder() + .addBuilder(com.google.appengine.v1.ResourceRecord.getDefaultInstance()); + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public com.google.appengine.v1.ResourceRecord.Builder addResourceRecordsBuilder(int index) { + return getResourceRecordsFieldBuilder() + .addBuilder(index, com.google.appengine.v1.ResourceRecord.getDefaultInstance()); + } + /** + * + * + *
+     * The resource records required to configure this domain mapping. These
+     * records must be added to the domain's DNS configuration in order to
+     * serve the application via this domain mapping.
+     * @OutputOnly
+     * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + public java.util.List + getResourceRecordsBuilderList() { + return getResourceRecordsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.ResourceRecord, + com.google.appengine.v1.ResourceRecord.Builder, + com.google.appengine.v1.ResourceRecordOrBuilder> + getResourceRecordsFieldBuilder() { + if (resourceRecordsBuilder_ == null) { + resourceRecordsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.ResourceRecord, + com.google.appengine.v1.ResourceRecord.Builder, + com.google.appengine.v1.ResourceRecordOrBuilder>( + resourceRecords_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + resourceRecords_ = null; + } + return resourceRecordsBuilder_; + } + + @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.appengine.v1.DomainMapping) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.DomainMapping) + private static final com.google.appengine.v1.DomainMapping DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.DomainMapping(); + } + + public static com.google.appengine.v1.DomainMapping getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DomainMapping parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DomainMapping(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.appengine.v1.DomainMapping getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingOrBuilder.java new file mode 100644 index 00000000..3716dfc1 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingOrBuilder.java @@ -0,0 +1,186 @@ +/* + * 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/appengine/v1/domain_mapping.proto + +package com.google.appengine.v1; + +public interface DomainMappingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.DomainMapping) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Full path to the `DomainMapping` resource in the API. Example:
+   * `apps/myapp/domainMapping/example.com`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Full path to the `DomainMapping` resource in the API. Example:
+   * `apps/myapp/domainMapping/example.com`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Relative name of the domain serving the application. Example:
+   * `example.com`.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Relative name of the domain serving the application. Example:
+   * `example.com`.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * SSL configuration for this domain. If unconfigured, this domain will not
+   * serve with SSL.
+   * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + * + * @return Whether the sslSettings field is set. + */ + boolean hasSslSettings(); + /** + * + * + *
+   * SSL configuration for this domain. If unconfigured, this domain will not
+   * serve with SSL.
+   * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + * + * @return The sslSettings. + */ + com.google.appengine.v1.SslSettings getSslSettings(); + /** + * + * + *
+   * SSL configuration for this domain. If unconfigured, this domain will not
+   * serve with SSL.
+   * 
+ * + * .google.appengine.v1.SslSettings ssl_settings = 3; + */ + com.google.appengine.v1.SslSettingsOrBuilder getSslSettingsOrBuilder(); + + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + java.util.List getResourceRecordsList(); + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + com.google.appengine.v1.ResourceRecord getResourceRecords(int index); + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + int getResourceRecordsCount(); + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + java.util.List + getResourceRecordsOrBuilderList(); + /** + * + * + *
+   * The resource records required to configure this domain mapping. These
+   * records must be added to the domain's DNS configuration in order to
+   * serve the application via this domain mapping.
+   * @OutputOnly
+   * 
+ * + * repeated .google.appengine.v1.ResourceRecord resource_records = 4; + */ + com.google.appengine.v1.ResourceRecordOrBuilder getResourceRecordsOrBuilder(int index); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingProto.java new file mode 100644 index 00000000..239908d7 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainMappingProto.java @@ -0,0 +1,109 @@ +/* + * 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/appengine/v1/domain_mapping.proto + +package com.google.appengine.v1; + +public final class DomainMappingProto { + private DomainMappingProto() {} + + 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_appengine_v1_DomainMapping_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_DomainMapping_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_SslSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_SslSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_ResourceRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ResourceRecord_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/appengine/v1/domain_mapping.pro" + + "to\022\023google.appengine.v1\032\034google/api/anno" + + "tations.proto\"\240\001\n\rDomainMapping\022\014\n\004name\030" + + "\001 \001(\t\022\n\n\002id\030\002 \001(\t\0226\n\014ssl_settings\030\003 \001(\0132" + + " .google.appengine.v1.SslSettings\022=\n\020res" + + "ource_records\030\004 \003(\0132#.google.appengine.v" + + "1.ResourceRecord\"\363\001\n\013SslSettings\022\026\n\016cert" + + "ificate_id\030\001 \001(\t\022O\n\023ssl_management_type\030" + + "\003 \001(\01622.google.appengine.v1.SslSettings." + + "SslManagementType\022&\n\036pending_managed_cer" + + "tificate_id\030\004 \001(\t\"S\n\021SslManagementType\022#" + + "\n\037SSL_MANAGEMENT_TYPE_UNSPECIFIED\020\000\022\r\n\tA" + + "UTOMATIC\020\001\022\n\n\006MANUAL\020\002\"\263\001\n\016ResourceRecor" + + "d\022\014\n\004name\030\001 \001(\t\022\016\n\006rrdata\030\002 \001(\t\022<\n\004type\030" + + "\003 \001(\0162..google.appengine.v1.ResourceReco" + + "rd.RecordType\"E\n\nRecordType\022\033\n\027RECORD_TY" + + "PE_UNSPECIFIED\020\000\022\005\n\001A\020\001\022\010\n\004AAAA\020\002\022\t\n\005CNA" + + "ME\020\003B\304\001\n\027com.google.appengine.v1B\022Domain" + + "MappingProtoP\001Z + * Override strategy for mutating an existing mapping. + * + * + * Protobuf enum {@code google.appengine.v1.DomainOverrideStrategy} + */ +public enum DomainOverrideStrategy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Strategy unspecified. Defaults to `STRICT`.
+   * 
+ * + * UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY = 0; + */ + UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY(0), + /** + * + * + *
+   * Overrides not allowed. If a mapping already exists for the
+   * specified domain, the request will return an ALREADY_EXISTS (409).
+   * 
+ * + * STRICT = 1; + */ + STRICT(1), + /** + * + * + *
+   * Overrides allowed. If a mapping already exists for the specified domain,
+   * the request will overwrite it. Note that this might stop another
+   * Google product from serving. For example, if the domain is
+   * mapped to another App Engine application, that app will no
+   * longer serve from that domain.
+   * 
+ * + * OVERRIDE = 2; + */ + OVERRIDE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Strategy unspecified. Defaults to `STRICT`.
+   * 
+ * + * UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY = 0; + */ + public static final int UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY_VALUE = 0; + /** + * + * + *
+   * Overrides not allowed. If a mapping already exists for the
+   * specified domain, the request will return an ALREADY_EXISTS (409).
+   * 
+ * + * STRICT = 1; + */ + public static final int STRICT_VALUE = 1; + /** + * + * + *
+   * Overrides allowed. If a mapping already exists for the specified domain,
+   * the request will overwrite it. Note that this might stop another
+   * Google product from serving. For example, if the domain is
+   * mapped to another App Engine application, that app will no
+   * longer serve from that domain.
+   * 
+ * + * OVERRIDE = 2; + */ + public static final int OVERRIDE_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 DomainOverrideStrategy 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 DomainOverrideStrategy forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY; + case 1: + return STRICT; + case 2: + return OVERRIDE; + 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 DomainOverrideStrategy findValueByNumber(int number) { + return DomainOverrideStrategy.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.appengine.v1.AppengineProto.getDescriptor().getEnumTypes().get(2); + } + + private static final DomainOverrideStrategy[] VALUES = values(); + + public static DomainOverrideStrategy 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 DomainOverrideStrategy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.DomainOverrideStrategy) +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainProto.java new file mode 100644 index 00000000..ce651166 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/DomainProto.java @@ -0,0 +1,71 @@ +/* + * 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/appengine/v1/domain.proto + +package com.google.appengine.v1; + +public final class DomainProto { + private DomainProto() {} + + 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_appengine_v1_AuthorizedDomain_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_AuthorizedDomain_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/appengine/v1/domain.proto\022\023goog" + + "le.appengine.v1\032\034google/api/annotations." + + "proto\",\n\020AuthorizedDomain\022\014\n\004name\030\001 \001(\t\022" + + "\n\n\002id\030\002 \001(\tB\275\001\n\027com.google.appengine.v1B" + + "\013DomainProtoP\001Z + * [Cloud Endpoints](https://cloud.google.com/endpoints) configuration. + * The Endpoints API Service provides tooling for serving Open API and gRPC + * endpoints via an NGINX proxy. Only valid for App Engine Flexible environment + * deployments. + * The fields here refer to the name and configuration ID of a "service" + * resource in the [Service Management API](https://cloud.google.com/service-management/overview). + * + * + * Protobuf type {@code google.appengine.v1.EndpointsApiService} + */ +public final class EndpointsApiService extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.EndpointsApiService) + EndpointsApiServiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use EndpointsApiService.newBuilder() to construct. + private EndpointsApiService(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndpointsApiService() { + name_ = ""; + configId_ = ""; + rolloutStrategy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EndpointsApiService(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EndpointsApiService( + 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; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + configId_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + rolloutStrategy_ = rawValue; + break; + } + case 32: + { + disableTraceSampling_ = input.readBool(); + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_EndpointsApiService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_EndpointsApiService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.EndpointsApiService.class, + com.google.appengine.v1.EndpointsApiService.Builder.class); + } + + /** + * + * + *
+   * Available rollout strategies.
+   * 
+ * + * Protobuf enum {@code google.appengine.v1.EndpointsApiService.RolloutStrategy} + */ + public enum RolloutStrategy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified. Defaults to `FIXED`.
+     * 
+ * + * UNSPECIFIED_ROLLOUT_STRATEGY = 0; + */ + UNSPECIFIED_ROLLOUT_STRATEGY(0), + /** + * + * + *
+     * Endpoints service configuration ID will be fixed to the configuration ID
+     * specified by `config_id`.
+     * 
+ * + * FIXED = 1; + */ + FIXED(1), + /** + * + * + *
+     * Endpoints service configuration ID will be updated with each rollout.
+     * 
+ * + * MANAGED = 2; + */ + MANAGED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified. Defaults to `FIXED`.
+     * 
+ * + * UNSPECIFIED_ROLLOUT_STRATEGY = 0; + */ + public static final int UNSPECIFIED_ROLLOUT_STRATEGY_VALUE = 0; + /** + * + * + *
+     * Endpoints service configuration ID will be fixed to the configuration ID
+     * specified by `config_id`.
+     * 
+ * + * FIXED = 1; + */ + public static final int FIXED_VALUE = 1; + /** + * + * + *
+     * Endpoints service configuration ID will be updated with each rollout.
+     * 
+ * + * MANAGED = 2; + */ + public static final int MANAGED_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 RolloutStrategy 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 RolloutStrategy forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED_ROLLOUT_STRATEGY; + case 1: + return FIXED; + case 2: + return MANAGED; + 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 RolloutStrategy findValueByNumber(int number) { + return RolloutStrategy.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.appengine.v1.EndpointsApiService.getDescriptor().getEnumTypes().get(0); + } + + private static final RolloutStrategy[] VALUES = values(); + + public static RolloutStrategy 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 RolloutStrategy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.EndpointsApiService.RolloutStrategy) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Endpoints service name which is the name of the "service" resource in the
+   * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Endpoints service name which is the name of the "service" resource in the
+   * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object configId_; + /** + * + * + *
+   * Endpoints service configuration ID as specified by the Service Management
+   * API. For example "2016-09-19r1".
+   * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
+   * This means that Endpoints starts up with a particular configuration ID.
+   * When a new configuration is rolled out, Endpoints must be given the new
+   * configuration ID. The `config_id` field is used to give the configuration
+   * ID and is required in this case.
+   * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
+   * When using this, Endpoints fetches the latest configuration and does not
+   * need the configuration ID. In this case, `config_id` must be omitted.
+   * 
+ * + * string config_id = 2; + * + * @return The configId. + */ + @java.lang.Override + public java.lang.String getConfigId() { + java.lang.Object ref = configId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configId_ = s; + return s; + } + } + /** + * + * + *
+   * Endpoints service configuration ID as specified by the Service Management
+   * API. For example "2016-09-19r1".
+   * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
+   * This means that Endpoints starts up with a particular configuration ID.
+   * When a new configuration is rolled out, Endpoints must be given the new
+   * configuration ID. The `config_id` field is used to give the configuration
+   * ID and is required in this case.
+   * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
+   * When using this, Endpoints fetches the latest configuration and does not
+   * need the configuration ID. In this case, `config_id` must be omitted.
+   * 
+ * + * string config_id = 2; + * + * @return The bytes for configId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfigIdBytes() { + java.lang.Object ref = configId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLOUT_STRATEGY_FIELD_NUMBER = 3; + private int rolloutStrategy_; + /** + * + * + *
+   * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
+   * `MANAGED`, `config_id` must be omitted.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3; + * + * @return The enum numeric value on the wire for rolloutStrategy. + */ + @java.lang.Override + public int getRolloutStrategyValue() { + return rolloutStrategy_; + } + /** + * + * + *
+   * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
+   * `MANAGED`, `config_id` must be omitted.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3; + * + * @return The rolloutStrategy. + */ + @java.lang.Override + public com.google.appengine.v1.EndpointsApiService.RolloutStrategy getRolloutStrategy() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.EndpointsApiService.RolloutStrategy result = + com.google.appengine.v1.EndpointsApiService.RolloutStrategy.valueOf(rolloutStrategy_); + return result == null + ? com.google.appengine.v1.EndpointsApiService.RolloutStrategy.UNRECOGNIZED + : result; + } + + public static final int DISABLE_TRACE_SAMPLING_FIELD_NUMBER = 4; + private boolean disableTraceSampling_; + /** + * + * + *
+   * Enable or disable trace sampling. By default, this is set to false for
+   * enabled.
+   * 
+ * + * bool disable_trace_sampling = 4; + * + * @return The disableTraceSampling. + */ + @java.lang.Override + public boolean getDisableTraceSampling() { + return disableTraceSampling_; + } + + 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 (!getConfigIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, configId_); + } + if (rolloutStrategy_ + != com.google.appengine.v1.EndpointsApiService.RolloutStrategy.UNSPECIFIED_ROLLOUT_STRATEGY + .getNumber()) { + output.writeEnum(3, rolloutStrategy_); + } + if (disableTraceSampling_ != false) { + output.writeBool(4, disableTraceSampling_); + } + 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 (!getConfigIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, configId_); + } + if (rolloutStrategy_ + != com.google.appengine.v1.EndpointsApiService.RolloutStrategy.UNSPECIFIED_ROLLOUT_STRATEGY + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, rolloutStrategy_); + } + if (disableTraceSampling_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disableTraceSampling_); + } + 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.appengine.v1.EndpointsApiService)) { + return super.equals(obj); + } + com.google.appengine.v1.EndpointsApiService other = + (com.google.appengine.v1.EndpointsApiService) obj; + + if (!getName().equals(other.getName())) return false; + if (!getConfigId().equals(other.getConfigId())) return false; + if (rolloutStrategy_ != other.rolloutStrategy_) return false; + if (getDisableTraceSampling() != other.getDisableTraceSampling()) 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) + CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getConfigId().hashCode(); + hash = (37 * hash) + ROLLOUT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + rolloutStrategy_; + hash = (37 * hash) + DISABLE_TRACE_SAMPLING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableTraceSampling()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.EndpointsApiService parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.EndpointsApiService parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.EndpointsApiService parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.EndpointsApiService 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.appengine.v1.EndpointsApiService parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.EndpointsApiService parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.EndpointsApiService parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.EndpointsApiService 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.appengine.v1.EndpointsApiService parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.EndpointsApiService 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.appengine.v1.EndpointsApiService parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.EndpointsApiService 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.appengine.v1.EndpointsApiService 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; + } + /** + * + * + *
+   * [Cloud Endpoints](https://cloud.google.com/endpoints) configuration.
+   * The Endpoints API Service provides tooling for serving Open API and gRPC
+   * endpoints via an NGINX proxy. Only valid for App Engine Flexible environment
+   * deployments.
+   * The fields here refer to the name and configuration ID of a "service"
+   * resource in the [Service Management API](https://cloud.google.com/service-management/overview).
+   * 
+ * + * Protobuf type {@code google.appengine.v1.EndpointsApiService} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.EndpointsApiService) + com.google.appengine.v1.EndpointsApiServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_EndpointsApiService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_EndpointsApiService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.EndpointsApiService.class, + com.google.appengine.v1.EndpointsApiService.Builder.class); + } + + // Construct using com.google.appengine.v1.EndpointsApiService.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_ = ""; + + configId_ = ""; + + rolloutStrategy_ = 0; + + disableTraceSampling_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_EndpointsApiService_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.EndpointsApiService getDefaultInstanceForType() { + return com.google.appengine.v1.EndpointsApiService.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.EndpointsApiService build() { + com.google.appengine.v1.EndpointsApiService result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.EndpointsApiService buildPartial() { + com.google.appengine.v1.EndpointsApiService result = + new com.google.appengine.v1.EndpointsApiService(this); + result.name_ = name_; + result.configId_ = configId_; + result.rolloutStrategy_ = rolloutStrategy_; + result.disableTraceSampling_ = disableTraceSampling_; + 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.appengine.v1.EndpointsApiService) { + return mergeFrom((com.google.appengine.v1.EndpointsApiService) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.EndpointsApiService other) { + if (other == com.google.appengine.v1.EndpointsApiService.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getConfigId().isEmpty()) { + configId_ = other.configId_; + onChanged(); + } + if (other.rolloutStrategy_ != 0) { + setRolloutStrategyValue(other.getRolloutStrategyValue()); + } + if (other.getDisableTraceSampling() != false) { + setDisableTraceSampling(other.getDisableTraceSampling()); + } + 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.appengine.v1.EndpointsApiService parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.EndpointsApiService) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Endpoints service name which is the name of the "service" resource in the
+     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Endpoints service name which is the name of the "service" resource in the
+     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Endpoints service name which is the name of the "service" resource in the
+     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Endpoints service name which is the name of the "service" resource in the
+     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Endpoints service name which is the name of the "service" resource in the
+     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object configId_ = ""; + /** + * + * + *
+     * Endpoints service configuration ID as specified by the Service Management
+     * API. For example "2016-09-19r1".
+     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
+     * This means that Endpoints starts up with a particular configuration ID.
+     * When a new configuration is rolled out, Endpoints must be given the new
+     * configuration ID. The `config_id` field is used to give the configuration
+     * ID and is required in this case.
+     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
+     * When using this, Endpoints fetches the latest configuration and does not
+     * need the configuration ID. In this case, `config_id` must be omitted.
+     * 
+ * + * string config_id = 2; + * + * @return The configId. + */ + public java.lang.String getConfigId() { + java.lang.Object ref = configId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Endpoints service configuration ID as specified by the Service Management
+     * API. For example "2016-09-19r1".
+     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
+     * This means that Endpoints starts up with a particular configuration ID.
+     * When a new configuration is rolled out, Endpoints must be given the new
+     * configuration ID. The `config_id` field is used to give the configuration
+     * ID and is required in this case.
+     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
+     * When using this, Endpoints fetches the latest configuration and does not
+     * need the configuration ID. In this case, `config_id` must be omitted.
+     * 
+ * + * string config_id = 2; + * + * @return The bytes for configId. + */ + public com.google.protobuf.ByteString getConfigIdBytes() { + java.lang.Object ref = configId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Endpoints service configuration ID as specified by the Service Management
+     * API. For example "2016-09-19r1".
+     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
+     * This means that Endpoints starts up with a particular configuration ID.
+     * When a new configuration is rolled out, Endpoints must be given the new
+     * configuration ID. The `config_id` field is used to give the configuration
+     * ID and is required in this case.
+     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
+     * When using this, Endpoints fetches the latest configuration and does not
+     * need the configuration ID. In this case, `config_id` must be omitted.
+     * 
+ * + * string config_id = 2; + * + * @param value The configId to set. + * @return This builder for chaining. + */ + public Builder setConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + configId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Endpoints service configuration ID as specified by the Service Management
+     * API. For example "2016-09-19r1".
+     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
+     * This means that Endpoints starts up with a particular configuration ID.
+     * When a new configuration is rolled out, Endpoints must be given the new
+     * configuration ID. The `config_id` field is used to give the configuration
+     * ID and is required in this case.
+     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
+     * When using this, Endpoints fetches the latest configuration and does not
+     * need the configuration ID. In this case, `config_id` must be omitted.
+     * 
+ * + * string config_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearConfigId() { + + configId_ = getDefaultInstance().getConfigId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Endpoints service configuration ID as specified by the Service Management
+     * API. For example "2016-09-19r1".
+     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
+     * This means that Endpoints starts up with a particular configuration ID.
+     * When a new configuration is rolled out, Endpoints must be given the new
+     * configuration ID. The `config_id` field is used to give the configuration
+     * ID and is required in this case.
+     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
+     * When using this, Endpoints fetches the latest configuration and does not
+     * need the configuration ID. In this case, `config_id` must be omitted.
+     * 
+ * + * string config_id = 2; + * + * @param value The bytes for configId to set. + * @return This builder for chaining. + */ + public Builder setConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + configId_ = value; + onChanged(); + return this; + } + + private int rolloutStrategy_ = 0; + /** + * + * + *
+     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
+     * `MANAGED`, `config_id` must be omitted.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3; + * + * @return The enum numeric value on the wire for rolloutStrategy. + */ + @java.lang.Override + public int getRolloutStrategyValue() { + return rolloutStrategy_; + } + /** + * + * + *
+     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
+     * `MANAGED`, `config_id` must be omitted.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3; + * + * @param value The enum numeric value on the wire for rolloutStrategy to set. + * @return This builder for chaining. + */ + public Builder setRolloutStrategyValue(int value) { + + rolloutStrategy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
+     * `MANAGED`, `config_id` must be omitted.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3; + * + * @return The rolloutStrategy. + */ + @java.lang.Override + public com.google.appengine.v1.EndpointsApiService.RolloutStrategy getRolloutStrategy() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.EndpointsApiService.RolloutStrategy result = + com.google.appengine.v1.EndpointsApiService.RolloutStrategy.valueOf(rolloutStrategy_); + return result == null + ? com.google.appengine.v1.EndpointsApiService.RolloutStrategy.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
+     * `MANAGED`, `config_id` must be omitted.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3; + * + * @param value The rolloutStrategy to set. + * @return This builder for chaining. + */ + public Builder setRolloutStrategy( + com.google.appengine.v1.EndpointsApiService.RolloutStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + + rolloutStrategy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
+     * `MANAGED`, `config_id` must be omitted.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3; + * + * @return This builder for chaining. + */ + public Builder clearRolloutStrategy() { + + rolloutStrategy_ = 0; + onChanged(); + return this; + } + + private boolean disableTraceSampling_; + /** + * + * + *
+     * Enable or disable trace sampling. By default, this is set to false for
+     * enabled.
+     * 
+ * + * bool disable_trace_sampling = 4; + * + * @return The disableTraceSampling. + */ + @java.lang.Override + public boolean getDisableTraceSampling() { + return disableTraceSampling_; + } + /** + * + * + *
+     * Enable or disable trace sampling. By default, this is set to false for
+     * enabled.
+     * 
+ * + * bool disable_trace_sampling = 4; + * + * @param value The disableTraceSampling to set. + * @return This builder for chaining. + */ + public Builder setDisableTraceSampling(boolean value) { + + disableTraceSampling_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Enable or disable trace sampling. By default, this is set to false for
+     * enabled.
+     * 
+ * + * bool disable_trace_sampling = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisableTraceSampling() { + + disableTraceSampling_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.appengine.v1.EndpointsApiService) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.EndpointsApiService) + private static final com.google.appengine.v1.EndpointsApiService DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.EndpointsApiService(); + } + + public static com.google.appengine.v1.EndpointsApiService getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndpointsApiService parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EndpointsApiService(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.appengine.v1.EndpointsApiService getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/EndpointsApiServiceOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/EndpointsApiServiceOrBuilder.java new file mode 100644 index 00000000..23798f0d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/EndpointsApiServiceOrBuilder.java @@ -0,0 +1,136 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface EndpointsApiServiceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.EndpointsApiService) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Endpoints service name which is the name of the "service" resource in the
+   * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Endpoints service name which is the name of the "service" resource in the
+   * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Endpoints service configuration ID as specified by the Service Management
+   * API. For example "2016-09-19r1".
+   * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
+   * This means that Endpoints starts up with a particular configuration ID.
+   * When a new configuration is rolled out, Endpoints must be given the new
+   * configuration ID. The `config_id` field is used to give the configuration
+   * ID and is required in this case.
+   * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
+   * When using this, Endpoints fetches the latest configuration and does not
+   * need the configuration ID. In this case, `config_id` must be omitted.
+   * 
+ * + * string config_id = 2; + * + * @return The configId. + */ + java.lang.String getConfigId(); + /** + * + * + *
+   * Endpoints service configuration ID as specified by the Service Management
+   * API. For example "2016-09-19r1".
+   * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
+   * This means that Endpoints starts up with a particular configuration ID.
+   * When a new configuration is rolled out, Endpoints must be given the new
+   * configuration ID. The `config_id` field is used to give the configuration
+   * ID and is required in this case.
+   * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
+   * When using this, Endpoints fetches the latest configuration and does not
+   * need the configuration ID. In this case, `config_id` must be omitted.
+   * 
+ * + * string config_id = 2; + * + * @return The bytes for configId. + */ + com.google.protobuf.ByteString getConfigIdBytes(); + + /** + * + * + *
+   * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
+   * `MANAGED`, `config_id` must be omitted.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3; + * + * @return The enum numeric value on the wire for rolloutStrategy. + */ + int getRolloutStrategyValue(); + /** + * + * + *
+   * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
+   * `MANAGED`, `config_id` must be omitted.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3; + * + * @return The rolloutStrategy. + */ + com.google.appengine.v1.EndpointsApiService.RolloutStrategy getRolloutStrategy(); + + /** + * + * + *
+   * Enable or disable trace sampling. By default, this is set to false for
+   * enabled.
+   * 
+ * + * bool disable_trace_sampling = 4; + * + * @return The disableTraceSampling. + */ + boolean getDisableTraceSampling(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Entrypoint.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Entrypoint.java new file mode 100644 index 00000000..c782d120 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Entrypoint.java @@ -0,0 +1,761 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * The entrypoint for the application.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.Entrypoint} + */ +public final class Entrypoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Entrypoint) + EntrypointOrBuilder { + private static final long serialVersionUID = 0L; + // Use Entrypoint.newBuilder() to construct. + private Entrypoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Entrypoint() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Entrypoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Entrypoint( + 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(); + commandCase_ = 1; + command_ = 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Entrypoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Entrypoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Entrypoint.class, + com.google.appengine.v1.Entrypoint.Builder.class); + } + + private int commandCase_ = 0; + private java.lang.Object command_; + + public enum CommandCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SHELL(1), + COMMAND_NOT_SET(0); + private final int value; + + private CommandCase(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 CommandCase valueOf(int value) { + return forNumber(value); + } + + public static CommandCase forNumber(int value) { + switch (value) { + case 1: + return SHELL; + case 0: + return COMMAND_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CommandCase getCommandCase() { + return CommandCase.forNumber(commandCase_); + } + + public static final int SHELL_FIELD_NUMBER = 1; + /** + * + * + *
+   * The format should be a shell command that can be fed to `bash -c`.
+   * 
+ * + * string shell = 1; + * + * @return Whether the shell field is set. + */ + public boolean hasShell() { + return commandCase_ == 1; + } + /** + * + * + *
+   * The format should be a shell command that can be fed to `bash -c`.
+   * 
+ * + * string shell = 1; + * + * @return The shell. + */ + public java.lang.String getShell() { + java.lang.Object ref = ""; + if (commandCase_ == 1) { + ref = command_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (commandCase_ == 1) { + command_ = s; + } + return s; + } + } + /** + * + * + *
+   * The format should be a shell command that can be fed to `bash -c`.
+   * 
+ * + * string shell = 1; + * + * @return The bytes for shell. + */ + public com.google.protobuf.ByteString getShellBytes() { + java.lang.Object ref = ""; + if (commandCase_ == 1) { + ref = command_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (commandCase_ == 1) { + command_ = 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 (commandCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, command_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (commandCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, command_); + } + 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.appengine.v1.Entrypoint)) { + return super.equals(obj); + } + com.google.appengine.v1.Entrypoint other = (com.google.appengine.v1.Entrypoint) obj; + + if (!getCommandCase().equals(other.getCommandCase())) return false; + switch (commandCase_) { + case 1: + if (!getShell().equals(other.getShell())) 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(); + switch (commandCase_) { + case 1: + hash = (37 * hash) + SHELL_FIELD_NUMBER; + hash = (53 * hash) + getShell().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Entrypoint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Entrypoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Entrypoint parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Entrypoint 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.appengine.v1.Entrypoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Entrypoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Entrypoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Entrypoint 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.appengine.v1.Entrypoint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Entrypoint 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.appengine.v1.Entrypoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Entrypoint 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.appengine.v1.Entrypoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The entrypoint for the application.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Entrypoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Entrypoint) + com.google.appengine.v1.EntrypointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Entrypoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Entrypoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Entrypoint.class, + com.google.appengine.v1.Entrypoint.Builder.class); + } + + // Construct using com.google.appengine.v1.Entrypoint.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(); + commandCase_ = 0; + command_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Entrypoint_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Entrypoint getDefaultInstanceForType() { + return com.google.appengine.v1.Entrypoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Entrypoint build() { + com.google.appengine.v1.Entrypoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Entrypoint buildPartial() { + com.google.appengine.v1.Entrypoint result = new com.google.appengine.v1.Entrypoint(this); + if (commandCase_ == 1) { + result.command_ = command_; + } + result.commandCase_ = commandCase_; + 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.appengine.v1.Entrypoint) { + return mergeFrom((com.google.appengine.v1.Entrypoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Entrypoint other) { + if (other == com.google.appengine.v1.Entrypoint.getDefaultInstance()) return this; + switch (other.getCommandCase()) { + case SHELL: + { + commandCase_ = 1; + command_ = other.command_; + onChanged(); + break; + } + case COMMAND_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.appengine.v1.Entrypoint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Entrypoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int commandCase_ = 0; + private java.lang.Object command_; + + public CommandCase getCommandCase() { + return CommandCase.forNumber(commandCase_); + } + + public Builder clearCommand() { + commandCase_ = 0; + command_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * The format should be a shell command that can be fed to `bash -c`.
+     * 
+ * + * string shell = 1; + * + * @return Whether the shell field is set. + */ + @java.lang.Override + public boolean hasShell() { + return commandCase_ == 1; + } + /** + * + * + *
+     * The format should be a shell command that can be fed to `bash -c`.
+     * 
+ * + * string shell = 1; + * + * @return The shell. + */ + @java.lang.Override + public java.lang.String getShell() { + java.lang.Object ref = ""; + if (commandCase_ == 1) { + ref = command_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (commandCase_ == 1) { + command_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The format should be a shell command that can be fed to `bash -c`.
+     * 
+ * + * string shell = 1; + * + * @return The bytes for shell. + */ + @java.lang.Override + public com.google.protobuf.ByteString getShellBytes() { + java.lang.Object ref = ""; + if (commandCase_ == 1) { + ref = command_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (commandCase_ == 1) { + command_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The format should be a shell command that can be fed to `bash -c`.
+     * 
+ * + * string shell = 1; + * + * @param value The shell to set. + * @return This builder for chaining. + */ + public Builder setShell(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + commandCase_ = 1; + command_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The format should be a shell command that can be fed to `bash -c`.
+     * 
+ * + * string shell = 1; + * + * @return This builder for chaining. + */ + public Builder clearShell() { + if (commandCase_ == 1) { + commandCase_ = 0; + command_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The format should be a shell command that can be fed to `bash -c`.
+     * 
+ * + * string shell = 1; + * + * @param value The bytes for shell to set. + * @return This builder for chaining. + */ + public Builder setShellBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + commandCase_ = 1; + command_ = 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.appengine.v1.Entrypoint) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Entrypoint) + private static final com.google.appengine.v1.Entrypoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Entrypoint(); + } + + public static com.google.appengine.v1.Entrypoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entrypoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Entrypoint(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.appengine.v1.Entrypoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/EntrypointOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/EntrypointOrBuilder.java new file mode 100644 index 00000000..728dafe1 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/EntrypointOrBuilder.java @@ -0,0 +1,64 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface EntrypointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Entrypoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The format should be a shell command that can be fed to `bash -c`.
+   * 
+ * + * string shell = 1; + * + * @return Whether the shell field is set. + */ + boolean hasShell(); + /** + * + * + *
+   * The format should be a shell command that can be fed to `bash -c`.
+   * 
+ * + * string shell = 1; + * + * @return The shell. + */ + java.lang.String getShell(); + /** + * + * + *
+   * The format should be a shell command that can be fed to `bash -c`.
+   * 
+ * + * string shell = 1; + * + * @return The bytes for shell. + */ + com.google.protobuf.ByteString getShellBytes(); + + public com.google.appengine.v1.Entrypoint.CommandCase getCommandCase(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ErrorHandler.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ErrorHandler.java new file mode 100644 index 00000000..7680135f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ErrorHandler.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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Custom static error page to be served when an error occurs.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ErrorHandler} + */ +public final class ErrorHandler extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ErrorHandler) + ErrorHandlerOrBuilder { + private static final long serialVersionUID = 0L; + // Use ErrorHandler.newBuilder() to construct. + private ErrorHandler(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ErrorHandler() { + errorCode_ = 0; + staticFile_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ErrorHandler(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ErrorHandler( + 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(); + + errorCode_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + staticFile_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ErrorHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ErrorHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ErrorHandler.class, + com.google.appengine.v1.ErrorHandler.Builder.class); + } + + /** + * + * + *
+   * Error codes.
+   * 
+ * + * Protobuf enum {@code google.appengine.v1.ErrorHandler.ErrorCode} + */ + public enum ErrorCode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified. ERROR_CODE_DEFAULT is assumed.
+     * 
+ * + * ERROR_CODE_UNSPECIFIED = 0; + */ + ERROR_CODE_UNSPECIFIED(0, 0), + /** + * + * + *
+     * Application has exceeded a resource quota.
+     * 
+ * + * ERROR_CODE_OVER_QUOTA = 1; + */ + ERROR_CODE_OVER_QUOTA(2, 1), + /** + * + * + *
+     * Client blocked by the application's Denial of Service protection
+     * configuration.
+     * 
+ * + * ERROR_CODE_DOS_API_DENIAL = 2; + */ + ERROR_CODE_DOS_API_DENIAL(3, 2), + /** + * + * + *
+     * Deadline reached before the application responds.
+     * 
+ * + * ERROR_CODE_TIMEOUT = 3; + */ + ERROR_CODE_TIMEOUT(4, 3), + UNRECOGNIZED(-1, -1), + ; + + /** + * + * + *
+     * All other error types.
+     * 
+ * + * ERROR_CODE_DEFAULT = 0; + */ + public static final ErrorCode ERROR_CODE_DEFAULT = ERROR_CODE_UNSPECIFIED; + /** + * + * + *
+     * Not specified. ERROR_CODE_DEFAULT is assumed.
+     * 
+ * + * ERROR_CODE_UNSPECIFIED = 0; + */ + public static final int ERROR_CODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * All other error types.
+     * 
+ * + * ERROR_CODE_DEFAULT = 0; + */ + public static final int ERROR_CODE_DEFAULT_VALUE = 0; + /** + * + * + *
+     * Application has exceeded a resource quota.
+     * 
+ * + * ERROR_CODE_OVER_QUOTA = 1; + */ + public static final int ERROR_CODE_OVER_QUOTA_VALUE = 1; + /** + * + * + *
+     * Client blocked by the application's Denial of Service protection
+     * configuration.
+     * 
+ * + * ERROR_CODE_DOS_API_DENIAL = 2; + */ + public static final int ERROR_CODE_DOS_API_DENIAL_VALUE = 2; + /** + * + * + *
+     * Deadline reached before the application responds.
+     * 
+ * + * ERROR_CODE_TIMEOUT = 3; + */ + public static final int ERROR_CODE_TIMEOUT_VALUE = 3; + + public final int getNumber() { + if (index == -1) { + 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 ErrorCode 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 ErrorCode forNumber(int value) { + switch (value) { + case 0: + return ERROR_CODE_UNSPECIFIED; + case 1: + return ERROR_CODE_OVER_QUOTA; + case 2: + return ERROR_CODE_DOS_API_DENIAL; + case 3: + return ERROR_CODE_TIMEOUT; + 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 ErrorCode findValueByNumber(int number) { + return ErrorCode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.appengine.v1.ErrorHandler.getDescriptor().getEnumTypes().get(0); + } + + private static final ErrorCode[] VALUES = getStaticValuesArray(); + + private static ErrorCode[] getStaticValuesArray() { + return new ErrorCode[] { + ERROR_CODE_UNSPECIFIED, + ERROR_CODE_DEFAULT, + ERROR_CODE_OVER_QUOTA, + ERROR_CODE_DOS_API_DENIAL, + ERROR_CODE_TIMEOUT, + }; + } + + public static ErrorCode 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 index; + private final int value; + + private ErrorCode(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.ErrorHandler.ErrorCode) + } + + public static final int ERROR_CODE_FIELD_NUMBER = 1; + private int errorCode_; + /** + * + * + *
+   * Error condition this handler applies to.
+   * 
+ * + * .google.appengine.v1.ErrorHandler.ErrorCode error_code = 1; + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+   * Error condition this handler applies to.
+   * 
+ * + * .google.appengine.v1.ErrorHandler.ErrorCode error_code = 1; + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.appengine.v1.ErrorHandler.ErrorCode getErrorCode() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.ErrorHandler.ErrorCode result = + com.google.appengine.v1.ErrorHandler.ErrorCode.valueOf(errorCode_); + return result == null ? com.google.appengine.v1.ErrorHandler.ErrorCode.UNRECOGNIZED : result; + } + + public static final int STATIC_FILE_FIELD_NUMBER = 2; + private volatile java.lang.Object staticFile_; + /** + * + * + *
+   * Static file content to be served for this error.
+   * 
+ * + * string static_file = 2; + * + * @return The staticFile. + */ + @java.lang.Override + public java.lang.String getStaticFile() { + java.lang.Object ref = staticFile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + staticFile_ = s; + return s; + } + } + /** + * + * + *
+   * Static file content to be served for this error.
+   * 
+ * + * string static_file = 2; + * + * @return The bytes for staticFile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStaticFileBytes() { + java.lang.Object ref = staticFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + staticFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIME_TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+   * MIME type of file. Defaults to `text/html`.
+   * 
+ * + * string mime_type = 3; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+   * MIME type of file. Defaults to `text/html`.
+   * 
+ * + * string mime_type = 3; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = 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 (errorCode_ + != com.google.appengine.v1.ErrorHandler.ErrorCode.ERROR_CODE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, errorCode_); + } + if (!getStaticFileBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, staticFile_); + } + if (!getMimeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (errorCode_ + != com.google.appengine.v1.ErrorHandler.ErrorCode.ERROR_CODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, errorCode_); + } + if (!getStaticFileBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, staticFile_); + } + if (!getMimeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_); + } + 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.appengine.v1.ErrorHandler)) { + return super.equals(obj); + } + com.google.appengine.v1.ErrorHandler other = (com.google.appengine.v1.ErrorHandler) obj; + + if (errorCode_ != other.errorCode_) return false; + if (!getStaticFile().equals(other.getStaticFile())) return false; + if (!getMimeType().equals(other.getMimeType())) 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) + ERROR_CODE_FIELD_NUMBER; + hash = (53 * hash) + errorCode_; + hash = (37 * hash) + STATIC_FILE_FIELD_NUMBER; + hash = (53 * hash) + getStaticFile().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ErrorHandler parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ErrorHandler parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ErrorHandler parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ErrorHandler 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.appengine.v1.ErrorHandler parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ErrorHandler parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ErrorHandler parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ErrorHandler 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.appengine.v1.ErrorHandler parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ErrorHandler 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.appengine.v1.ErrorHandler parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ErrorHandler 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.appengine.v1.ErrorHandler 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; + } + /** + * + * + *
+   * Custom static error page to be served when an error occurs.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ErrorHandler} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ErrorHandler) + com.google.appengine.v1.ErrorHandlerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ErrorHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ErrorHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ErrorHandler.class, + com.google.appengine.v1.ErrorHandler.Builder.class); + } + + // Construct using com.google.appengine.v1.ErrorHandler.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(); + errorCode_ = 0; + + staticFile_ = ""; + + mimeType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ErrorHandler_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ErrorHandler getDefaultInstanceForType() { + return com.google.appengine.v1.ErrorHandler.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ErrorHandler build() { + com.google.appengine.v1.ErrorHandler result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ErrorHandler buildPartial() { + com.google.appengine.v1.ErrorHandler result = new com.google.appengine.v1.ErrorHandler(this); + result.errorCode_ = errorCode_; + result.staticFile_ = staticFile_; + result.mimeType_ = mimeType_; + 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.appengine.v1.ErrorHandler) { + return mergeFrom((com.google.appengine.v1.ErrorHandler) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ErrorHandler other) { + if (other == com.google.appengine.v1.ErrorHandler.getDefaultInstance()) return this; + if (other.errorCode_ != 0) { + setErrorCodeValue(other.getErrorCodeValue()); + } + if (!other.getStaticFile().isEmpty()) { + staticFile_ = other.staticFile_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + 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.appengine.v1.ErrorHandler parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ErrorHandler) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int errorCode_ = 0; + /** + * + * + *
+     * Error condition this handler applies to.
+     * 
+ * + * .google.appengine.v1.ErrorHandler.ErrorCode error_code = 1; + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+     * Error condition this handler applies to.
+     * 
+ * + * .google.appengine.v1.ErrorHandler.ErrorCode error_code = 1; + * + * @param value The enum numeric value on the wire for errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCodeValue(int value) { + + errorCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Error condition this handler applies to.
+     * 
+ * + * .google.appengine.v1.ErrorHandler.ErrorCode error_code = 1; + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.appengine.v1.ErrorHandler.ErrorCode getErrorCode() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.ErrorHandler.ErrorCode result = + com.google.appengine.v1.ErrorHandler.ErrorCode.valueOf(errorCode_); + return result == null ? com.google.appengine.v1.ErrorHandler.ErrorCode.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Error condition this handler applies to.
+     * 
+ * + * .google.appengine.v1.ErrorHandler.ErrorCode error_code = 1; + * + * @param value The errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCode(com.google.appengine.v1.ErrorHandler.ErrorCode value) { + if (value == null) { + throw new NullPointerException(); + } + + errorCode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Error condition this handler applies to.
+     * 
+ * + * .google.appengine.v1.ErrorHandler.ErrorCode error_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearErrorCode() { + + errorCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object staticFile_ = ""; + /** + * + * + *
+     * Static file content to be served for this error.
+     * 
+ * + * string static_file = 2; + * + * @return The staticFile. + */ + public java.lang.String getStaticFile() { + java.lang.Object ref = staticFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + staticFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Static file content to be served for this error.
+     * 
+ * + * string static_file = 2; + * + * @return The bytes for staticFile. + */ + public com.google.protobuf.ByteString getStaticFileBytes() { + java.lang.Object ref = staticFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + staticFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Static file content to be served for this error.
+     * 
+ * + * string static_file = 2; + * + * @param value The staticFile to set. + * @return This builder for chaining. + */ + public Builder setStaticFile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + staticFile_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Static file content to be served for this error.
+     * 
+ * + * string static_file = 2; + * + * @return This builder for chaining. + */ + public Builder clearStaticFile() { + + staticFile_ = getDefaultInstance().getStaticFile(); + onChanged(); + return this; + } + /** + * + * + *
+     * Static file content to be served for this error.
+     * 
+ * + * string static_file = 2; + * + * @param value The bytes for staticFile to set. + * @return This builder for chaining. + */ + public Builder setStaticFileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + staticFile_ = value; + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * MIME type of file. Defaults to `text/html`.
+     * 
+ * + * string mime_type = 3; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * MIME type of file. Defaults to `text/html`.
+     * 
+ * + * string mime_type = 3; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * MIME type of file. Defaults to `text/html`.
+     * 
+ * + * string mime_type = 3; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * MIME type of file. Defaults to `text/html`.
+     * 
+ * + * string mime_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * MIME type of file. Defaults to `text/html`.
+     * 
+ * + * string mime_type = 3; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = 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.appengine.v1.ErrorHandler) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ErrorHandler) + private static final com.google.appengine.v1.ErrorHandler DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ErrorHandler(); + } + + public static com.google.appengine.v1.ErrorHandler getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorHandler parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ErrorHandler(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.appengine.v1.ErrorHandler getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ErrorHandlerOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ErrorHandlerOrBuilder.java new file mode 100644 index 00000000..19b5208b --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ErrorHandlerOrBuilder.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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface ErrorHandlerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ErrorHandler) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Error condition this handler applies to.
+   * 
+ * + * .google.appengine.v1.ErrorHandler.ErrorCode error_code = 1; + * + * @return The enum numeric value on the wire for errorCode. + */ + int getErrorCodeValue(); + /** + * + * + *
+   * Error condition this handler applies to.
+   * 
+ * + * .google.appengine.v1.ErrorHandler.ErrorCode error_code = 1; + * + * @return The errorCode. + */ + com.google.appengine.v1.ErrorHandler.ErrorCode getErrorCode(); + + /** + * + * + *
+   * Static file content to be served for this error.
+   * 
+ * + * string static_file = 2; + * + * @return The staticFile. + */ + java.lang.String getStaticFile(); + /** + * + * + *
+   * Static file content to be served for this error.
+   * 
+ * + * string static_file = 2; + * + * @return The bytes for staticFile. + */ + com.google.protobuf.ByteString getStaticFileBytes(); + + /** + * + * + *
+   * MIME type of file. Defaults to `text/html`.
+   * 
+ * + * string mime_type = 3; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * MIME type of file. Defaults to `text/html`.
+   * 
+ * + * string mime_type = 3; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FileInfo.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FileInfo.java new file mode 100644 index 00000000..dde3af96 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FileInfo.java @@ -0,0 +1,1011 @@ +/* + * 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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Single source file that is part of the version to be deployed. Each source
+ * file that is deployed must be specified separately.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.FileInfo} + */ +public final class FileInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.FileInfo) + FileInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use FileInfo.newBuilder() to construct. + private FileInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FileInfo() { + sourceUrl_ = ""; + sha1Sum_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FileInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FileInfo( + 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(); + + sourceUrl_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + sha1Sum_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = 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.appengine.v1.DeployProto + .internal_static_google_appengine_v1_FileInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_FileInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.FileInfo.class, com.google.appengine.v1.FileInfo.Builder.class); + } + + public static final int SOURCE_URL_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceUrl_; + /** + * + * + *
+   * URL source to use to fetch this file. Must be a URL to a resource in
+   * Google Cloud Storage in the form
+   * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+   * 
+ * + * string source_url = 1; + * + * @return The sourceUrl. + */ + @java.lang.Override + public java.lang.String getSourceUrl() { + java.lang.Object ref = sourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceUrl_ = s; + return s; + } + } + /** + * + * + *
+   * URL source to use to fetch this file. Must be a URL to a resource in
+   * Google Cloud Storage in the form
+   * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+   * 
+ * + * string source_url = 1; + * + * @return The bytes for sourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceUrlBytes() { + java.lang.Object ref = sourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHA1_SUM_FIELD_NUMBER = 2; + private volatile java.lang.Object sha1Sum_; + /** + * + * + *
+   * The SHA1 hash of the file, in hex.
+   * 
+ * + * string sha1_sum = 2; + * + * @return The sha1Sum. + */ + @java.lang.Override + public java.lang.String getSha1Sum() { + java.lang.Object ref = sha1Sum_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sha1Sum_ = s; + return s; + } + } + /** + * + * + *
+   * The SHA1 hash of the file, in hex.
+   * 
+ * + * string sha1_sum = 2; + * + * @return The bytes for sha1Sum. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSha1SumBytes() { + java.lang.Object ref = sha1Sum_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha1Sum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIME_TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+   * The MIME type of the file.
+   * Defaults to the value from Google Cloud Storage.
+   * 
+ * + * string mime_type = 3; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+   * The MIME type of the file.
+   * Defaults to the value from Google Cloud Storage.
+   * 
+ * + * string mime_type = 3; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = 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 (!getSourceUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceUrl_); + } + if (!getSha1SumBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sha1Sum_); + } + if (!getMimeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceUrl_); + } + if (!getSha1SumBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sha1Sum_); + } + if (!getMimeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_); + } + 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.appengine.v1.FileInfo)) { + return super.equals(obj); + } + com.google.appengine.v1.FileInfo other = (com.google.appengine.v1.FileInfo) obj; + + if (!getSourceUrl().equals(other.getSourceUrl())) return false; + if (!getSha1Sum().equals(other.getSha1Sum())) return false; + if (!getMimeType().equals(other.getMimeType())) 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_URL_FIELD_NUMBER; + hash = (53 * hash) + getSourceUrl().hashCode(); + hash = (37 * hash) + SHA1_SUM_FIELD_NUMBER; + hash = (53 * hash) + getSha1Sum().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.FileInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.FileInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.FileInfo parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.FileInfo 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.appengine.v1.FileInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.FileInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.FileInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.FileInfo 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.appengine.v1.FileInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.FileInfo 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.appengine.v1.FileInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.FileInfo 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.appengine.v1.FileInfo 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; + } + /** + * + * + *
+   * Single source file that is part of the version to be deployed. Each source
+   * file that is deployed must be specified separately.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.FileInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.FileInfo) + com.google.appengine.v1.FileInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_FileInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_FileInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.FileInfo.class, + com.google.appengine.v1.FileInfo.Builder.class); + } + + // Construct using com.google.appengine.v1.FileInfo.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(); + sourceUrl_ = ""; + + sha1Sum_ = ""; + + mimeType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_FileInfo_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.FileInfo getDefaultInstanceForType() { + return com.google.appengine.v1.FileInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.FileInfo build() { + com.google.appengine.v1.FileInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.FileInfo buildPartial() { + com.google.appengine.v1.FileInfo result = new com.google.appengine.v1.FileInfo(this); + result.sourceUrl_ = sourceUrl_; + result.sha1Sum_ = sha1Sum_; + result.mimeType_ = mimeType_; + 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.appengine.v1.FileInfo) { + return mergeFrom((com.google.appengine.v1.FileInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.FileInfo other) { + if (other == com.google.appengine.v1.FileInfo.getDefaultInstance()) return this; + if (!other.getSourceUrl().isEmpty()) { + sourceUrl_ = other.sourceUrl_; + onChanged(); + } + if (!other.getSha1Sum().isEmpty()) { + sha1Sum_ = other.sha1Sum_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + 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.appengine.v1.FileInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.FileInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sourceUrl_ = ""; + /** + * + * + *
+     * URL source to use to fetch this file. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 1; + * + * @return The sourceUrl. + */ + public java.lang.String getSourceUrl() { + java.lang.Object ref = sourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URL source to use to fetch this file. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 1; + * + * @return The bytes for sourceUrl. + */ + public com.google.protobuf.ByteString getSourceUrlBytes() { + java.lang.Object ref = sourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URL source to use to fetch this file. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 1; + * + * @param value The sourceUrl to set. + * @return This builder for chaining. + */ + public Builder setSourceUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URL source to use to fetch this file. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceUrl() { + + sourceUrl_ = getDefaultInstance().getSourceUrl(); + onChanged(); + return this; + } + /** + * + * + *
+     * URL source to use to fetch this file. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 1; + * + * @param value The bytes for sourceUrl to set. + * @return This builder for chaining. + */ + public Builder setSourceUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object sha1Sum_ = ""; + /** + * + * + *
+     * The SHA1 hash of the file, in hex.
+     * 
+ * + * string sha1_sum = 2; + * + * @return The sha1Sum. + */ + public java.lang.String getSha1Sum() { + java.lang.Object ref = sha1Sum_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sha1Sum_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The SHA1 hash of the file, in hex.
+     * 
+ * + * string sha1_sum = 2; + * + * @return The bytes for sha1Sum. + */ + public com.google.protobuf.ByteString getSha1SumBytes() { + java.lang.Object ref = sha1Sum_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha1Sum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The SHA1 hash of the file, in hex.
+     * 
+ * + * string sha1_sum = 2; + * + * @param value The sha1Sum to set. + * @return This builder for chaining. + */ + public Builder setSha1Sum(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sha1Sum_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The SHA1 hash of the file, in hex.
+     * 
+ * + * string sha1_sum = 2; + * + * @return This builder for chaining. + */ + public Builder clearSha1Sum() { + + sha1Sum_ = getDefaultInstance().getSha1Sum(); + onChanged(); + return this; + } + /** + * + * + *
+     * The SHA1 hash of the file, in hex.
+     * 
+ * + * string sha1_sum = 2; + * + * @param value The bytes for sha1Sum to set. + * @return This builder for chaining. + */ + public Builder setSha1SumBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sha1Sum_ = value; + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * The MIME type of the file.
+     * Defaults to the value from Google Cloud Storage.
+     * 
+ * + * string mime_type = 3; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The MIME type of the file.
+     * Defaults to the value from Google Cloud Storage.
+     * 
+ * + * string mime_type = 3; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The MIME type of the file.
+     * Defaults to the value from Google Cloud Storage.
+     * 
+ * + * string mime_type = 3; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the file.
+     * Defaults to the value from Google Cloud Storage.
+     * 
+ * + * string mime_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The MIME type of the file.
+     * Defaults to the value from Google Cloud Storage.
+     * 
+ * + * string mime_type = 3; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = 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.appengine.v1.FileInfo) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.FileInfo) + private static final com.google.appengine.v1.FileInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.FileInfo(); + } + + public static com.google.appengine.v1.FileInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FileInfo(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.appengine.v1.FileInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FileInfoOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FileInfoOrBuilder.java new file mode 100644 index 00000000..0cd36423 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/FileInfoOrBuilder.java @@ -0,0 +1,106 @@ +/* + * 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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +public interface FileInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.FileInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URL source to use to fetch this file. Must be a URL to a resource in
+   * Google Cloud Storage in the form
+   * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+   * 
+ * + * string source_url = 1; + * + * @return The sourceUrl. + */ + java.lang.String getSourceUrl(); + /** + * + * + *
+   * URL source to use to fetch this file. Must be a URL to a resource in
+   * Google Cloud Storage in the form
+   * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+   * 
+ * + * string source_url = 1; + * + * @return The bytes for sourceUrl. + */ + com.google.protobuf.ByteString getSourceUrlBytes(); + + /** + * + * + *
+   * The SHA1 hash of the file, in hex.
+   * 
+ * + * string sha1_sum = 2; + * + * @return The sha1Sum. + */ + java.lang.String getSha1Sum(); + /** + * + * + *
+   * The SHA1 hash of the file, in hex.
+   * 
+ * + * string sha1_sum = 2; + * + * @return The bytes for sha1Sum. + */ + com.google.protobuf.ByteString getSha1SumBytes(); + + /** + * + * + *
+   * The MIME type of the file.
+   * Defaults to the value from Google Cloud Storage.
+   * 
+ * + * string mime_type = 3; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * The MIME type of the file.
+   * Defaults to the value from Google Cloud Storage.
+   * 
+ * + * string mime_type = 3; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetApplicationRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetApplicationRequest.java new file mode 100644 index 00000000..2189d89b --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetApplicationRequest.java @@ -0,0 +1,634 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Applications.GetApplication`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.GetApplicationRequest} + */ +public final class GetApplicationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.GetApplicationRequest) + GetApplicationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetApplicationRequest.newBuilder() to construct. + private GetApplicationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetApplicationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetApplicationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetApplicationRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetApplicationRequest.class, + com.google.appengine.v1.GetApplicationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the Application resource to get. Example: `apps/myapp`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the Application resource to get. Example: `apps/myapp`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.GetApplicationRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.GetApplicationRequest other = + (com.google.appengine.v1.GetApplicationRequest) 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.appengine.v1.GetApplicationRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetApplicationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetApplicationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetApplicationRequest 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.appengine.v1.GetApplicationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetApplicationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetApplicationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetApplicationRequest 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.appengine.v1.GetApplicationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetApplicationRequest 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.appengine.v1.GetApplicationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetApplicationRequest 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.appengine.v1.GetApplicationRequest 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 message for `Applications.GetApplication`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.GetApplicationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.GetApplicationRequest) + com.google.appengine.v1.GetApplicationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetApplicationRequest.class, + com.google.appengine.v1.GetApplicationRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.GetApplicationRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetApplicationRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.GetApplicationRequest getDefaultInstanceForType() { + return com.google.appengine.v1.GetApplicationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.GetApplicationRequest build() { + com.google.appengine.v1.GetApplicationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.GetApplicationRequest buildPartial() { + com.google.appengine.v1.GetApplicationRequest result = + new com.google.appengine.v1.GetApplicationRequest(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.appengine.v1.GetApplicationRequest) { + return mergeFrom((com.google.appengine.v1.GetApplicationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.GetApplicationRequest other) { + if (other == com.google.appengine.v1.GetApplicationRequest.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.appengine.v1.GetApplicationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.GetApplicationRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the Application resource to get. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the Application resource to get. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the Application resource to get. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Application resource to get. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Application resource to get. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.GetApplicationRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.GetApplicationRequest) + private static final com.google.appengine.v1.GetApplicationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.GetApplicationRequest(); + } + + public static com.google.appengine.v1.GetApplicationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetApplicationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetApplicationRequest(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.appengine.v1.GetApplicationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetApplicationRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetApplicationRequestOrBuilder.java new file mode 100644 index 00000000..6b43947f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetApplicationRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface GetApplicationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.GetApplicationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Application resource to get. Example: `apps/myapp`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the Application resource to get. Example: `apps/myapp`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetAuthorizedCertificateRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetAuthorizedCertificateRequest.java new file mode 100644 index 00000000..f7e56843 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetAuthorizedCertificateRequest.java @@ -0,0 +1,797 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `AuthorizedCertificates.GetAuthorizedCertificate`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.GetAuthorizedCertificateRequest} + */ +public final class GetAuthorizedCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.GetAuthorizedCertificateRequest) + GetAuthorizedCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAuthorizedCertificateRequest.newBuilder() to construct. + private GetAuthorizedCertificateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAuthorizedCertificateRequest() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAuthorizedCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAuthorizedCertificateRequest( + 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; + } + case 16: + { + int rawValue = input.readEnum(); + + view_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetAuthorizedCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetAuthorizedCertificateRequest.class, + com.google.appengine.v1.GetAuthorizedCertificateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_; + /** + * + * + *
+   * Controls the set of fields returned in the `GET` response.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Controls the set of fields returned in the `GET` response.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificateView getView() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.AuthorizedCertificateView result = + com.google.appengine.v1.AuthorizedCertificateView.valueOf(view_); + return result == null ? com.google.appengine.v1.AuthorizedCertificateView.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (view_ != com.google.appengine.v1.AuthorizedCertificateView.BASIC_CERTIFICATE.getNumber()) { + output.writeEnum(2, view_); + } + 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 (view_ != com.google.appengine.v1.AuthorizedCertificateView.BASIC_CERTIFICATE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + 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.appengine.v1.GetAuthorizedCertificateRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.GetAuthorizedCertificateRequest other = + (com.google.appengine.v1.GetAuthorizedCertificateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest 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.appengine.v1.GetAuthorizedCertificateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest 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.appengine.v1.GetAuthorizedCertificateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest 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.appengine.v1.GetAuthorizedCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest 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.appengine.v1.GetAuthorizedCertificateRequest 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 message for `AuthorizedCertificates.GetAuthorizedCertificate`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.GetAuthorizedCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.GetAuthorizedCertificateRequest) + com.google.appengine.v1.GetAuthorizedCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetAuthorizedCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetAuthorizedCertificateRequest.class, + com.google.appengine.v1.GetAuthorizedCertificateRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.GetAuthorizedCertificateRequest.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_ = ""; + + view_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.GetAuthorizedCertificateRequest getDefaultInstanceForType() { + return com.google.appengine.v1.GetAuthorizedCertificateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.GetAuthorizedCertificateRequest build() { + com.google.appengine.v1.GetAuthorizedCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.GetAuthorizedCertificateRequest buildPartial() { + com.google.appengine.v1.GetAuthorizedCertificateRequest result = + new com.google.appengine.v1.GetAuthorizedCertificateRequest(this); + result.name_ = name_; + result.view_ = view_; + 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.appengine.v1.GetAuthorizedCertificateRequest) { + return mergeFrom((com.google.appengine.v1.GetAuthorizedCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.GetAuthorizedCertificateRequest other) { + if (other == com.google.appengine.v1.GetAuthorizedCertificateRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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.appengine.v1.GetAuthorizedCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.GetAuthorizedCertificateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Controls the set of fields returned in the `GET` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Controls the set of fields returned in the `GET` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 2; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls the set of fields returned in the `GET` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificateView getView() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.AuthorizedCertificateView result = + com.google.appengine.v1.AuthorizedCertificateView.valueOf(view_); + return result == null + ? com.google.appengine.v1.AuthorizedCertificateView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Controls the set of fields returned in the `GET` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 2; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.appengine.v1.AuthorizedCertificateView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Controls the set of fields returned in the `GET` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 2; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.appengine.v1.GetAuthorizedCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.GetAuthorizedCertificateRequest) + private static final com.google.appengine.v1.GetAuthorizedCertificateRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.GetAuthorizedCertificateRequest(); + } + + public static com.google.appengine.v1.GetAuthorizedCertificateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAuthorizedCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAuthorizedCertificateRequest(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.appengine.v1.GetAuthorizedCertificateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetAuthorizedCertificateRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetAuthorizedCertificateRequestOrBuilder.java new file mode 100644 index 00000000..d3d2f2c4 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetAuthorizedCertificateRequestOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface GetAuthorizedCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.GetAuthorizedCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Controls the set of fields returned in the `GET` response.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Controls the set of fields returned in the `GET` response.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 2; + * + * @return The view. + */ + com.google.appengine.v1.AuthorizedCertificateView getView(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetDomainMappingRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetDomainMappingRequest.java new file mode 100644 index 00000000..88309520 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetDomainMappingRequest.java @@ -0,0 +1,642 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `DomainMappings.GetDomainMapping`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.GetDomainMappingRequest} + */ +public final class GetDomainMappingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.GetDomainMappingRequest) + GetDomainMappingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDomainMappingRequest.newBuilder() to construct. + private GetDomainMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDomainMappingRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDomainMappingRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDomainMappingRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetDomainMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetDomainMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetDomainMappingRequest.class, + com.google.appengine.v1.GetDomainMappingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.GetDomainMappingRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.GetDomainMappingRequest other = + (com.google.appengine.v1.GetDomainMappingRequest) 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.appengine.v1.GetDomainMappingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetDomainMappingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetDomainMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetDomainMappingRequest 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.appengine.v1.GetDomainMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetDomainMappingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetDomainMappingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetDomainMappingRequest 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.appengine.v1.GetDomainMappingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetDomainMappingRequest 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.appengine.v1.GetDomainMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetDomainMappingRequest 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.appengine.v1.GetDomainMappingRequest 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 message for `DomainMappings.GetDomainMapping`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.GetDomainMappingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.GetDomainMappingRequest) + com.google.appengine.v1.GetDomainMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetDomainMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetDomainMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetDomainMappingRequest.class, + com.google.appengine.v1.GetDomainMappingRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.GetDomainMappingRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetDomainMappingRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.GetDomainMappingRequest getDefaultInstanceForType() { + return com.google.appengine.v1.GetDomainMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.GetDomainMappingRequest build() { + com.google.appengine.v1.GetDomainMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.GetDomainMappingRequest buildPartial() { + com.google.appengine.v1.GetDomainMappingRequest result = + new com.google.appengine.v1.GetDomainMappingRequest(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.appengine.v1.GetDomainMappingRequest) { + return mergeFrom((com.google.appengine.v1.GetDomainMappingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.GetDomainMappingRequest other) { + if (other == com.google.appengine.v1.GetDomainMappingRequest.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.appengine.v1.GetDomainMappingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.GetDomainMappingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.GetDomainMappingRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.GetDomainMappingRequest) + private static final com.google.appengine.v1.GetDomainMappingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.GetDomainMappingRequest(); + } + + public static com.google.appengine.v1.GetDomainMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDomainMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDomainMappingRequest(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.appengine.v1.GetDomainMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetDomainMappingRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetDomainMappingRequestOrBuilder.java new file mode 100644 index 00000000..c2484d74 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetDomainMappingRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface GetDomainMappingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.GetDomainMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetIngressRuleRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetIngressRuleRequest.java new file mode 100644 index 00000000..97167fe2 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetIngressRuleRequest.java @@ -0,0 +1,641 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Firewall.GetIngressRule`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.GetIngressRuleRequest} + */ +public final class GetIngressRuleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.GetIngressRuleRequest) + GetIngressRuleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetIngressRuleRequest.newBuilder() to construct. + private GetIngressRuleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetIngressRuleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetIngressRuleRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetIngressRuleRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetIngressRuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetIngressRuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetIngressRuleRequest.class, + com.google.appengine.v1.GetIngressRuleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the Firewall resource to retrieve.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the Firewall resource to retrieve.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.GetIngressRuleRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.GetIngressRuleRequest other = + (com.google.appengine.v1.GetIngressRuleRequest) 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.appengine.v1.GetIngressRuleRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetIngressRuleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetIngressRuleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetIngressRuleRequest 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.appengine.v1.GetIngressRuleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetIngressRuleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetIngressRuleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetIngressRuleRequest 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.appengine.v1.GetIngressRuleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetIngressRuleRequest 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.appengine.v1.GetIngressRuleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetIngressRuleRequest 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.appengine.v1.GetIngressRuleRequest 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 message for `Firewall.GetIngressRule`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.GetIngressRuleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.GetIngressRuleRequest) + com.google.appengine.v1.GetIngressRuleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetIngressRuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetIngressRuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetIngressRuleRequest.class, + com.google.appengine.v1.GetIngressRuleRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.GetIngressRuleRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetIngressRuleRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.GetIngressRuleRequest getDefaultInstanceForType() { + return com.google.appengine.v1.GetIngressRuleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.GetIngressRuleRequest build() { + com.google.appengine.v1.GetIngressRuleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.GetIngressRuleRequest buildPartial() { + com.google.appengine.v1.GetIngressRuleRequest result = + new com.google.appengine.v1.GetIngressRuleRequest(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.appengine.v1.GetIngressRuleRequest) { + return mergeFrom((com.google.appengine.v1.GetIngressRuleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.GetIngressRuleRequest other) { + if (other == com.google.appengine.v1.GetIngressRuleRequest.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.appengine.v1.GetIngressRuleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.GetIngressRuleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the Firewall resource to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the Firewall resource to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the Firewall resource to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Firewall resource to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Firewall resource to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.GetIngressRuleRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.GetIngressRuleRequest) + private static final com.google.appengine.v1.GetIngressRuleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.GetIngressRuleRequest(); + } + + public static com.google.appengine.v1.GetIngressRuleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetIngressRuleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetIngressRuleRequest(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.appengine.v1.GetIngressRuleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetIngressRuleRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetIngressRuleRequestOrBuilder.java new file mode 100644 index 00000000..ea0c9eb9 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetIngressRuleRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface GetIngressRuleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.GetIngressRuleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Firewall resource to retrieve.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the Firewall resource to retrieve.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetInstanceRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetInstanceRequest.java new file mode 100644 index 00000000..7b3f6df5 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetInstanceRequest.java @@ -0,0 +1,641 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Instances.GetInstance`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.GetInstanceRequest} + */ +public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.GetInstanceRequest) + GetInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstanceRequest.newBuilder() to construct. + private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetInstanceRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetInstanceRequest.class, + com.google.appengine.v1.GetInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.GetInstanceRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.GetInstanceRequest other = + (com.google.appengine.v1.GetInstanceRequest) 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.appengine.v1.GetInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetInstanceRequest 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.appengine.v1.GetInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetInstanceRequest 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.appengine.v1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetInstanceRequest 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.appengine.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetInstanceRequest 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.appengine.v1.GetInstanceRequest 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 message for `Instances.GetInstance`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.GetInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.GetInstanceRequest) + com.google.appengine.v1.GetInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetInstanceRequest.class, + com.google.appengine.v1.GetInstanceRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.GetInstanceRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.GetInstanceRequest getDefaultInstanceForType() { + return com.google.appengine.v1.GetInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.GetInstanceRequest build() { + com.google.appengine.v1.GetInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.GetInstanceRequest buildPartial() { + com.google.appengine.v1.GetInstanceRequest result = + new com.google.appengine.v1.GetInstanceRequest(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.appengine.v1.GetInstanceRequest) { + return mergeFrom((com.google.appengine.v1.GetInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.GetInstanceRequest other) { + if (other == com.google.appengine.v1.GetInstanceRequest.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.appengine.v1.GetInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.GetInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.GetInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.GetInstanceRequest) + private static final com.google.appengine.v1.GetInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.GetInstanceRequest(); + } + + public static com.google.appengine.v1.GetInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceRequest(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.appengine.v1.GetInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetInstanceRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetInstanceRequestOrBuilder.java new file mode 100644 index 00000000..94a3aae8 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetInstanceRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface GetInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.GetInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetServiceRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetServiceRequest.java new file mode 100644 index 00000000..a5ef05d7 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetServiceRequest.java @@ -0,0 +1,634 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Services.GetService`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.GetServiceRequest} + */ +public final class GetServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.GetServiceRequest) + GetServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetServiceRequest.newBuilder() to construct. + private GetServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetServiceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetServiceRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetServiceRequest.class, + com.google.appengine.v1.GetServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource requested. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource requested. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.GetServiceRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.GetServiceRequest other = + (com.google.appengine.v1.GetServiceRequest) 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.appengine.v1.GetServiceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetServiceRequest 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.appengine.v1.GetServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetServiceRequest 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.appengine.v1.GetServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetServiceRequest 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.appengine.v1.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetServiceRequest 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.appengine.v1.GetServiceRequest 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 message for `Services.GetService`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.GetServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.GetServiceRequest) + com.google.appengine.v1.GetServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetServiceRequest.class, + com.google.appengine.v1.GetServiceRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.GetServiceRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.GetServiceRequest getDefaultInstanceForType() { + return com.google.appengine.v1.GetServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.GetServiceRequest build() { + com.google.appengine.v1.GetServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.GetServiceRequest buildPartial() { + com.google.appengine.v1.GetServiceRequest result = + new com.google.appengine.v1.GetServiceRequest(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.appengine.v1.GetServiceRequest) { + return mergeFrom((com.google.appengine.v1.GetServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.GetServiceRequest other) { + if (other == com.google.appengine.v1.GetServiceRequest.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.appengine.v1.GetServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.GetServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.GetServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.GetServiceRequest) + private static final com.google.appengine.v1.GetServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.GetServiceRequest(); + } + + public static com.google.appengine.v1.GetServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetServiceRequest(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.appengine.v1.GetServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetServiceRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetServiceRequestOrBuilder.java new file mode 100644 index 00000000..9191afde --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetServiceRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface GetServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.GetServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource requested. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource requested. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetVersionRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetVersionRequest.java new file mode 100644 index 00000000..65d8b59e --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetVersionRequest.java @@ -0,0 +1,790 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Versions.GetVersion`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.GetVersionRequest} + */ +public final class GetVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.GetVersionRequest) + GetVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetVersionRequest.newBuilder() to construct. + private GetVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetVersionRequest() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetVersionRequest( + 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; + } + case 16: + { + int rawValue = input.readEnum(); + + view_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetVersionRequest.class, + com.google.appengine.v1.GetVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_; + /** + * + * + *
+   * Controls the set of fields returned in the `Get` response.
+   * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Controls the set of fields returned in the `Get` response.
+   * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.appengine.v1.VersionView getView() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.VersionView result = com.google.appengine.v1.VersionView.valueOf(view_); + return result == null ? com.google.appengine.v1.VersionView.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (view_ != com.google.appengine.v1.VersionView.BASIC.getNumber()) { + output.writeEnum(2, view_); + } + 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 (view_ != com.google.appengine.v1.VersionView.BASIC.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + 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.appengine.v1.GetVersionRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.GetVersionRequest other = + (com.google.appengine.v1.GetVersionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.GetVersionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetVersionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetVersionRequest 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.appengine.v1.GetVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.GetVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.GetVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetVersionRequest 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.appengine.v1.GetVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetVersionRequest 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.appengine.v1.GetVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.GetVersionRequest 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.appengine.v1.GetVersionRequest 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 message for `Versions.GetVersion`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.GetVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.GetVersionRequest) + com.google.appengine.v1.GetVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.GetVersionRequest.class, + com.google.appengine.v1.GetVersionRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.GetVersionRequest.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_ = ""; + + view_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_GetVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.GetVersionRequest getDefaultInstanceForType() { + return com.google.appengine.v1.GetVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.GetVersionRequest build() { + com.google.appengine.v1.GetVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.GetVersionRequest buildPartial() { + com.google.appengine.v1.GetVersionRequest result = + new com.google.appengine.v1.GetVersionRequest(this); + result.name_ = name_; + result.view_ = view_; + 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.appengine.v1.GetVersionRequest) { + return mergeFrom((com.google.appengine.v1.GetVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.GetVersionRequest other) { + if (other == com.google.appengine.v1.GetVersionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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.appengine.v1.GetVersionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.GetVersionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource requested. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Controls the set of fields returned in the `Get` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Controls the set of fields returned in the `Get` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls the set of fields returned in the `Get` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.appengine.v1.VersionView getView() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.VersionView result = + com.google.appengine.v1.VersionView.valueOf(view_); + return result == null ? com.google.appengine.v1.VersionView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Controls the set of fields returned in the `Get` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.appengine.v1.VersionView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Controls the set of fields returned in the `Get` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.appengine.v1.GetVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.GetVersionRequest) + private static final com.google.appengine.v1.GetVersionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.GetVersionRequest(); + } + + public static com.google.appengine.v1.GetVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetVersionRequest(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.appengine.v1.GetVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetVersionRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetVersionRequestOrBuilder.java new file mode 100644 index 00000000..04c910c8 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/GetVersionRequestOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface GetVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.GetVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource requested. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Controls the set of fields returned in the `Get` response.
+   * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Controls the set of fields returned in the `Get` response.
+   * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The view. + */ + com.google.appengine.v1.VersionView getView(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/HealthCheck.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/HealthCheck.java new file mode 100644 index 00000000..03a96840 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/HealthCheck.java @@ -0,0 +1,1558 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Health checking configuration for VM instances. Unhealthy instances
+ * are killed and replaced with new instances. Only applicable for
+ * instances in App Engine flexible environment.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.HealthCheck} + */ +public final class HealthCheck extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.HealthCheck) + HealthCheckOrBuilder { + private static final long serialVersionUID = 0L; + // Use HealthCheck.newBuilder() to construct. + private HealthCheck(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HealthCheck() { + host_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HealthCheck(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private HealthCheck( + 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: + { + disableHealthCheck_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + host_ = s; + break; + } + case 24: + { + healthyThreshold_ = input.readUInt32(); + break; + } + case 32: + { + unhealthyThreshold_ = input.readUInt32(); + break; + } + case 40: + { + restartThreshold_ = input.readUInt32(); + break; + } + case 50: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (checkInterval_ != null) { + subBuilder = checkInterval_.toBuilder(); + } + checkInterval_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(checkInterval_); + checkInterval_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeout_ != null) { + subBuilder = timeout_.toBuilder(); + } + timeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeout_); + timeout_ = 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_HealthCheck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_HealthCheck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.HealthCheck.class, + com.google.appengine.v1.HealthCheck.Builder.class); + } + + public static final int DISABLE_HEALTH_CHECK_FIELD_NUMBER = 1; + private boolean disableHealthCheck_; + /** + * + * + *
+   * Whether to explicitly disable health checks for this instance.
+   * 
+ * + * bool disable_health_check = 1; + * + * @return The disableHealthCheck. + */ + @java.lang.Override + public boolean getDisableHealthCheck() { + return disableHealthCheck_; + } + + public static final int HOST_FIELD_NUMBER = 2; + private volatile java.lang.Object host_; + /** + * + * + *
+   * Host header to send when performing an HTTP health check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } + } + /** + * + * + *
+   * Host header to send when performing an HTTP health check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEALTHY_THRESHOLD_FIELD_NUMBER = 3; + private int healthyThreshold_; + /** + * + * + *
+   * Number of consecutive successful health checks required before receiving
+   * traffic.
+   * 
+ * + * uint32 healthy_threshold = 3; + * + * @return The healthyThreshold. + */ + @java.lang.Override + public int getHealthyThreshold() { + return healthyThreshold_; + } + + public static final int UNHEALTHY_THRESHOLD_FIELD_NUMBER = 4; + private int unhealthyThreshold_; + /** + * + * + *
+   * Number of consecutive failed health checks required before removing
+   * traffic.
+   * 
+ * + * uint32 unhealthy_threshold = 4; + * + * @return The unhealthyThreshold. + */ + @java.lang.Override + public int getUnhealthyThreshold() { + return unhealthyThreshold_; + } + + public static final int RESTART_THRESHOLD_FIELD_NUMBER = 5; + private int restartThreshold_; + /** + * + * + *
+   * Number of consecutive failed health checks required before an instance is
+   * restarted.
+   * 
+ * + * uint32 restart_threshold = 5; + * + * @return The restartThreshold. + */ + @java.lang.Override + public int getRestartThreshold() { + return restartThreshold_; + } + + public static final int CHECK_INTERVAL_FIELD_NUMBER = 6; + private com.google.protobuf.Duration checkInterval_; + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 6; + * + * @return Whether the checkInterval field is set. + */ + @java.lang.Override + public boolean hasCheckInterval() { + return checkInterval_ != null; + } + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 6; + * + * @return The checkInterval. + */ + @java.lang.Override + public com.google.protobuf.Duration getCheckInterval() { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() { + return getCheckInterval(); + } + + public static final int TIMEOUT_FIELD_NUMBER = 7; + private com.google.protobuf.Duration timeout_; + /** + * + * + *
+   * Time before the health check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 7; + * + * @return Whether the timeout field is set. + */ + @java.lang.Override + public boolean hasTimeout() { + return timeout_ != null; + } + /** + * + * + *
+   * Time before the health check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 7; + * + * @return The timeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeout() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + /** + * + * + *
+   * Time before the health check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 7; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + return getTimeout(); + } + + 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 (disableHealthCheck_ != false) { + output.writeBool(1, disableHealthCheck_); + } + if (!getHostBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, host_); + } + if (healthyThreshold_ != 0) { + output.writeUInt32(3, healthyThreshold_); + } + if (unhealthyThreshold_ != 0) { + output.writeUInt32(4, unhealthyThreshold_); + } + if (restartThreshold_ != 0) { + output.writeUInt32(5, restartThreshold_); + } + if (checkInterval_ != null) { + output.writeMessage(6, getCheckInterval()); + } + if (timeout_ != null) { + output.writeMessage(7, getTimeout()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (disableHealthCheck_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, disableHealthCheck_); + } + if (!getHostBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, host_); + } + if (healthyThreshold_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, healthyThreshold_); + } + if (unhealthyThreshold_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, unhealthyThreshold_); + } + if (restartThreshold_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, restartThreshold_); + } + if (checkInterval_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCheckInterval()); + } + if (timeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTimeout()); + } + 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.appengine.v1.HealthCheck)) { + return super.equals(obj); + } + com.google.appengine.v1.HealthCheck other = (com.google.appengine.v1.HealthCheck) obj; + + if (getDisableHealthCheck() != other.getDisableHealthCheck()) return false; + if (!getHost().equals(other.getHost())) return false; + if (getHealthyThreshold() != other.getHealthyThreshold()) return false; + if (getUnhealthyThreshold() != other.getUnhealthyThreshold()) return false; + if (getRestartThreshold() != other.getRestartThreshold()) return false; + if (hasCheckInterval() != other.hasCheckInterval()) return false; + if (hasCheckInterval()) { + if (!getCheckInterval().equals(other.getCheckInterval())) return false; + } + if (hasTimeout() != other.hasTimeout()) return false; + if (hasTimeout()) { + if (!getTimeout().equals(other.getTimeout())) 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) + DISABLE_HEALTH_CHECK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableHealthCheck()); + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (37 * hash) + HEALTHY_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getHealthyThreshold(); + hash = (37 * hash) + UNHEALTHY_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getUnhealthyThreshold(); + hash = (37 * hash) + RESTART_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getRestartThreshold(); + if (hasCheckInterval()) { + hash = (37 * hash) + CHECK_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getCheckInterval().hashCode(); + } + if (hasTimeout()) { + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.HealthCheck parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.HealthCheck parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.HealthCheck parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.HealthCheck 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.appengine.v1.HealthCheck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.HealthCheck parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.HealthCheck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.HealthCheck 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.appengine.v1.HealthCheck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.HealthCheck 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.appengine.v1.HealthCheck parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.HealthCheck 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.appengine.v1.HealthCheck 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; + } + /** + * + * + *
+   * Health checking configuration for VM instances. Unhealthy instances
+   * are killed and replaced with new instances. Only applicable for
+   * instances in App Engine flexible environment.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.HealthCheck} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.HealthCheck) + com.google.appengine.v1.HealthCheckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_HealthCheck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_HealthCheck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.HealthCheck.class, + com.google.appengine.v1.HealthCheck.Builder.class); + } + + // Construct using com.google.appengine.v1.HealthCheck.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(); + disableHealthCheck_ = false; + + host_ = ""; + + healthyThreshold_ = 0; + + unhealthyThreshold_ = 0; + + restartThreshold_ = 0; + + if (checkIntervalBuilder_ == null) { + checkInterval_ = null; + } else { + checkInterval_ = null; + checkIntervalBuilder_ = null; + } + if (timeoutBuilder_ == null) { + timeout_ = null; + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_HealthCheck_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.HealthCheck getDefaultInstanceForType() { + return com.google.appengine.v1.HealthCheck.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.HealthCheck build() { + com.google.appengine.v1.HealthCheck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.HealthCheck buildPartial() { + com.google.appengine.v1.HealthCheck result = new com.google.appengine.v1.HealthCheck(this); + result.disableHealthCheck_ = disableHealthCheck_; + result.host_ = host_; + result.healthyThreshold_ = healthyThreshold_; + result.unhealthyThreshold_ = unhealthyThreshold_; + result.restartThreshold_ = restartThreshold_; + if (checkIntervalBuilder_ == null) { + result.checkInterval_ = checkInterval_; + } else { + result.checkInterval_ = checkIntervalBuilder_.build(); + } + if (timeoutBuilder_ == null) { + result.timeout_ = timeout_; + } else { + result.timeout_ = timeoutBuilder_.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.appengine.v1.HealthCheck) { + return mergeFrom((com.google.appengine.v1.HealthCheck) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.HealthCheck other) { + if (other == com.google.appengine.v1.HealthCheck.getDefaultInstance()) return this; + if (other.getDisableHealthCheck() != false) { + setDisableHealthCheck(other.getDisableHealthCheck()); + } + if (!other.getHost().isEmpty()) { + host_ = other.host_; + onChanged(); + } + if (other.getHealthyThreshold() != 0) { + setHealthyThreshold(other.getHealthyThreshold()); + } + if (other.getUnhealthyThreshold() != 0) { + setUnhealthyThreshold(other.getUnhealthyThreshold()); + } + if (other.getRestartThreshold() != 0) { + setRestartThreshold(other.getRestartThreshold()); + } + if (other.hasCheckInterval()) { + mergeCheckInterval(other.getCheckInterval()); + } + if (other.hasTimeout()) { + mergeTimeout(other.getTimeout()); + } + 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.appengine.v1.HealthCheck parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.HealthCheck) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean disableHealthCheck_; + /** + * + * + *
+     * Whether to explicitly disable health checks for this instance.
+     * 
+ * + * bool disable_health_check = 1; + * + * @return The disableHealthCheck. + */ + @java.lang.Override + public boolean getDisableHealthCheck() { + return disableHealthCheck_; + } + /** + * + * + *
+     * Whether to explicitly disable health checks for this instance.
+     * 
+ * + * bool disable_health_check = 1; + * + * @param value The disableHealthCheck to set. + * @return This builder for chaining. + */ + public Builder setDisableHealthCheck(boolean value) { + + disableHealthCheck_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to explicitly disable health checks for this instance.
+     * 
+ * + * bool disable_health_check = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisableHealthCheck() { + + disableHealthCheck_ = false; + onChanged(); + return this; + } + + private java.lang.Object host_ = ""; + /** + * + * + *
+     * Host header to send when performing an HTTP health check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Host header to send when performing an HTTP health check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @return The bytes for host. + */ + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Host header to send when performing an HTTP health check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + host_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Host header to send when performing an HTTP health check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @return This builder for chaining. + */ + public Builder clearHost() { + + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + * + * + *
+     * Host header to send when performing an HTTP health check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + host_ = value; + onChanged(); + return this; + } + + private int healthyThreshold_; + /** + * + * + *
+     * Number of consecutive successful health checks required before receiving
+     * traffic.
+     * 
+ * + * uint32 healthy_threshold = 3; + * + * @return The healthyThreshold. + */ + @java.lang.Override + public int getHealthyThreshold() { + return healthyThreshold_; + } + /** + * + * + *
+     * Number of consecutive successful health checks required before receiving
+     * traffic.
+     * 
+ * + * uint32 healthy_threshold = 3; + * + * @param value The healthyThreshold to set. + * @return This builder for chaining. + */ + public Builder setHealthyThreshold(int value) { + + healthyThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of consecutive successful health checks required before receiving
+     * traffic.
+     * 
+ * + * uint32 healthy_threshold = 3; + * + * @return This builder for chaining. + */ + public Builder clearHealthyThreshold() { + + healthyThreshold_ = 0; + onChanged(); + return this; + } + + private int unhealthyThreshold_; + /** + * + * + *
+     * Number of consecutive failed health checks required before removing
+     * traffic.
+     * 
+ * + * uint32 unhealthy_threshold = 4; + * + * @return The unhealthyThreshold. + */ + @java.lang.Override + public int getUnhealthyThreshold() { + return unhealthyThreshold_; + } + /** + * + * + *
+     * Number of consecutive failed health checks required before removing
+     * traffic.
+     * 
+ * + * uint32 unhealthy_threshold = 4; + * + * @param value The unhealthyThreshold to set. + * @return This builder for chaining. + */ + public Builder setUnhealthyThreshold(int value) { + + unhealthyThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of consecutive failed health checks required before removing
+     * traffic.
+     * 
+ * + * uint32 unhealthy_threshold = 4; + * + * @return This builder for chaining. + */ + public Builder clearUnhealthyThreshold() { + + unhealthyThreshold_ = 0; + onChanged(); + return this; + } + + private int restartThreshold_; + /** + * + * + *
+     * Number of consecutive failed health checks required before an instance is
+     * restarted.
+     * 
+ * + * uint32 restart_threshold = 5; + * + * @return The restartThreshold. + */ + @java.lang.Override + public int getRestartThreshold() { + return restartThreshold_; + } + /** + * + * + *
+     * Number of consecutive failed health checks required before an instance is
+     * restarted.
+     * 
+ * + * uint32 restart_threshold = 5; + * + * @param value The restartThreshold to set. + * @return This builder for chaining. + */ + public Builder setRestartThreshold(int value) { + + restartThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of consecutive failed health checks required before an instance is
+     * restarted.
+     * 
+ * + * uint32 restart_threshold = 5; + * + * @return This builder for chaining. + */ + public Builder clearRestartThreshold() { + + restartThreshold_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration checkInterval_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + checkIntervalBuilder_; + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 6; + * + * @return Whether the checkInterval field is set. + */ + public boolean hasCheckInterval() { + return checkIntervalBuilder_ != null || checkInterval_ != null; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 6; + * + * @return The checkInterval. + */ + public com.google.protobuf.Duration getCheckInterval() { + if (checkIntervalBuilder_ == null) { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } else { + return checkIntervalBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 6; + */ + public Builder setCheckInterval(com.google.protobuf.Duration value) { + if (checkIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + checkInterval_ = value; + onChanged(); + } else { + checkIntervalBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 6; + */ + public Builder setCheckInterval(com.google.protobuf.Duration.Builder builderForValue) { + if (checkIntervalBuilder_ == null) { + checkInterval_ = builderForValue.build(); + onChanged(); + } else { + checkIntervalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 6; + */ + public Builder mergeCheckInterval(com.google.protobuf.Duration value) { + if (checkIntervalBuilder_ == null) { + if (checkInterval_ != null) { + checkInterval_ = + com.google.protobuf.Duration.newBuilder(checkInterval_) + .mergeFrom(value) + .buildPartial(); + } else { + checkInterval_ = value; + } + onChanged(); + } else { + checkIntervalBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 6; + */ + public Builder clearCheckInterval() { + if (checkIntervalBuilder_ == null) { + checkInterval_ = null; + onChanged(); + } else { + checkInterval_ = null; + checkIntervalBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 6; + */ + public com.google.protobuf.Duration.Builder getCheckIntervalBuilder() { + + onChanged(); + return getCheckIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 6; + */ + public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() { + if (checkIntervalBuilder_ != null) { + return checkIntervalBuilder_.getMessageOrBuilder(); + } else { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getCheckIntervalFieldBuilder() { + if (checkIntervalBuilder_ == null) { + checkIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getCheckInterval(), getParentForChildren(), isClean()); + checkInterval_ = null; + } + return checkIntervalBuilder_; + } + + private com.google.protobuf.Duration timeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeoutBuilder_; + /** + * + * + *
+     * Time before the health check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 7; + * + * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return timeoutBuilder_ != null || timeout_ != null; + } + /** + * + * + *
+     * Time before the health check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 7; + * + * @return The timeout. + */ + public com.google.protobuf.Duration getTimeout() { + if (timeoutBuilder_ == null) { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } else { + return timeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time before the health check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 7; + */ + public Builder setTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeout_ = value; + onChanged(); + } else { + timeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time before the health check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 7; + */ + public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (timeoutBuilder_ == null) { + timeout_ = builderForValue.build(); + onChanged(); + } else { + timeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time before the health check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 7; + */ + public Builder mergeTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (timeout_ != null) { + timeout_ = + com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial(); + } else { + timeout_ = value; + } + onChanged(); + } else { + timeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time before the health check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 7; + */ + public Builder clearTimeout() { + if (timeoutBuilder_ == null) { + timeout_ = null; + onChanged(); + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time before the health check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 7; + */ + public com.google.protobuf.Duration.Builder getTimeoutBuilder() { + + onChanged(); + return getTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time before the health check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 7; + */ + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + if (timeoutBuilder_ != null) { + return timeoutBuilder_.getMessageOrBuilder(); + } else { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + } + /** + * + * + *
+     * Time before the health check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeoutFieldBuilder() { + if (timeoutBuilder_ == null) { + timeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeout(), getParentForChildren(), isClean()); + timeout_ = null; + } + return timeoutBuilder_; + } + + @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.appengine.v1.HealthCheck) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.HealthCheck) + private static final com.google.appengine.v1.HealthCheck DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.HealthCheck(); + } + + public static com.google.appengine.v1.HealthCheck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HealthCheck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HealthCheck(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.appengine.v1.HealthCheck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/HealthCheckOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/HealthCheckOrBuilder.java new file mode 100644 index 00000000..be94da41 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/HealthCheckOrBuilder.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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface HealthCheckOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.HealthCheck) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether to explicitly disable health checks for this instance.
+   * 
+ * + * bool disable_health_check = 1; + * + * @return The disableHealthCheck. + */ + boolean getDisableHealthCheck(); + + /** + * + * + *
+   * Host header to send when performing an HTTP health check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The host. + */ + java.lang.String getHost(); + /** + * + * + *
+   * Host header to send when performing an HTTP health check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The bytes for host. + */ + com.google.protobuf.ByteString getHostBytes(); + + /** + * + * + *
+   * Number of consecutive successful health checks required before receiving
+   * traffic.
+   * 
+ * + * uint32 healthy_threshold = 3; + * + * @return The healthyThreshold. + */ + int getHealthyThreshold(); + + /** + * + * + *
+   * Number of consecutive failed health checks required before removing
+   * traffic.
+   * 
+ * + * uint32 unhealthy_threshold = 4; + * + * @return The unhealthyThreshold. + */ + int getUnhealthyThreshold(); + + /** + * + * + *
+   * Number of consecutive failed health checks required before an instance is
+   * restarted.
+   * 
+ * + * uint32 restart_threshold = 5; + * + * @return The restartThreshold. + */ + int getRestartThreshold(); + + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 6; + * + * @return Whether the checkInterval field is set. + */ + boolean hasCheckInterval(); + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 6; + * + * @return The checkInterval. + */ + com.google.protobuf.Duration getCheckInterval(); + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 6; + */ + com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder(); + + /** + * + * + *
+   * Time before the health check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 7; + * + * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + /** + * + * + *
+   * Time before the health check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 7; + * + * @return The timeout. + */ + com.google.protobuf.Duration getTimeout(); + /** + * + * + *
+   * Time before the health check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 7; + */ + com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InboundServiceType.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InboundServiceType.java new file mode 100644 index 00000000..8c8586d9 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InboundServiceType.java @@ -0,0 +1,312 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Available inbound services.
+ * 
+ * + * Protobuf enum {@code google.appengine.v1.InboundServiceType} + */ +public enum InboundServiceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified.
+   * 
+ * + * INBOUND_SERVICE_UNSPECIFIED = 0; + */ + INBOUND_SERVICE_UNSPECIFIED(0), + /** + * + * + *
+   * Allows an application to receive mail.
+   * 
+ * + * INBOUND_SERVICE_MAIL = 1; + */ + INBOUND_SERVICE_MAIL(1), + /** + * + * + *
+   * Allows an application to receive email-bound notifications.
+   * 
+ * + * INBOUND_SERVICE_MAIL_BOUNCE = 2; + */ + INBOUND_SERVICE_MAIL_BOUNCE(2), + /** + * + * + *
+   * Allows an application to receive error stanzas.
+   * 
+ * + * INBOUND_SERVICE_XMPP_ERROR = 3; + */ + INBOUND_SERVICE_XMPP_ERROR(3), + /** + * + * + *
+   * Allows an application to receive instant messages.
+   * 
+ * + * INBOUND_SERVICE_XMPP_MESSAGE = 4; + */ + INBOUND_SERVICE_XMPP_MESSAGE(4), + /** + * + * + *
+   * Allows an application to receive user subscription POSTs.
+   * 
+ * + * INBOUND_SERVICE_XMPP_SUBSCRIBE = 5; + */ + INBOUND_SERVICE_XMPP_SUBSCRIBE(5), + /** + * + * + *
+   * Allows an application to receive a user's chat presence.
+   * 
+ * + * INBOUND_SERVICE_XMPP_PRESENCE = 6; + */ + INBOUND_SERVICE_XMPP_PRESENCE(6), + /** + * + * + *
+   * Registers an application for notifications when a client connects or
+   * disconnects from a channel.
+   * 
+ * + * INBOUND_SERVICE_CHANNEL_PRESENCE = 7; + */ + INBOUND_SERVICE_CHANNEL_PRESENCE(7), + /** + * + * + *
+   * Enables warmup requests.
+   * 
+ * + * INBOUND_SERVICE_WARMUP = 9; + */ + INBOUND_SERVICE_WARMUP(9), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified.
+   * 
+ * + * INBOUND_SERVICE_UNSPECIFIED = 0; + */ + public static final int INBOUND_SERVICE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Allows an application to receive mail.
+   * 
+ * + * INBOUND_SERVICE_MAIL = 1; + */ + public static final int INBOUND_SERVICE_MAIL_VALUE = 1; + /** + * + * + *
+   * Allows an application to receive email-bound notifications.
+   * 
+ * + * INBOUND_SERVICE_MAIL_BOUNCE = 2; + */ + public static final int INBOUND_SERVICE_MAIL_BOUNCE_VALUE = 2; + /** + * + * + *
+   * Allows an application to receive error stanzas.
+   * 
+ * + * INBOUND_SERVICE_XMPP_ERROR = 3; + */ + public static final int INBOUND_SERVICE_XMPP_ERROR_VALUE = 3; + /** + * + * + *
+   * Allows an application to receive instant messages.
+   * 
+ * + * INBOUND_SERVICE_XMPP_MESSAGE = 4; + */ + public static final int INBOUND_SERVICE_XMPP_MESSAGE_VALUE = 4; + /** + * + * + *
+   * Allows an application to receive user subscription POSTs.
+   * 
+ * + * INBOUND_SERVICE_XMPP_SUBSCRIBE = 5; + */ + public static final int INBOUND_SERVICE_XMPP_SUBSCRIBE_VALUE = 5; + /** + * + * + *
+   * Allows an application to receive a user's chat presence.
+   * 
+ * + * INBOUND_SERVICE_XMPP_PRESENCE = 6; + */ + public static final int INBOUND_SERVICE_XMPP_PRESENCE_VALUE = 6; + /** + * + * + *
+   * Registers an application for notifications when a client connects or
+   * disconnects from a channel.
+   * 
+ * + * INBOUND_SERVICE_CHANNEL_PRESENCE = 7; + */ + public static final int INBOUND_SERVICE_CHANNEL_PRESENCE_VALUE = 7; + /** + * + * + *
+   * Enables warmup requests.
+   * 
+ * + * INBOUND_SERVICE_WARMUP = 9; + */ + public static final int INBOUND_SERVICE_WARMUP_VALUE = 9; + + 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 InboundServiceType 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 InboundServiceType forNumber(int value) { + switch (value) { + case 0: + return INBOUND_SERVICE_UNSPECIFIED; + case 1: + return INBOUND_SERVICE_MAIL; + case 2: + return INBOUND_SERVICE_MAIL_BOUNCE; + case 3: + return INBOUND_SERVICE_XMPP_ERROR; + case 4: + return INBOUND_SERVICE_XMPP_MESSAGE; + case 5: + return INBOUND_SERVICE_XMPP_SUBSCRIBE; + case 6: + return INBOUND_SERVICE_XMPP_PRESENCE; + case 7: + return INBOUND_SERVICE_CHANNEL_PRESENCE; + case 9: + return INBOUND_SERVICE_WARMUP; + 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 InboundServiceType findValueByNumber(int number) { + return InboundServiceType.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.appengine.v1.VersionProto.getDescriptor().getEnumTypes().get(0); + } + + private static final InboundServiceType[] VALUES = values(); + + public static InboundServiceType 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 InboundServiceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.InboundServiceType) +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Instance.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Instance.java new file mode 100644 index 00000000..0c4ccc84 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Instance.java @@ -0,0 +1,3908 @@ +/* + * 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/appengine/v1/instance.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * An Instance resource is the computing unit that App Engine uses to
+ * automatically scale an application.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.Instance} + */ +public final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instance() { + name_ = ""; + id_ = ""; + appEngineRelease_ = ""; + availability_ = 0; + vmName_ = ""; + vmZoneName_ = ""; + vmId_ = ""; + vmStatus_ = ""; + vmIp_ = ""; + vmLiveness_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Instance( + 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; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + appEngineRelease_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + availability_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmName_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmZoneName_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmId_ = s; + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 72: + { + requests_ = input.readInt32(); + break; + } + case 80: + { + errors_ = input.readInt32(); + break; + } + case 93: + { + qps_ = input.readFloat(); + break; + } + case 96: + { + averageLatency_ = input.readInt32(); + break; + } + case 104: + { + memoryUsage_ = input.readInt64(); + break; + } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmStatus_ = s; + break; + } + case 120: + { + vmDebugEnabled_ = input.readBool(); + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmIp_ = s; + break; + } + case 136: + { + int rawValue = input.readEnum(); + + vmLiveness_ = 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.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Instance.class, com.google.appengine.v1.Instance.Builder.class); + } + + /** + * + * + *
+   * Availability of the instance.
+   * 
+ * + * Protobuf enum {@code google.appengine.v1.Instance.Availability} + */ + public enum Availability implements com.google.protobuf.ProtocolMessageEnum { + /** UNSPECIFIED = 0; */ + UNSPECIFIED(0), + /** RESIDENT = 1; */ + RESIDENT(1), + /** DYNAMIC = 2; */ + DYNAMIC(2), + UNRECOGNIZED(-1), + ; + + /** UNSPECIFIED = 0; */ + public static final int UNSPECIFIED_VALUE = 0; + /** RESIDENT = 1; */ + public static final int RESIDENT_VALUE = 1; + /** DYNAMIC = 2; */ + public static final int DYNAMIC_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 Availability 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 Availability forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED; + case 1: + return RESIDENT; + case 2: + 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 Availability findValueByNumber(int number) { + return Availability.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.appengine.v1.Instance.getDescriptor().getEnumTypes().get(0); + } + + private static final Availability[] VALUES = values(); + + public static Availability 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 Availability(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.Instance.Availability) + } + + public interface LivenessOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Instance.Liveness) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Wrapper for LivenessState enum.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Instance.Liveness} + */ + public static final class Liveness extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Instance.Liveness) + LivenessOrBuilder { + private static final long serialVersionUID = 0L; + // Use Liveness.newBuilder() to construct. + private Liveness(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Liveness() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Liveness(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Liveness( + 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; + 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.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_Liveness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_Liveness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Instance.Liveness.class, + com.google.appengine.v1.Instance.Liveness.Builder.class); + } + + /** + * + * + *
+     * Liveness health check status for Flex instances.
+     * 
+ * + * Protobuf enum {@code google.appengine.v1.Instance.Liveness.LivenessState} + */ + public enum LivenessState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * There is no liveness health check for the instance. Only applicable for
+       * instances in App Engine standard environment.
+       * 
+ * + * LIVENESS_STATE_UNSPECIFIED = 0; + */ + LIVENESS_STATE_UNSPECIFIED(0), + /** + * + * + *
+       * The health checking system is aware of the instance but its health is
+       * not known at the moment.
+       * 
+ * + * UNKNOWN = 1; + */ + UNKNOWN(1), + /** + * + * + *
+       * The instance is reachable i.e. a connection to the application health
+       * checking endpoint can be established, and conforms to the requirements
+       * defined by the health check.
+       * 
+ * + * HEALTHY = 2; + */ + HEALTHY(2), + /** + * + * + *
+       * The instance is reachable, but does not conform to the requirements
+       * defined by the health check.
+       * 
+ * + * UNHEALTHY = 3; + */ + UNHEALTHY(3), + /** + * + * + *
+       * The instance is being drained. The existing connections to the instance
+       * have time to complete, but the new ones are being refused.
+       * 
+ * + * DRAINING = 4; + */ + DRAINING(4), + /** + * + * + *
+       * The instance is unreachable i.e. a connection to the application health
+       * checking endpoint cannot be established, or the server does not respond
+       * within the specified timeout.
+       * 
+ * + * TIMEOUT = 5; + */ + TIMEOUT(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * There is no liveness health check for the instance. Only applicable for
+       * instances in App Engine standard environment.
+       * 
+ * + * LIVENESS_STATE_UNSPECIFIED = 0; + */ + public static final int LIVENESS_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The health checking system is aware of the instance but its health is
+       * not known at the moment.
+       * 
+ * + * UNKNOWN = 1; + */ + public static final int UNKNOWN_VALUE = 1; + /** + * + * + *
+       * The instance is reachable i.e. a connection to the application health
+       * checking endpoint can be established, and conforms to the requirements
+       * defined by the health check.
+       * 
+ * + * HEALTHY = 2; + */ + public static final int HEALTHY_VALUE = 2; + /** + * + * + *
+       * The instance is reachable, but does not conform to the requirements
+       * defined by the health check.
+       * 
+ * + * UNHEALTHY = 3; + */ + public static final int UNHEALTHY_VALUE = 3; + /** + * + * + *
+       * The instance is being drained. The existing connections to the instance
+       * have time to complete, but the new ones are being refused.
+       * 
+ * + * DRAINING = 4; + */ + public static final int DRAINING_VALUE = 4; + /** + * + * + *
+       * The instance is unreachable i.e. a connection to the application health
+       * checking endpoint cannot be established, or the server does not respond
+       * within the specified timeout.
+       * 
+ * + * TIMEOUT = 5; + */ + public static final int TIMEOUT_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 LivenessState 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 LivenessState forNumber(int value) { + switch (value) { + case 0: + return LIVENESS_STATE_UNSPECIFIED; + case 1: + return UNKNOWN; + case 2: + return HEALTHY; + case 3: + return UNHEALTHY; + case 4: + return DRAINING; + case 5: + return TIMEOUT; + 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 LivenessState findValueByNumber(int number) { + return LivenessState.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.appengine.v1.Instance.Liveness.getDescriptor().getEnumTypes().get(0); + } + + private static final LivenessState[] VALUES = values(); + + public static LivenessState 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 LivenessState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.Instance.Liveness.LivenessState) + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.appengine.v1.Instance.Liveness)) { + return super.equals(obj); + } + com.google.appengine.v1.Instance.Liveness other = + (com.google.appengine.v1.Instance.Liveness) obj; + + 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Instance.Liveness parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Instance.Liveness parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Instance.Liveness parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Instance.Liveness 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.appengine.v1.Instance.Liveness parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Instance.Liveness parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Instance.Liveness parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Instance.Liveness 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.appengine.v1.Instance.Liveness parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Instance.Liveness 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.appengine.v1.Instance.Liveness parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Instance.Liveness 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.appengine.v1.Instance.Liveness 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; + } + /** + * + * + *
+     * Wrapper for LivenessState enum.
+     * 
+ * + * Protobuf type {@code google.appengine.v1.Instance.Liveness} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Instance.Liveness) + com.google.appengine.v1.Instance.LivenessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_Liveness_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_Liveness_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Instance.Liveness.class, + com.google.appengine.v1.Instance.Liveness.Builder.class); + } + + // Construct using com.google.appengine.v1.Instance.Liveness.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(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_Liveness_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Instance.Liveness getDefaultInstanceForType() { + return com.google.appengine.v1.Instance.Liveness.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Instance.Liveness build() { + com.google.appengine.v1.Instance.Liveness result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Instance.Liveness buildPartial() { + com.google.appengine.v1.Instance.Liveness result = + new com.google.appengine.v1.Instance.Liveness(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.appengine.v1.Instance.Liveness) { + return mergeFrom((com.google.appengine.v1.Instance.Liveness) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Instance.Liveness other) { + if (other == com.google.appengine.v1.Instance.Liveness.getDefaultInstance()) return this; + 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.appengine.v1.Instance.Liveness parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Instance.Liveness) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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.appengine.v1.Instance.Liveness) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Instance.Liveness) + private static final com.google.appengine.v1.Instance.Liveness DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Instance.Liveness(); + } + + public static com.google.appengine.v1.Instance.Liveness getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Liveness parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Liveness(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.appengine.v1.Instance.Liveness getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Full path to the Instance resource in the API.
+   * Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. Full path to the Instance resource in the API.
+   * Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Output only. Relative name of the instance within the version.
+   * Example: `instance-1`.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Relative name of the instance within the version.
+   * Example: `instance-1`.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_ENGINE_RELEASE_FIELD_NUMBER = 3; + private volatile java.lang.Object appEngineRelease_; + /** + * + * + *
+   * Output only. App Engine release this instance is running on.
+   * 
+ * + * string app_engine_release = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The appEngineRelease. + */ + @java.lang.Override + public java.lang.String getAppEngineRelease() { + java.lang.Object ref = appEngineRelease_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appEngineRelease_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. App Engine release this instance is running on.
+   * 
+ * + * string app_engine_release = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for appEngineRelease. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppEngineReleaseBytes() { + java.lang.Object ref = appEngineRelease_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appEngineRelease_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVAILABILITY_FIELD_NUMBER = 4; + private int availability_; + /** + * + * + *
+   * Output only. Availability of the instance.
+   * 
+ * + * + * .google.appengine.v1.Instance.Availability availability = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for availability. + */ + @java.lang.Override + public int getAvailabilityValue() { + return availability_; + } + /** + * + * + *
+   * Output only. Availability of the instance.
+   * 
+ * + * + * .google.appengine.v1.Instance.Availability availability = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The availability. + */ + @java.lang.Override + public com.google.appengine.v1.Instance.Availability getAvailability() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.Instance.Availability result = + com.google.appengine.v1.Instance.Availability.valueOf(availability_); + return result == null ? com.google.appengine.v1.Instance.Availability.UNRECOGNIZED : result; + } + + public static final int VM_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object vmName_; + /** + * + * + *
+   * Output only. Name of the virtual machine where this instance lives. Only applicable
+   * for instances in App Engine flexible environment.
+   * 
+ * + * string vm_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmName. + */ + @java.lang.Override + public java.lang.String getVmName() { + java.lang.Object ref = vmName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the virtual machine where this instance lives. Only applicable
+   * for instances in App Engine flexible environment.
+   * 
+ * + * string vm_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmNameBytes() { + java.lang.Object ref = vmName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_ZONE_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object vmZoneName_; + /** + * + * + *
+   * Output only. Zone where the virtual machine is located. Only applicable for instances
+   * in App Engine flexible environment.
+   * 
+ * + * string vm_zone_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmZoneName. + */ + @java.lang.Override + public java.lang.String getVmZoneName() { + java.lang.Object ref = vmZoneName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmZoneName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Zone where the virtual machine is located. Only applicable for instances
+   * in App Engine flexible environment.
+   * 
+ * + * string vm_zone_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmZoneName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmZoneNameBytes() { + java.lang.Object ref = vmZoneName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmZoneName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object vmId_; + /** + * + * + *
+   * Output only. Virtual machine ID of this instance. Only applicable for instances in
+   * App Engine flexible environment.
+   * 
+ * + * string vm_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmId. + */ + @java.lang.Override + public java.lang.String getVmId() { + java.lang.Object ref = vmId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Virtual machine ID of this instance. Only applicable for instances in
+   * App Engine flexible environment.
+   * 
+ * + * string vm_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmIdBytes() { + java.lang.Object ref = vmId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time that this instance was started.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Time that this instance was started.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time that this instance was started.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int REQUESTS_FIELD_NUMBER = 9; + private int requests_; + /** + * + * + *
+   * Output only. Number of requests since this instance was started.
+   * 
+ * + * int32 requests = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requests. + */ + @java.lang.Override + public int getRequests() { + return requests_; + } + + public static final int ERRORS_FIELD_NUMBER = 10; + private int errors_; + /** + * + * + *
+   * Output only. Number of errors since this instance was started.
+   * 
+ * + * int32 errors = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errors. + */ + @java.lang.Override + public int getErrors() { + return errors_; + } + + public static final int QPS_FIELD_NUMBER = 11; + private float qps_; + /** + * + * + *
+   * Output only. Average queries per second (QPS) over the last minute.
+   * 
+ * + * float qps = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The qps. + */ + @java.lang.Override + public float getQps() { + return qps_; + } + + public static final int AVERAGE_LATENCY_FIELD_NUMBER = 12; + private int averageLatency_; + /** + * + * + *
+   * Output only. Average latency (ms) over the last minute.
+   * 
+ * + * int32 average_latency = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The averageLatency. + */ + @java.lang.Override + public int getAverageLatency() { + return averageLatency_; + } + + public static final int MEMORY_USAGE_FIELD_NUMBER = 13; + private long memoryUsage_; + /** + * + * + *
+   * Output only. Total memory in use (bytes).
+   * 
+ * + * int64 memory_usage = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The memoryUsage. + */ + @java.lang.Override + public long getMemoryUsage() { + return memoryUsage_; + } + + public static final int VM_STATUS_FIELD_NUMBER = 14; + private volatile java.lang.Object vmStatus_; + /** + * + * + *
+   * Output only. Status of the virtual machine where this instance lives. Only applicable
+   * for instances in App Engine flexible environment.
+   * 
+ * + * string vm_status = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmStatus. + */ + @java.lang.Override + public java.lang.String getVmStatus() { + java.lang.Object ref = vmStatus_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmStatus_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Status of the virtual machine where this instance lives. Only applicable
+   * for instances in App Engine flexible environment.
+   * 
+ * + * string vm_status = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmStatus. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmStatusBytes() { + java.lang.Object ref = vmStatus_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmStatus_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_DEBUG_ENABLED_FIELD_NUMBER = 15; + private boolean vmDebugEnabled_; + /** + * + * + *
+   * Output only. Whether this instance is in debug mode. Only applicable for instances in
+   * App Engine flexible environment.
+   * 
+ * + * bool vm_debug_enabled = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmDebugEnabled. + */ + @java.lang.Override + public boolean getVmDebugEnabled() { + return vmDebugEnabled_; + } + + public static final int VM_IP_FIELD_NUMBER = 16; + private volatile java.lang.Object vmIp_; + /** + * + * + *
+   * Output only. The IP address of this instance. Only applicable for instances in App
+   * Engine flexible environment.
+   * 
+ * + * string vm_ip = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmIp. + */ + @java.lang.Override + public java.lang.String getVmIp() { + java.lang.Object ref = vmIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmIp_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The IP address of this instance. Only applicable for instances in App
+   * Engine flexible environment.
+   * 
+ * + * string vm_ip = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmIpBytes() { + java.lang.Object ref = vmIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_LIVENESS_FIELD_NUMBER = 17; + private int vmLiveness_; + /** + * + * + *
+   * Output only. The liveness health check of this instance. Only applicable for instances
+   * in App Engine flexible environment.
+   * 
+ * + * + * .google.appengine.v1.Instance.Liveness.LivenessState vm_liveness = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for vmLiveness. + */ + @java.lang.Override + public int getVmLivenessValue() { + return vmLiveness_; + } + /** + * + * + *
+   * Output only. The liveness health check of this instance. Only applicable for instances
+   * in App Engine flexible environment.
+   * 
+ * + * + * .google.appengine.v1.Instance.Liveness.LivenessState vm_liveness = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The vmLiveness. + */ + @java.lang.Override + public com.google.appengine.v1.Instance.Liveness.LivenessState getVmLiveness() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.Instance.Liveness.LivenessState result = + com.google.appengine.v1.Instance.Liveness.LivenessState.valueOf(vmLiveness_); + return result == null + ? com.google.appengine.v1.Instance.Liveness.LivenessState.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (!getAppEngineReleaseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, appEngineRelease_); + } + if (availability_ != com.google.appengine.v1.Instance.Availability.UNSPECIFIED.getNumber()) { + output.writeEnum(4, availability_); + } + if (!getVmNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, vmName_); + } + if (!getVmZoneNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, vmZoneName_); + } + if (!getVmIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, vmId_); + } + if (startTime_ != null) { + output.writeMessage(8, getStartTime()); + } + if (requests_ != 0) { + output.writeInt32(9, requests_); + } + if (errors_ != 0) { + output.writeInt32(10, errors_); + } + if (qps_ != 0F) { + output.writeFloat(11, qps_); + } + if (averageLatency_ != 0) { + output.writeInt32(12, averageLatency_); + } + if (memoryUsage_ != 0L) { + output.writeInt64(13, memoryUsage_); + } + if (!getVmStatusBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, vmStatus_); + } + if (vmDebugEnabled_ != false) { + output.writeBool(15, vmDebugEnabled_); + } + if (!getVmIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, vmIp_); + } + if (vmLiveness_ + != com.google.appengine.v1.Instance.Liveness.LivenessState.LIVENESS_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(17, vmLiveness_); + } + 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 (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (!getAppEngineReleaseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, appEngineRelease_); + } + if (availability_ != com.google.appengine.v1.Instance.Availability.UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, availability_); + } + if (!getVmNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, vmName_); + } + if (!getVmZoneNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, vmZoneName_); + } + if (!getVmIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, vmId_); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); + } + if (requests_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, requests_); + } + if (errors_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, errors_); + } + if (qps_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(11, qps_); + } + if (averageLatency_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, averageLatency_); + } + if (memoryUsage_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(13, memoryUsage_); + } + if (!getVmStatusBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, vmStatus_); + } + if (vmDebugEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, vmDebugEnabled_); + } + if (!getVmIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, vmIp_); + } + if (vmLiveness_ + != com.google.appengine.v1.Instance.Liveness.LivenessState.LIVENESS_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, vmLiveness_); + } + 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.appengine.v1.Instance)) { + return super.equals(obj); + } + com.google.appengine.v1.Instance other = (com.google.appengine.v1.Instance) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; + if (!getAppEngineRelease().equals(other.getAppEngineRelease())) return false; + if (availability_ != other.availability_) return false; + if (!getVmName().equals(other.getVmName())) return false; + if (!getVmZoneName().equals(other.getVmZoneName())) return false; + if (!getVmId().equals(other.getVmId())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (getRequests() != other.getRequests()) return false; + if (getErrors() != other.getErrors()) return false; + if (java.lang.Float.floatToIntBits(getQps()) != java.lang.Float.floatToIntBits(other.getQps())) + return false; + if (getAverageLatency() != other.getAverageLatency()) return false; + if (getMemoryUsage() != other.getMemoryUsage()) return false; + if (!getVmStatus().equals(other.getVmStatus())) return false; + if (getVmDebugEnabled() != other.getVmDebugEnabled()) return false; + if (!getVmIp().equals(other.getVmIp())) return false; + if (vmLiveness_ != other.vmLiveness_) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + APP_ENGINE_RELEASE_FIELD_NUMBER; + hash = (53 * hash) + getAppEngineRelease().hashCode(); + hash = (37 * hash) + AVAILABILITY_FIELD_NUMBER; + hash = (53 * hash) + availability_; + hash = (37 * hash) + VM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getVmName().hashCode(); + hash = (37 * hash) + VM_ZONE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getVmZoneName().hashCode(); + hash = (37 * hash) + VM_ID_FIELD_NUMBER; + hash = (53 * hash) + getVmId().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequests(); + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrors(); + hash = (37 * hash) + QPS_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getQps()); + hash = (37 * hash) + AVERAGE_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + getAverageLatency(); + hash = (37 * hash) + MEMORY_USAGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMemoryUsage()); + hash = (37 * hash) + VM_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getVmStatus().hashCode(); + hash = (37 * hash) + VM_DEBUG_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVmDebugEnabled()); + hash = (37 * hash) + VM_IP_FIELD_NUMBER; + hash = (53 * hash) + getVmIp().hashCode(); + hash = (37 * hash) + VM_LIVENESS_FIELD_NUMBER; + hash = (53 * hash) + vmLiveness_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Instance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Instance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Instance parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Instance 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.appengine.v1.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Instance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Instance 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.appengine.v1.Instance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Instance 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.appengine.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Instance 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.appengine.v1.Instance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An Instance resource is the computing unit that App Engine uses to
+   * automatically scale an application.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Instance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Instance) + com.google.appengine.v1.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Instance.class, + com.google.appengine.v1.Instance.Builder.class); + } + + // Construct using com.google.appengine.v1.Instance.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_ = ""; + + id_ = ""; + + appEngineRelease_ = ""; + + availability_ = 0; + + vmName_ = ""; + + vmZoneName_ = ""; + + vmId_ = ""; + + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + requests_ = 0; + + errors_ = 0; + + qps_ = 0F; + + averageLatency_ = 0; + + memoryUsage_ = 0L; + + vmStatus_ = ""; + + vmDebugEnabled_ = false; + + vmIp_ = ""; + + vmLiveness_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.InstanceProto + .internal_static_google_appengine_v1_Instance_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Instance getDefaultInstanceForType() { + return com.google.appengine.v1.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Instance build() { + com.google.appengine.v1.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Instance buildPartial() { + com.google.appengine.v1.Instance result = new com.google.appengine.v1.Instance(this); + result.name_ = name_; + result.id_ = id_; + result.appEngineRelease_ = appEngineRelease_; + result.availability_ = availability_; + result.vmName_ = vmName_; + result.vmZoneName_ = vmZoneName_; + result.vmId_ = vmId_; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + result.requests_ = requests_; + result.errors_ = errors_; + result.qps_ = qps_; + result.averageLatency_ = averageLatency_; + result.memoryUsage_ = memoryUsage_; + result.vmStatus_ = vmStatus_; + result.vmDebugEnabled_ = vmDebugEnabled_; + result.vmIp_ = vmIp_; + result.vmLiveness_ = vmLiveness_; + 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.appengine.v1.Instance) { + return mergeFrom((com.google.appengine.v1.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Instance other) { + if (other == com.google.appengine.v1.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getAppEngineRelease().isEmpty()) { + appEngineRelease_ = other.appEngineRelease_; + onChanged(); + } + if (other.availability_ != 0) { + setAvailabilityValue(other.getAvailabilityValue()); + } + if (!other.getVmName().isEmpty()) { + vmName_ = other.vmName_; + onChanged(); + } + if (!other.getVmZoneName().isEmpty()) { + vmZoneName_ = other.vmZoneName_; + onChanged(); + } + if (!other.getVmId().isEmpty()) { + vmId_ = other.vmId_; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.getRequests() != 0) { + setRequests(other.getRequests()); + } + if (other.getErrors() != 0) { + setErrors(other.getErrors()); + } + if (other.getQps() != 0F) { + setQps(other.getQps()); + } + if (other.getAverageLatency() != 0) { + setAverageLatency(other.getAverageLatency()); + } + if (other.getMemoryUsage() != 0L) { + setMemoryUsage(other.getMemoryUsage()); + } + if (!other.getVmStatus().isEmpty()) { + vmStatus_ = other.vmStatus_; + onChanged(); + } + if (other.getVmDebugEnabled() != false) { + setVmDebugEnabled(other.getVmDebugEnabled()); + } + if (!other.getVmIp().isEmpty()) { + vmIp_ = other.vmIp_; + onChanged(); + } + if (other.vmLiveness_ != 0) { + setVmLivenessValue(other.getVmLivenessValue()); + } + 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.appengine.v1.Instance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Instance) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Full path to the Instance resource in the API.
+     * Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Full path to the Instance resource in the API.
+     * Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Full path to the Instance resource in the API.
+     * Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + /** + * + * + *
+     * Output only. Full path to the Instance resource in the API.
+     * Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Full path to the Instance resource in the API.
+     * Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 id_ = ""; + /** + * + * + *
+     * Output only. Relative name of the instance within the version.
+     * Example: `instance-1`.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Relative name of the instance within the version.
+     * Example: `instance-1`.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Relative name of the instance within the version.
+     * Example: `instance-1`.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Relative name of the instance within the version.
+     * Example: `instance-1`.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Relative name of the instance within the version.
+     * Example: `instance-1`.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object appEngineRelease_ = ""; + /** + * + * + *
+     * Output only. App Engine release this instance is running on.
+     * 
+ * + * string app_engine_release = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The appEngineRelease. + */ + public java.lang.String getAppEngineRelease() { + java.lang.Object ref = appEngineRelease_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appEngineRelease_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. App Engine release this instance is running on.
+     * 
+ * + * string app_engine_release = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for appEngineRelease. + */ + public com.google.protobuf.ByteString getAppEngineReleaseBytes() { + java.lang.Object ref = appEngineRelease_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appEngineRelease_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. App Engine release this instance is running on.
+     * 
+ * + * string app_engine_release = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The appEngineRelease to set. + * @return This builder for chaining. + */ + public Builder setAppEngineRelease(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + appEngineRelease_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. App Engine release this instance is running on.
+     * 
+ * + * string app_engine_release = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAppEngineRelease() { + + appEngineRelease_ = getDefaultInstance().getAppEngineRelease(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. App Engine release this instance is running on.
+     * 
+ * + * string app_engine_release = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for appEngineRelease to set. + * @return This builder for chaining. + */ + public Builder setAppEngineReleaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + appEngineRelease_ = value; + onChanged(); + return this; + } + + private int availability_ = 0; + /** + * + * + *
+     * Output only. Availability of the instance.
+     * 
+ * + * + * .google.appengine.v1.Instance.Availability availability = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for availability. + */ + @java.lang.Override + public int getAvailabilityValue() { + return availability_; + } + /** + * + * + *
+     * Output only. Availability of the instance.
+     * 
+ * + * + * .google.appengine.v1.Instance.Availability availability = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for availability to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityValue(int value) { + + availability_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Availability of the instance.
+     * 
+ * + * + * .google.appengine.v1.Instance.Availability availability = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The availability. + */ + @java.lang.Override + public com.google.appengine.v1.Instance.Availability getAvailability() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.Instance.Availability result = + com.google.appengine.v1.Instance.Availability.valueOf(availability_); + return result == null ? com.google.appengine.v1.Instance.Availability.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Availability of the instance.
+     * 
+ * + * + * .google.appengine.v1.Instance.Availability availability = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The availability to set. + * @return This builder for chaining. + */ + public Builder setAvailability(com.google.appengine.v1.Instance.Availability value) { + if (value == null) { + throw new NullPointerException(); + } + + availability_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Availability of the instance.
+     * 
+ * + * + * .google.appengine.v1.Instance.Availability availability = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAvailability() { + + availability_ = 0; + onChanged(); + return this; + } + + private java.lang.Object vmName_ = ""; + /** + * + * + *
+     * Output only. Name of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmName. + */ + public java.lang.String getVmName() { + java.lang.Object ref = vmName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmName. + */ + public com.google.protobuf.ByteString getVmNameBytes() { + java.lang.Object ref = vmName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vmName to set. + * @return This builder for chaining. + */ + public Builder setVmName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVmName() { + + vmName_ = getDefaultInstance().getVmName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for vmName to set. + * @return This builder for chaining. + */ + public Builder setVmNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmName_ = value; + onChanged(); + return this; + } + + private java.lang.Object vmZoneName_ = ""; + /** + * + * + *
+     * Output only. Zone where the virtual machine is located. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * string vm_zone_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmZoneName. + */ + public java.lang.String getVmZoneName() { + java.lang.Object ref = vmZoneName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmZoneName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Zone where the virtual machine is located. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * string vm_zone_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmZoneName. + */ + public com.google.protobuf.ByteString getVmZoneNameBytes() { + java.lang.Object ref = vmZoneName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmZoneName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Zone where the virtual machine is located. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * string vm_zone_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vmZoneName to set. + * @return This builder for chaining. + */ + public Builder setVmZoneName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmZoneName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Zone where the virtual machine is located. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * string vm_zone_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVmZoneName() { + + vmZoneName_ = getDefaultInstance().getVmZoneName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Zone where the virtual machine is located. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * string vm_zone_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for vmZoneName to set. + * @return This builder for chaining. + */ + public Builder setVmZoneNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmZoneName_ = value; + onChanged(); + return this; + } + + private java.lang.Object vmId_ = ""; + /** + * + * + *
+     * Output only. Virtual machine ID of this instance. Only applicable for instances in
+     * App Engine flexible environment.
+     * 
+ * + * string vm_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmId. + */ + public java.lang.String getVmId() { + java.lang.Object ref = vmId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Virtual machine ID of this instance. Only applicable for instances in
+     * App Engine flexible environment.
+     * 
+ * + * string vm_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmId. + */ + public com.google.protobuf.ByteString getVmIdBytes() { + java.lang.Object ref = vmId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Virtual machine ID of this instance. Only applicable for instances in
+     * App Engine flexible environment.
+     * 
+ * + * string vm_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vmId to set. + * @return This builder for chaining. + */ + public Builder setVmId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Virtual machine ID of this instance. Only applicable for instances in
+     * App Engine flexible environment.
+     * 
+ * + * string vm_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVmId() { + + vmId_ = getDefaultInstance().getVmId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Virtual machine ID of this instance. Only applicable for instances in
+     * App Engine flexible environment.
+     * 
+ * + * string vm_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for vmId to set. + * @return This builder for chaining. + */ + public Builder setVmIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time that this instance was started.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Output only. Time that this instance was started.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time that this instance was started.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time that this instance was started.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time that this instance was started.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time that this instance was started.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time that this instance was started.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time that this instance was started.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time that this instance was started.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private int requests_; + /** + * + * + *
+     * Output only. Number of requests since this instance was started.
+     * 
+ * + * int32 requests = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requests. + */ + @java.lang.Override + public int getRequests() { + return requests_; + } + /** + * + * + *
+     * Output only. Number of requests since this instance was started.
+     * 
+ * + * int32 requests = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requests to set. + * @return This builder for chaining. + */ + public Builder setRequests(int value) { + + requests_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of requests since this instance was started.
+     * 
+ * + * int32 requests = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequests() { + + requests_ = 0; + onChanged(); + return this; + } + + private int errors_; + /** + * + * + *
+     * Output only. Number of errors since this instance was started.
+     * 
+ * + * int32 errors = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errors. + */ + @java.lang.Override + public int getErrors() { + return errors_; + } + /** + * + * + *
+     * Output only. Number of errors since this instance was started.
+     * 
+ * + * int32 errors = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The errors to set. + * @return This builder for chaining. + */ + public Builder setErrors(int value) { + + errors_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of errors since this instance was started.
+     * 
+ * + * int32 errors = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearErrors() { + + errors_ = 0; + onChanged(); + return this; + } + + private float qps_; + /** + * + * + *
+     * Output only. Average queries per second (QPS) over the last minute.
+     * 
+ * + * float qps = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The qps. + */ + @java.lang.Override + public float getQps() { + return qps_; + } + /** + * + * + *
+     * Output only. Average queries per second (QPS) over the last minute.
+     * 
+ * + * float qps = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The qps to set. + * @return This builder for chaining. + */ + public Builder setQps(float value) { + + qps_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Average queries per second (QPS) over the last minute.
+     * 
+ * + * float qps = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearQps() { + + qps_ = 0F; + onChanged(); + return this; + } + + private int averageLatency_; + /** + * + * + *
+     * Output only. Average latency (ms) over the last minute.
+     * 
+ * + * int32 average_latency = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The averageLatency. + */ + @java.lang.Override + public int getAverageLatency() { + return averageLatency_; + } + /** + * + * + *
+     * Output only. Average latency (ms) over the last minute.
+     * 
+ * + * int32 average_latency = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The averageLatency to set. + * @return This builder for chaining. + */ + public Builder setAverageLatency(int value) { + + averageLatency_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Average latency (ms) over the last minute.
+     * 
+ * + * int32 average_latency = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAverageLatency() { + + averageLatency_ = 0; + onChanged(); + return this; + } + + private long memoryUsage_; + /** + * + * + *
+     * Output only. Total memory in use (bytes).
+     * 
+ * + * int64 memory_usage = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The memoryUsage. + */ + @java.lang.Override + public long getMemoryUsage() { + return memoryUsage_; + } + /** + * + * + *
+     * Output only. Total memory in use (bytes).
+     * 
+ * + * int64 memory_usage = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The memoryUsage to set. + * @return This builder for chaining. + */ + public Builder setMemoryUsage(long value) { + + memoryUsage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Total memory in use (bytes).
+     * 
+ * + * int64 memory_usage = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMemoryUsage() { + + memoryUsage_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object vmStatus_ = ""; + /** + * + * + *
+     * Output only. Status of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_status = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmStatus. + */ + public java.lang.String getVmStatus() { + java.lang.Object ref = vmStatus_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmStatus_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Status of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_status = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmStatus. + */ + public com.google.protobuf.ByteString getVmStatusBytes() { + java.lang.Object ref = vmStatus_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmStatus_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Status of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_status = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vmStatus to set. + * @return This builder for chaining. + */ + public Builder setVmStatus(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmStatus_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Status of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_status = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVmStatus() { + + vmStatus_ = getDefaultInstance().getVmStatus(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Status of the virtual machine where this instance lives. Only applicable
+     * for instances in App Engine flexible environment.
+     * 
+ * + * string vm_status = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for vmStatus to set. + * @return This builder for chaining. + */ + public Builder setVmStatusBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmStatus_ = value; + onChanged(); + return this; + } + + private boolean vmDebugEnabled_; + /** + * + * + *
+     * Output only. Whether this instance is in debug mode. Only applicable for instances in
+     * App Engine flexible environment.
+     * 
+ * + * bool vm_debug_enabled = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmDebugEnabled. + */ + @java.lang.Override + public boolean getVmDebugEnabled() { + return vmDebugEnabled_; + } + /** + * + * + *
+     * Output only. Whether this instance is in debug mode. Only applicable for instances in
+     * App Engine flexible environment.
+     * 
+ * + * bool vm_debug_enabled = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vmDebugEnabled to set. + * @return This builder for chaining. + */ + public Builder setVmDebugEnabled(boolean value) { + + vmDebugEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Whether this instance is in debug mode. Only applicable for instances in
+     * App Engine flexible environment.
+     * 
+ * + * bool vm_debug_enabled = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVmDebugEnabled() { + + vmDebugEnabled_ = false; + onChanged(); + return this; + } + + private java.lang.Object vmIp_ = ""; + /** + * + * + *
+     * Output only. The IP address of this instance. Only applicable for instances in App
+     * Engine flexible environment.
+     * 
+ * + * string vm_ip = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmIp. + */ + public java.lang.String getVmIp() { + java.lang.Object ref = vmIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The IP address of this instance. Only applicable for instances in App
+     * Engine flexible environment.
+     * 
+ * + * string vm_ip = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmIp. + */ + public com.google.protobuf.ByteString getVmIpBytes() { + java.lang.Object ref = vmIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The IP address of this instance. Only applicable for instances in App
+     * Engine flexible environment.
+     * 
+ * + * string vm_ip = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vmIp to set. + * @return This builder for chaining. + */ + public Builder setVmIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP address of this instance. Only applicable for instances in App
+     * Engine flexible environment.
+     * 
+ * + * string vm_ip = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVmIp() { + + vmIp_ = getDefaultInstance().getVmIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP address of this instance. Only applicable for instances in App
+     * Engine flexible environment.
+     * 
+ * + * string vm_ip = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for vmIp to set. + * @return This builder for chaining. + */ + public Builder setVmIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmIp_ = value; + onChanged(); + return this; + } + + private int vmLiveness_ = 0; + /** + * + * + *
+     * Output only. The liveness health check of this instance. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * + * .google.appengine.v1.Instance.Liveness.LivenessState vm_liveness = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for vmLiveness. + */ + @java.lang.Override + public int getVmLivenessValue() { + return vmLiveness_; + } + /** + * + * + *
+     * Output only. The liveness health check of this instance. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * + * .google.appengine.v1.Instance.Liveness.LivenessState vm_liveness = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for vmLiveness to set. + * @return This builder for chaining. + */ + public Builder setVmLivenessValue(int value) { + + vmLiveness_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The liveness health check of this instance. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * + * .google.appengine.v1.Instance.Liveness.LivenessState vm_liveness = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The vmLiveness. + */ + @java.lang.Override + public com.google.appengine.v1.Instance.Liveness.LivenessState getVmLiveness() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.Instance.Liveness.LivenessState result = + com.google.appengine.v1.Instance.Liveness.LivenessState.valueOf(vmLiveness_); + return result == null + ? com.google.appengine.v1.Instance.Liveness.LivenessState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The liveness health check of this instance. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * + * .google.appengine.v1.Instance.Liveness.LivenessState vm_liveness = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The vmLiveness to set. + * @return This builder for chaining. + */ + public Builder setVmLiveness(com.google.appengine.v1.Instance.Liveness.LivenessState value) { + if (value == null) { + throw new NullPointerException(); + } + + vmLiveness_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The liveness health check of this instance. Only applicable for instances
+     * in App Engine flexible environment.
+     * 
+ * + * + * .google.appengine.v1.Instance.Liveness.LivenessState vm_liveness = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearVmLiveness() { + + vmLiveness_ = 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.appengine.v1.Instance) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Instance) + private static final com.google.appengine.v1.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Instance(); + } + + public static com.google.appengine.v1.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Instance(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.appengine.v1.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceName.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceName.java new file mode 100644 index 00000000..13fee4fc --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceName.java @@ -0,0 +1,257 @@ +/* + * 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.appengine.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 InstanceName implements ResourceName { + private static final PathTemplate APP_SERVICE_VERSION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "apps/{app}/services/{service}/versions/{version}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String app; + private final String service; + private final String version; + private final String instance; + + @Deprecated + protected InstanceName() { + app = null; + service = null; + version = null; + instance = null; + } + + private InstanceName(Builder builder) { + app = Preconditions.checkNotNull(builder.getApp()); + service = Preconditions.checkNotNull(builder.getService()); + version = Preconditions.checkNotNull(builder.getVersion()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getApp() { + return app; + } + + public String getService() { + return service; + } + + public String getVersion() { + return version; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of(String app, String service, String version, String instance) { + return newBuilder() + .setApp(app) + .setService(service) + .setVersion(version) + .setInstance(instance) + .build(); + } + + public static String format(String app, String service, String version, String instance) { + return newBuilder() + .setApp(app) + .setService(service) + .setVersion(version) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + APP_SERVICE_VERSION_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of( + matchMap.get("app"), + matchMap.get("service"), + matchMap.get("version"), + matchMap.get("instance")); + } + + 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 (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return APP_SERVICE_VERSION_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (app != null) { + fieldMapBuilder.put("app", app); + } + if (service != null) { + fieldMapBuilder.put("service", service); + } + if (version != null) { + fieldMapBuilder.put("version", version); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return APP_SERVICE_VERSION_INSTANCE.instantiate( + "app", app, "service", service, "version", version, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.app, that.app) + && Objects.equals(this.service, that.service) + && Objects.equals(this.version, that.version) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(app); + h *= 1000003; + h ^= Objects.hashCode(service); + h *= 1000003; + h ^= Objects.hashCode(version); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** Builder for apps/{app}/services/{service}/versions/{version}/instances/{instance}. */ + public static class Builder { + private String app; + private String service; + private String version; + private String instance; + + protected Builder() {} + + public String getApp() { + return app; + } + + public String getService() { + return service; + } + + public String getVersion() { + return version; + } + + public String getInstance() { + return instance; + } + + public Builder setApp(String app) { + this.app = app; + return this; + } + + public Builder setService(String service) { + this.service = service; + return this; + } + + public Builder setVersion(String version) { + this.version = version; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + app = instanceName.app; + service = instanceName.service; + version = instanceName.version; + instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceOrBuilder.java new file mode 100644 index 00000000..8f166abc --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceOrBuilder.java @@ -0,0 +1,419 @@ +/* + * 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/appengine/v1/instance.proto + +package com.google.appengine.v1; + +public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Full path to the Instance resource in the API.
+   * Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Full path to the Instance resource in the API.
+   * Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Relative name of the instance within the version.
+   * Example: `instance-1`.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Output only. Relative name of the instance within the version.
+   * Example: `instance-1`.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Output only. App Engine release this instance is running on.
+   * 
+ * + * string app_engine_release = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The appEngineRelease. + */ + java.lang.String getAppEngineRelease(); + /** + * + * + *
+   * Output only. App Engine release this instance is running on.
+   * 
+ * + * string app_engine_release = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for appEngineRelease. + */ + com.google.protobuf.ByteString getAppEngineReleaseBytes(); + + /** + * + * + *
+   * Output only. Availability of the instance.
+   * 
+ * + * + * .google.appengine.v1.Instance.Availability availability = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for availability. + */ + int getAvailabilityValue(); + /** + * + * + *
+   * Output only. Availability of the instance.
+   * 
+ * + * + * .google.appengine.v1.Instance.Availability availability = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The availability. + */ + com.google.appengine.v1.Instance.Availability getAvailability(); + + /** + * + * + *
+   * Output only. Name of the virtual machine where this instance lives. Only applicable
+   * for instances in App Engine flexible environment.
+   * 
+ * + * string vm_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmName. + */ + java.lang.String getVmName(); + /** + * + * + *
+   * Output only. Name of the virtual machine where this instance lives. Only applicable
+   * for instances in App Engine flexible environment.
+   * 
+ * + * string vm_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmName. + */ + com.google.protobuf.ByteString getVmNameBytes(); + + /** + * + * + *
+   * Output only. Zone where the virtual machine is located. Only applicable for instances
+   * in App Engine flexible environment.
+   * 
+ * + * string vm_zone_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmZoneName. + */ + java.lang.String getVmZoneName(); + /** + * + * + *
+   * Output only. Zone where the virtual machine is located. Only applicable for instances
+   * in App Engine flexible environment.
+   * 
+ * + * string vm_zone_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmZoneName. + */ + com.google.protobuf.ByteString getVmZoneNameBytes(); + + /** + * + * + *
+   * Output only. Virtual machine ID of this instance. Only applicable for instances in
+   * App Engine flexible environment.
+   * 
+ * + * string vm_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmId. + */ + java.lang.String getVmId(); + /** + * + * + *
+   * Output only. Virtual machine ID of this instance. Only applicable for instances in
+   * App Engine flexible environment.
+   * 
+ * + * string vm_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmId. + */ + com.google.protobuf.ByteString getVmIdBytes(); + + /** + * + * + *
+   * Output only. Time that this instance was started.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time that this instance was started.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time that this instance was started.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Number of requests since this instance was started.
+   * 
+ * + * int32 requests = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requests. + */ + int getRequests(); + + /** + * + * + *
+   * Output only. Number of errors since this instance was started.
+   * 
+ * + * int32 errors = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errors. + */ + int getErrors(); + + /** + * + * + *
+   * Output only. Average queries per second (QPS) over the last minute.
+   * 
+ * + * float qps = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The qps. + */ + float getQps(); + + /** + * + * + *
+   * Output only. Average latency (ms) over the last minute.
+   * 
+ * + * int32 average_latency = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The averageLatency. + */ + int getAverageLatency(); + + /** + * + * + *
+   * Output only. Total memory in use (bytes).
+   * 
+ * + * int64 memory_usage = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The memoryUsage. + */ + long getMemoryUsage(); + + /** + * + * + *
+   * Output only. Status of the virtual machine where this instance lives. Only applicable
+   * for instances in App Engine flexible environment.
+   * 
+ * + * string vm_status = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmStatus. + */ + java.lang.String getVmStatus(); + /** + * + * + *
+   * Output only. Status of the virtual machine where this instance lives. Only applicable
+   * for instances in App Engine flexible environment.
+   * 
+ * + * string vm_status = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmStatus. + */ + com.google.protobuf.ByteString getVmStatusBytes(); + + /** + * + * + *
+   * Output only. Whether this instance is in debug mode. Only applicable for instances in
+   * App Engine flexible environment.
+   * 
+ * + * bool vm_debug_enabled = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmDebugEnabled. + */ + boolean getVmDebugEnabled(); + + /** + * + * + *
+   * Output only. The IP address of this instance. Only applicable for instances in App
+   * Engine flexible environment.
+   * 
+ * + * string vm_ip = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vmIp. + */ + java.lang.String getVmIp(); + /** + * + * + *
+   * Output only. The IP address of this instance. Only applicable for instances in App
+   * Engine flexible environment.
+   * 
+ * + * string vm_ip = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for vmIp. + */ + com.google.protobuf.ByteString getVmIpBytes(); + + /** + * + * + *
+   * Output only. The liveness health check of this instance. Only applicable for instances
+   * in App Engine flexible environment.
+   * 
+ * + * + * .google.appengine.v1.Instance.Liveness.LivenessState vm_liveness = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for vmLiveness. + */ + int getVmLivenessValue(); + /** + * + * + *
+   * Output only. The liveness health check of this instance. Only applicable for instances
+   * in App Engine flexible environment.
+   * 
+ * + * + * .google.appengine.v1.Instance.Liveness.LivenessState vm_liveness = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The vmLiveness. + */ + com.google.appengine.v1.Instance.Liveness.LivenessState getVmLiveness(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceProto.java new file mode 100644 index 00000000..16cb58c1 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/InstanceProto.java @@ -0,0 +1,131 @@ +/* + * 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/appengine/v1/instance.proto + +package com.google.appengine.v1; + +public final class InstanceProto { + private InstanceProto() {} + + 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_appengine_v1_Instance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Instance_Liveness_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Instance_Liveness_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/appengine/v1/instance.proto\022\023go" + + "ogle.appengine.v1\032\037google/api/field_beha" + + "vior.proto\032\031google/api/resource.proto\032\037g" + + "oogle/protobuf/timestamp.proto\032\034google/a" + + "pi/annotations.proto\"\316\006\n\010Instance\022\021\n\004nam" + + "e\030\001 \001(\tB\003\340A\003\022\017\n\002id\030\002 \001(\tB\003\340A\003\022\037\n\022app_eng" + + "ine_release\030\003 \001(\tB\003\340A\003\022E\n\014availability\030\004" + + " \001(\0162*.google.appengine.v1.Instance.Avai" + + "labilityB\003\340A\003\022\024\n\007vm_name\030\005 \001(\tB\003\340A\003\022\031\n\014v" + + "m_zone_name\030\006 \001(\tB\003\340A\003\022\022\n\005vm_id\030\007 \001(\tB\003\340" + + "A\003\0223\n\nstart_time\030\010 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\022\025\n\010requests\030\t \001(\005B\003\340A\003\022\023" + + "\n\006errors\030\n \001(\005B\003\340A\003\022\020\n\003qps\030\013 \001(\002B\003\340A\003\022\034\n" + + "\017average_latency\030\014 \001(\005B\003\340A\003\022\031\n\014memory_us" + + "age\030\r \001(\003B\003\340A\003\022\026\n\tvm_status\030\016 \001(\tB\003\340A\003\022\035" + + "\n\020vm_debug_enabled\030\017 \001(\010B\003\340A\003\022\022\n\005vm_ip\030\020" + + " \001(\tB\003\340A\003\022N\n\013vm_liveness\030\021 \001(\01624.google." + + "appengine.v1.Instance.Liveness.LivenessS" + + "tateB\003\340A\003\032\177\n\010Liveness\"s\n\rLivenessState\022\036" + + "\n\032LIVENESS_STATE_UNSPECIFIED\020\000\022\013\n\007UNKNOW" + + "N\020\001\022\013\n\007HEALTHY\020\002\022\r\n\tUNHEALTHY\020\003\022\014\n\010DRAIN" + + "ING\020\004\022\013\n\007TIMEOUT\020\005\":\n\014Availability\022\017\n\013UN" + + "SPECIFIED\020\000\022\014\n\010RESIDENT\020\001\022\013\n\007DYNAMIC\020\002:m" + + "\352Aj\n!appengine.googleapis.com/Instance\022E" + + "apps/{app}/services/{service}/versions/{" + + "version}/instances/{instance}B\277\001\n\027com.go" + + "ogle.appengine.v1B\rInstanceProtoP\001Z + * Third-party Python runtime library that is required by the application. + * + * + * Protobuf type {@code google.appengine.v1.Library} + */ +public final class Library extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Library) + LibraryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Library.newBuilder() to construct. + private Library(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Library() { + name_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Library(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Library( + 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; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_Library_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_Library_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Library.class, com.google.appengine.v1.Library.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the library. Example: "django".
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the library. Example: "django".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Version of the library to select, or "latest".
+   * 
+ * + * string version = 2; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Version of the library to select, or "latest".
+   * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = 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_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + 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 (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + 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.appengine.v1.Library)) { + return super.equals(obj); + } + com.google.appengine.v1.Library other = (com.google.appengine.v1.Library) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVersion().equals(other.getVersion())) 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) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Library parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Library parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Library parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Library 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.appengine.v1.Library parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Library parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Library parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Library 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.appengine.v1.Library parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Library 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.appengine.v1.Library parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Library 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.appengine.v1.Library 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; + } + /** + * + * + *
+   * Third-party Python runtime library that is required by the application.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Library} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Library) + com.google.appengine.v1.LibraryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_Library_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_Library_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Library.class, com.google.appengine.v1.Library.Builder.class); + } + + // Construct using com.google.appengine.v1.Library.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_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_Library_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Library getDefaultInstanceForType() { + return com.google.appengine.v1.Library.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Library build() { + com.google.appengine.v1.Library result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Library buildPartial() { + com.google.appengine.v1.Library result = new com.google.appengine.v1.Library(this); + result.name_ = name_; + result.version_ = version_; + 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.appengine.v1.Library) { + return mergeFrom((com.google.appengine.v1.Library) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Library other) { + if (other == com.google.appengine.v1.Library.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + 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.appengine.v1.Library parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Library) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the library. Example: "django".
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the library. Example: "django".
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the library. Example: "django".
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the library. Example: "django".
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the library. Example: "django".
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Version of the library to select, or "latest".
+     * 
+ * + * string version = 2; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of the library to select, or "latest".
+     * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of the library to select, or "latest".
+     * 
+ * + * string version = 2; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the library to select, or "latest".
+     * 
+ * + * string version = 2; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the library to select, or "latest".
+     * 
+ * + * string version = 2; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = 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.appengine.v1.Library) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Library) + private static final com.google.appengine.v1.Library DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Library(); + } + + public static com.google.appengine.v1.Library getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Library parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Library(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.appengine.v1.Library getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LibraryOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LibraryOrBuilder.java new file mode 100644 index 00000000..eb17412f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LibraryOrBuilder.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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface LibraryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Library) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the library. Example: "django".
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the library. Example: "django".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Version of the library to select, or "latest".
+   * 
+ * + * string version = 2; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Version of the library to select, or "latest".
+   * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesRequest.java new file mode 100644 index 00000000..b6fe7fe6 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesRequest.java @@ -0,0 +1,1059 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `AuthorizedCertificates.ListAuthorizedCertificates`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListAuthorizedCertificatesRequest} + */ +public final class ListAuthorizedCertificatesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListAuthorizedCertificatesRequest) + ListAuthorizedCertificatesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAuthorizedCertificatesRequest.newBuilder() to construct. + private ListAuthorizedCertificatesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAuthorizedCertificatesRequest() { + parent_ = ""; + view_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAuthorizedCertificatesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAuthorizedCertificatesRequest( + 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 32: + { + int rawValue = input.readEnum(); + + view_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListAuthorizedCertificatesRequest.class, + com.google.appengine.v1.ListAuthorizedCertificatesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent `Application` resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent `Application` resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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 VIEW_FIELD_NUMBER = 4; + private int view_; + /** + * + * + *
+   * Controls the set of fields returned in the `LIST` response.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Controls the set of fields returned in the `LIST` response.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 4; + * + * @return The view. + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificateView getView() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.AuthorizedCertificateView result = + com.google.appengine.v1.AuthorizedCertificateView.valueOf(view_); + return result == null ? com.google.appengine.v1.AuthorizedCertificateView.UNRECOGNIZED : result; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + + 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 (view_ != com.google.appengine.v1.AuthorizedCertificateView.BASIC_CERTIFICATE.getNumber()) { + output.writeEnum(4, view_); + } + 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 (view_ != com.google.appengine.v1.AuthorizedCertificateView.BASIC_CERTIFICATE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, view_); + } + 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.appengine.v1.ListAuthorizedCertificatesRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.ListAuthorizedCertificatesRequest other = + (com.google.appengine.v1.ListAuthorizedCertificatesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (view_ != other.view_) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest 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.appengine.v1.ListAuthorizedCertificatesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest 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.appengine.v1.ListAuthorizedCertificatesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest 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.appengine.v1.ListAuthorizedCertificatesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest 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.appengine.v1.ListAuthorizedCertificatesRequest 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 message for `AuthorizedCertificates.ListAuthorizedCertificates`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListAuthorizedCertificatesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListAuthorizedCertificatesRequest) + com.google.appengine.v1.ListAuthorizedCertificatesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListAuthorizedCertificatesRequest.class, + com.google.appengine.v1.ListAuthorizedCertificatesRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.ListAuthorizedCertificatesRequest.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_ = ""; + + view_ = 0; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedCertificatesRequest getDefaultInstanceForType() { + return com.google.appengine.v1.ListAuthorizedCertificatesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedCertificatesRequest build() { + com.google.appengine.v1.ListAuthorizedCertificatesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedCertificatesRequest buildPartial() { + com.google.appengine.v1.ListAuthorizedCertificatesRequest result = + new com.google.appengine.v1.ListAuthorizedCertificatesRequest(this); + result.parent_ = parent_; + result.view_ = view_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + 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.appengine.v1.ListAuthorizedCertificatesRequest) { + return mergeFrom((com.google.appengine.v1.ListAuthorizedCertificatesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListAuthorizedCertificatesRequest other) { + if (other == com.google.appengine.v1.ListAuthorizedCertificatesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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.appengine.v1.ListAuthorizedCertificatesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.ListAuthorizedCertificatesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent `Application` resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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 view_ = 0; + /** + * + * + *
+     * Controls the set of fields returned in the `LIST` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Controls the set of fields returned in the `LIST` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 4; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls the set of fields returned in the `LIST` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 4; + * + * @return The view. + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificateView getView() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.AuthorizedCertificateView result = + com.google.appengine.v1.AuthorizedCertificateView.valueOf(view_); + return result == null + ? com.google.appengine.v1.AuthorizedCertificateView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Controls the set of fields returned in the `LIST` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 4; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.appengine.v1.AuthorizedCertificateView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Controls the set of fields returned in the `LIST` response.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 4; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + + @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.appengine.v1.ListAuthorizedCertificatesRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListAuthorizedCertificatesRequest) + private static final com.google.appengine.v1.ListAuthorizedCertificatesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListAuthorizedCertificatesRequest(); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAuthorizedCertificatesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAuthorizedCertificatesRequest(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.appengine.v1.ListAuthorizedCertificatesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesRequestOrBuilder.java new file mode 100644 index 00000000..c6cdea20 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListAuthorizedCertificatesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListAuthorizedCertificatesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent `Application` resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent `Application` resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Controls the set of fields returned in the `LIST` response.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Controls the set of fields returned in the `LIST` response.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificateView view = 4; + * + * @return The view. + */ + com.google.appengine.v1.AuthorizedCertificateView getView(); + + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesResponse.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesResponse.java new file mode 100644 index 00000000..3ecb4e35 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesResponse.java @@ -0,0 +1,1135 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Response message for `AuthorizedCertificates.ListAuthorizedCertificates`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListAuthorizedCertificatesResponse} + */ +public final class ListAuthorizedCertificatesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListAuthorizedCertificatesResponse) + ListAuthorizedCertificatesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAuthorizedCertificatesResponse.newBuilder() to construct. + private ListAuthorizedCertificatesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAuthorizedCertificatesResponse() { + certificates_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAuthorizedCertificatesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAuthorizedCertificatesResponse( + 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)) { + certificates_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + certificates_.add( + input.readMessage( + com.google.appengine.v1.AuthorizedCertificate.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + certificates_ = java.util.Collections.unmodifiableList(certificates_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListAuthorizedCertificatesResponse.class, + com.google.appengine.v1.ListAuthorizedCertificatesResponse.Builder.class); + } + + public static final int CERTIFICATES_FIELD_NUMBER = 1; + private java.util.List certificates_; + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + @java.lang.Override + public java.util.List getCertificatesList() { + return certificates_; + } + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + @java.lang.Override + public java.util.List + getCertificatesOrBuilderList() { + return certificates_; + } + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + @java.lang.Override + public int getCertificatesCount() { + return certificates_.size(); + } + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificate getCertificates(int index) { + return certificates_.get(index); + } + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificateOrBuilder getCertificatesOrBuilder( + int index) { + return certificates_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < certificates_.size(); i++) { + output.writeMessage(1, certificates_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < certificates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, certificates_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.appengine.v1.ListAuthorizedCertificatesResponse)) { + return super.equals(obj); + } + com.google.appengine.v1.ListAuthorizedCertificatesResponse other = + (com.google.appengine.v1.ListAuthorizedCertificatesResponse) obj; + + if (!getCertificatesList().equals(other.getCertificatesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getCertificatesCount() > 0) { + hash = (37 * hash) + CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getCertificatesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse 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.appengine.v1.ListAuthorizedCertificatesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse 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.appengine.v1.ListAuthorizedCertificatesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse 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.appengine.v1.ListAuthorizedCertificatesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse 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.appengine.v1.ListAuthorizedCertificatesResponse 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 message for `AuthorizedCertificates.ListAuthorizedCertificates`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListAuthorizedCertificatesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListAuthorizedCertificatesResponse) + com.google.appengine.v1.ListAuthorizedCertificatesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListAuthorizedCertificatesResponse.class, + com.google.appengine.v1.ListAuthorizedCertificatesResponse.Builder.class); + } + + // Construct using com.google.appengine.v1.ListAuthorizedCertificatesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCertificatesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (certificatesBuilder_ == null) { + certificates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + certificatesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedCertificatesResponse_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedCertificatesResponse getDefaultInstanceForType() { + return com.google.appengine.v1.ListAuthorizedCertificatesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedCertificatesResponse build() { + com.google.appengine.v1.ListAuthorizedCertificatesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedCertificatesResponse buildPartial() { + com.google.appengine.v1.ListAuthorizedCertificatesResponse result = + new com.google.appengine.v1.ListAuthorizedCertificatesResponse(this); + int from_bitField0_ = bitField0_; + if (certificatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + certificates_ = java.util.Collections.unmodifiableList(certificates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.certificates_ = certificates_; + } else { + result.certificates_ = certificatesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.appengine.v1.ListAuthorizedCertificatesResponse) { + return mergeFrom((com.google.appengine.v1.ListAuthorizedCertificatesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListAuthorizedCertificatesResponse other) { + if (other == com.google.appengine.v1.ListAuthorizedCertificatesResponse.getDefaultInstance()) + return this; + if (certificatesBuilder_ == null) { + if (!other.certificates_.isEmpty()) { + if (certificates_.isEmpty()) { + certificates_ = other.certificates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCertificatesIsMutable(); + certificates_.addAll(other.certificates_); + } + onChanged(); + } + } else { + if (!other.certificates_.isEmpty()) { + if (certificatesBuilder_.isEmpty()) { + certificatesBuilder_.dispose(); + certificatesBuilder_ = null; + certificates_ = other.certificates_; + bitField0_ = (bitField0_ & ~0x00000001); + certificatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCertificatesFieldBuilder() + : null; + } else { + certificatesBuilder_.addAllMessages(other.certificates_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + 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.appengine.v1.ListAuthorizedCertificatesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.ListAuthorizedCertificatesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List certificates_ = + java.util.Collections.emptyList(); + + private void ensureCertificatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + certificates_ = + new java.util.ArrayList(certificates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.AuthorizedCertificate, + com.google.appengine.v1.AuthorizedCertificate.Builder, + com.google.appengine.v1.AuthorizedCertificateOrBuilder> + certificatesBuilder_; + + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public java.util.List getCertificatesList() { + if (certificatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(certificates_); + } else { + return certificatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public int getCertificatesCount() { + if (certificatesBuilder_ == null) { + return certificates_.size(); + } else { + return certificatesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public com.google.appengine.v1.AuthorizedCertificate getCertificates(int index) { + if (certificatesBuilder_ == null) { + return certificates_.get(index); + } else { + return certificatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public Builder setCertificates(int index, com.google.appengine.v1.AuthorizedCertificate value) { + if (certificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.set(index, value); + onChanged(); + } else { + certificatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public Builder setCertificates( + int index, com.google.appengine.v1.AuthorizedCertificate.Builder builderForValue) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.set(index, builderForValue.build()); + onChanged(); + } else { + certificatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public Builder addCertificates(com.google.appengine.v1.AuthorizedCertificate value) { + if (certificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.add(value); + onChanged(); + } else { + certificatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public Builder addCertificates(int index, com.google.appengine.v1.AuthorizedCertificate value) { + if (certificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.add(index, value); + onChanged(); + } else { + certificatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public Builder addCertificates( + com.google.appengine.v1.AuthorizedCertificate.Builder builderForValue) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.add(builderForValue.build()); + onChanged(); + } else { + certificatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public Builder addCertificates( + int index, com.google.appengine.v1.AuthorizedCertificate.Builder builderForValue) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.add(index, builderForValue.build()); + onChanged(); + } else { + certificatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public Builder addAllCertificates( + java.lang.Iterable values) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificates_); + onChanged(); + } else { + certificatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public Builder clearCertificates() { + if (certificatesBuilder_ == null) { + certificates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + certificatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public Builder removeCertificates(int index) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.remove(index); + onChanged(); + } else { + certificatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public com.google.appengine.v1.AuthorizedCertificate.Builder getCertificatesBuilder(int index) { + return getCertificatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public com.google.appengine.v1.AuthorizedCertificateOrBuilder getCertificatesOrBuilder( + int index) { + if (certificatesBuilder_ == null) { + return certificates_.get(index); + } else { + return certificatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public java.util.List + getCertificatesOrBuilderList() { + if (certificatesBuilder_ != null) { + return certificatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(certificates_); + } + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public com.google.appengine.v1.AuthorizedCertificate.Builder addCertificatesBuilder() { + return getCertificatesFieldBuilder() + .addBuilder(com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance()); + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public com.google.appengine.v1.AuthorizedCertificate.Builder addCertificatesBuilder(int index) { + return getCertificatesFieldBuilder() + .addBuilder(index, com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance()); + } + /** + * + * + *
+     * The SSL certificates the user is authorized to administer.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + public java.util.List + getCertificatesBuilderList() { + return getCertificatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.AuthorizedCertificate, + com.google.appengine.v1.AuthorizedCertificate.Builder, + com.google.appengine.v1.AuthorizedCertificateOrBuilder> + getCertificatesFieldBuilder() { + if (certificatesBuilder_ == null) { + certificatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.AuthorizedCertificate, + com.google.appengine.v1.AuthorizedCertificate.Builder, + com.google.appengine.v1.AuthorizedCertificateOrBuilder>( + certificates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + certificates_ = null; + } + return certificatesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.appengine.v1.ListAuthorizedCertificatesResponse) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListAuthorizedCertificatesResponse) + private static final com.google.appengine.v1.ListAuthorizedCertificatesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListAuthorizedCertificatesResponse(); + } + + public static com.google.appengine.v1.ListAuthorizedCertificatesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAuthorizedCertificatesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAuthorizedCertificatesResponse(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.appengine.v1.ListAuthorizedCertificatesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesResponseOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesResponseOrBuilder.java new file mode 100644 index 00000000..e615df89 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedCertificatesResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListAuthorizedCertificatesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListAuthorizedCertificatesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + java.util.List getCertificatesList(); + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + com.google.appengine.v1.AuthorizedCertificate getCertificates(int index); + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + int getCertificatesCount(); + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + java.util.List + getCertificatesOrBuilderList(); + /** + * + * + *
+   * The SSL certificates the user is authorized to administer.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedCertificate certificates = 1; + */ + com.google.appengine.v1.AuthorizedCertificateOrBuilder getCertificatesOrBuilder(int index); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsRequest.java new file mode 100644 index 00000000..4f194796 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsRequest.java @@ -0,0 +1,905 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `AuthorizedDomains.ListAuthorizedDomains`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListAuthorizedDomainsRequest} + */ +public final class ListAuthorizedDomainsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListAuthorizedDomainsRequest) + ListAuthorizedDomainsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAuthorizedDomainsRequest.newBuilder() to construct. + private ListAuthorizedDomainsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAuthorizedDomainsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAuthorizedDomainsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAuthorizedDomainsRequest( + 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; + } + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListAuthorizedDomainsRequest.class, + com.google.appengine.v1.ListAuthorizedDomainsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + + 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_); + } + 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_); + } + 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.appengine.v1.ListAuthorizedDomainsRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.ListAuthorizedDomainsRequest other = + (com.google.appengine.v1.ListAuthorizedDomainsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest 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.appengine.v1.ListAuthorizedDomainsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest 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.appengine.v1.ListAuthorizedDomainsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest 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.appengine.v1.ListAuthorizedDomainsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest 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.appengine.v1.ListAuthorizedDomainsRequest 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 message for `AuthorizedDomains.ListAuthorizedDomains`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListAuthorizedDomainsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListAuthorizedDomainsRequest) + com.google.appengine.v1.ListAuthorizedDomainsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListAuthorizedDomainsRequest.class, + com.google.appengine.v1.ListAuthorizedDomainsRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.ListAuthorizedDomainsRequest.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedDomainsRequest getDefaultInstanceForType() { + return com.google.appengine.v1.ListAuthorizedDomainsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedDomainsRequest build() { + com.google.appengine.v1.ListAuthorizedDomainsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedDomainsRequest buildPartial() { + com.google.appengine.v1.ListAuthorizedDomainsRequest result = + new com.google.appengine.v1.ListAuthorizedDomainsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + 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.appengine.v1.ListAuthorizedDomainsRequest) { + return mergeFrom((com.google.appengine.v1.ListAuthorizedDomainsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListAuthorizedDomainsRequest other) { + if (other == com.google.appengine.v1.ListAuthorizedDomainsRequest.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(); + } + 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.appengine.v1.ListAuthorizedDomainsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.ListAuthorizedDomainsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + + @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.appengine.v1.ListAuthorizedDomainsRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListAuthorizedDomainsRequest) + private static final com.google.appengine.v1.ListAuthorizedDomainsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListAuthorizedDomainsRequest(); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAuthorizedDomainsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAuthorizedDomainsRequest(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.appengine.v1.ListAuthorizedDomainsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsRequestOrBuilder.java new file mode 100644 index 00000000..8b722c44 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListAuthorizedDomainsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListAuthorizedDomainsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsResponse.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsResponse.java new file mode 100644 index 00000000..2fb9b328 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsResponse.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Response message for `AuthorizedDomains.ListAuthorizedDomains`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListAuthorizedDomainsResponse} + */ +public final class ListAuthorizedDomainsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListAuthorizedDomainsResponse) + ListAuthorizedDomainsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAuthorizedDomainsResponse.newBuilder() to construct. + private ListAuthorizedDomainsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAuthorizedDomainsResponse() { + domains_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAuthorizedDomainsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAuthorizedDomainsResponse( + 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)) { + domains_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + domains_.add( + input.readMessage( + com.google.appengine.v1.AuthorizedDomain.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + domains_ = java.util.Collections.unmodifiableList(domains_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListAuthorizedDomainsResponse.class, + com.google.appengine.v1.ListAuthorizedDomainsResponse.Builder.class); + } + + public static final int DOMAINS_FIELD_NUMBER = 1; + private java.util.List domains_; + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + @java.lang.Override + public java.util.List getDomainsList() { + return domains_; + } + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + @java.lang.Override + public java.util.List + getDomainsOrBuilderList() { + return domains_; + } + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + @java.lang.Override + public int getDomainsCount() { + return domains_.size(); + } + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedDomain getDomains(int index) { + return domains_.get(index); + } + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedDomainOrBuilder getDomainsOrBuilder(int index) { + return domains_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < domains_.size(); i++) { + output.writeMessage(1, domains_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < domains_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, domains_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.appengine.v1.ListAuthorizedDomainsResponse)) { + return super.equals(obj); + } + com.google.appengine.v1.ListAuthorizedDomainsResponse other = + (com.google.appengine.v1.ListAuthorizedDomainsResponse) obj; + + if (!getDomainsList().equals(other.getDomainsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getDomainsCount() > 0) { + hash = (37 * hash) + DOMAINS_FIELD_NUMBER; + hash = (53 * hash) + getDomainsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse 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.appengine.v1.ListAuthorizedDomainsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse 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.appengine.v1.ListAuthorizedDomainsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse 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.appengine.v1.ListAuthorizedDomainsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse 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.appengine.v1.ListAuthorizedDomainsResponse 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 message for `AuthorizedDomains.ListAuthorizedDomains`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListAuthorizedDomainsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListAuthorizedDomainsResponse) + com.google.appengine.v1.ListAuthorizedDomainsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListAuthorizedDomainsResponse.class, + com.google.appengine.v1.ListAuthorizedDomainsResponse.Builder.class); + } + + // Construct using com.google.appengine.v1.ListAuthorizedDomainsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDomainsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (domainsBuilder_ == null) { + domains_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + domainsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListAuthorizedDomainsResponse_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedDomainsResponse getDefaultInstanceForType() { + return com.google.appengine.v1.ListAuthorizedDomainsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedDomainsResponse build() { + com.google.appengine.v1.ListAuthorizedDomainsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListAuthorizedDomainsResponse buildPartial() { + com.google.appengine.v1.ListAuthorizedDomainsResponse result = + new com.google.appengine.v1.ListAuthorizedDomainsResponse(this); + int from_bitField0_ = bitField0_; + if (domainsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + domains_ = java.util.Collections.unmodifiableList(domains_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.domains_ = domains_; + } else { + result.domains_ = domainsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.appengine.v1.ListAuthorizedDomainsResponse) { + return mergeFrom((com.google.appengine.v1.ListAuthorizedDomainsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListAuthorizedDomainsResponse other) { + if (other == com.google.appengine.v1.ListAuthorizedDomainsResponse.getDefaultInstance()) + return this; + if (domainsBuilder_ == null) { + if (!other.domains_.isEmpty()) { + if (domains_.isEmpty()) { + domains_ = other.domains_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDomainsIsMutable(); + domains_.addAll(other.domains_); + } + onChanged(); + } + } else { + if (!other.domains_.isEmpty()) { + if (domainsBuilder_.isEmpty()) { + domainsBuilder_.dispose(); + domainsBuilder_ = null; + domains_ = other.domains_; + bitField0_ = (bitField0_ & ~0x00000001); + domainsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDomainsFieldBuilder() + : null; + } else { + domainsBuilder_.addAllMessages(other.domains_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + 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.appengine.v1.ListAuthorizedDomainsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.ListAuthorizedDomainsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List domains_ = + java.util.Collections.emptyList(); + + private void ensureDomainsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + domains_ = new java.util.ArrayList(domains_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.AuthorizedDomain, + com.google.appengine.v1.AuthorizedDomain.Builder, + com.google.appengine.v1.AuthorizedDomainOrBuilder> + domainsBuilder_; + + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public java.util.List getDomainsList() { + if (domainsBuilder_ == null) { + return java.util.Collections.unmodifiableList(domains_); + } else { + return domainsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public int getDomainsCount() { + if (domainsBuilder_ == null) { + return domains_.size(); + } else { + return domainsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public com.google.appengine.v1.AuthorizedDomain getDomains(int index) { + if (domainsBuilder_ == null) { + return domains_.get(index); + } else { + return domainsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public Builder setDomains(int index, com.google.appengine.v1.AuthorizedDomain value) { + if (domainsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainsIsMutable(); + domains_.set(index, value); + onChanged(); + } else { + domainsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public Builder setDomains( + int index, com.google.appengine.v1.AuthorizedDomain.Builder builderForValue) { + if (domainsBuilder_ == null) { + ensureDomainsIsMutable(); + domains_.set(index, builderForValue.build()); + onChanged(); + } else { + domainsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public Builder addDomains(com.google.appengine.v1.AuthorizedDomain value) { + if (domainsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainsIsMutable(); + domains_.add(value); + onChanged(); + } else { + domainsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public Builder addDomains(int index, com.google.appengine.v1.AuthorizedDomain value) { + if (domainsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainsIsMutable(); + domains_.add(index, value); + onChanged(); + } else { + domainsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public Builder addDomains(com.google.appengine.v1.AuthorizedDomain.Builder builderForValue) { + if (domainsBuilder_ == null) { + ensureDomainsIsMutable(); + domains_.add(builderForValue.build()); + onChanged(); + } else { + domainsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public Builder addDomains( + int index, com.google.appengine.v1.AuthorizedDomain.Builder builderForValue) { + if (domainsBuilder_ == null) { + ensureDomainsIsMutable(); + domains_.add(index, builderForValue.build()); + onChanged(); + } else { + domainsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public Builder addAllDomains( + java.lang.Iterable values) { + if (domainsBuilder_ == null) { + ensureDomainsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, domains_); + onChanged(); + } else { + domainsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public Builder clearDomains() { + if (domainsBuilder_ == null) { + domains_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + domainsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public Builder removeDomains(int index) { + if (domainsBuilder_ == null) { + ensureDomainsIsMutable(); + domains_.remove(index); + onChanged(); + } else { + domainsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public com.google.appengine.v1.AuthorizedDomain.Builder getDomainsBuilder(int index) { + return getDomainsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public com.google.appengine.v1.AuthorizedDomainOrBuilder getDomainsOrBuilder(int index) { + if (domainsBuilder_ == null) { + return domains_.get(index); + } else { + return domainsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public java.util.List + getDomainsOrBuilderList() { + if (domainsBuilder_ != null) { + return domainsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(domains_); + } + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public com.google.appengine.v1.AuthorizedDomain.Builder addDomainsBuilder() { + return getDomainsFieldBuilder() + .addBuilder(com.google.appengine.v1.AuthorizedDomain.getDefaultInstance()); + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public com.google.appengine.v1.AuthorizedDomain.Builder addDomainsBuilder(int index) { + return getDomainsFieldBuilder() + .addBuilder(index, com.google.appengine.v1.AuthorizedDomain.getDefaultInstance()); + } + /** + * + * + *
+     * The authorized domains belonging to the user.
+     * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + public java.util.List + getDomainsBuilderList() { + return getDomainsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.AuthorizedDomain, + com.google.appengine.v1.AuthorizedDomain.Builder, + com.google.appengine.v1.AuthorizedDomainOrBuilder> + getDomainsFieldBuilder() { + if (domainsBuilder_ == null) { + domainsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.AuthorizedDomain, + com.google.appengine.v1.AuthorizedDomain.Builder, + com.google.appengine.v1.AuthorizedDomainOrBuilder>( + domains_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + domains_ = null; + } + return domainsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.appengine.v1.ListAuthorizedDomainsResponse) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListAuthorizedDomainsResponse) + private static final com.google.appengine.v1.ListAuthorizedDomainsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListAuthorizedDomainsResponse(); + } + + public static com.google.appengine.v1.ListAuthorizedDomainsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAuthorizedDomainsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAuthorizedDomainsResponse(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.appengine.v1.ListAuthorizedDomainsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsResponseOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsResponseOrBuilder.java new file mode 100644 index 00000000..2acc9e3f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListAuthorizedDomainsResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListAuthorizedDomainsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListAuthorizedDomainsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + java.util.List getDomainsList(); + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + com.google.appengine.v1.AuthorizedDomain getDomains(int index); + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + int getDomainsCount(); + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + java.util.List + getDomainsOrBuilderList(); + /** + * + * + *
+   * The authorized domains belonging to the user.
+   * 
+ * + * repeated .google.appengine.v1.AuthorizedDomain domains = 1; + */ + com.google.appengine.v1.AuthorizedDomainOrBuilder getDomainsOrBuilder(int index); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsRequest.java new file mode 100644 index 00000000..a1e5e765 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsRequest.java @@ -0,0 +1,905 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `DomainMappings.ListDomainMappings`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListDomainMappingsRequest} + */ +public final class ListDomainMappingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListDomainMappingsRequest) + ListDomainMappingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDomainMappingsRequest.newBuilder() to construct. + private ListDomainMappingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDomainMappingsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDomainMappingsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDomainMappingsRequest( + 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; + } + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListDomainMappingsRequest.class, + com.google.appengine.v1.ListDomainMappingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + + 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_); + } + 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_); + } + 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.appengine.v1.ListDomainMappingsRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.ListDomainMappingsRequest other = + (com.google.appengine.v1.ListDomainMappingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListDomainMappingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListDomainMappingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListDomainMappingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListDomainMappingsRequest 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.appengine.v1.ListDomainMappingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListDomainMappingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListDomainMappingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListDomainMappingsRequest 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.appengine.v1.ListDomainMappingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListDomainMappingsRequest 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.appengine.v1.ListDomainMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListDomainMappingsRequest 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.appengine.v1.ListDomainMappingsRequest 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 message for `DomainMappings.ListDomainMappings`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListDomainMappingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListDomainMappingsRequest) + com.google.appengine.v1.ListDomainMappingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListDomainMappingsRequest.class, + com.google.appengine.v1.ListDomainMappingsRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.ListDomainMappingsRequest.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListDomainMappingsRequest getDefaultInstanceForType() { + return com.google.appengine.v1.ListDomainMappingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListDomainMappingsRequest build() { + com.google.appengine.v1.ListDomainMappingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListDomainMappingsRequest buildPartial() { + com.google.appengine.v1.ListDomainMappingsRequest result = + new com.google.appengine.v1.ListDomainMappingsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + 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.appengine.v1.ListDomainMappingsRequest) { + return mergeFrom((com.google.appengine.v1.ListDomainMappingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListDomainMappingsRequest other) { + if (other == com.google.appengine.v1.ListDomainMappingsRequest.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(); + } + 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.appengine.v1.ListDomainMappingsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.ListDomainMappingsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + + @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.appengine.v1.ListDomainMappingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListDomainMappingsRequest) + private static final com.google.appengine.v1.ListDomainMappingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListDomainMappingsRequest(); + } + + public static com.google.appengine.v1.ListDomainMappingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDomainMappingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDomainMappingsRequest(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.appengine.v1.ListDomainMappingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsRequestOrBuilder.java new file mode 100644 index 00000000..45e4eeff --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListDomainMappingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListDomainMappingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsResponse.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsResponse.java new file mode 100644 index 00000000..27675094 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsResponse.java @@ -0,0 +1,1133 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Response message for `DomainMappings.ListDomainMappings`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListDomainMappingsResponse} + */ +public final class ListDomainMappingsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListDomainMappingsResponse) + ListDomainMappingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDomainMappingsResponse.newBuilder() to construct. + private ListDomainMappingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDomainMappingsResponse() { + domainMappings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDomainMappingsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDomainMappingsResponse( + 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)) { + domainMappings_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + domainMappings_.add( + input.readMessage( + com.google.appengine.v1.DomainMapping.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + domainMappings_ = java.util.Collections.unmodifiableList(domainMappings_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListDomainMappingsResponse.class, + com.google.appengine.v1.ListDomainMappingsResponse.Builder.class); + } + + public static final int DOMAIN_MAPPINGS_FIELD_NUMBER = 1; + private java.util.List domainMappings_; + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + @java.lang.Override + public java.util.List getDomainMappingsList() { + return domainMappings_; + } + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + @java.lang.Override + public java.util.List + getDomainMappingsOrBuilderList() { + return domainMappings_; + } + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + @java.lang.Override + public int getDomainMappingsCount() { + return domainMappings_.size(); + } + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + @java.lang.Override + public com.google.appengine.v1.DomainMapping getDomainMappings(int index) { + return domainMappings_.get(index); + } + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + @java.lang.Override + public com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingsOrBuilder(int index) { + return domainMappings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < domainMappings_.size(); i++) { + output.writeMessage(1, domainMappings_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < domainMappings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, domainMappings_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.appengine.v1.ListDomainMappingsResponse)) { + return super.equals(obj); + } + com.google.appengine.v1.ListDomainMappingsResponse other = + (com.google.appengine.v1.ListDomainMappingsResponse) obj; + + if (!getDomainMappingsList().equals(other.getDomainMappingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getDomainMappingsCount() > 0) { + hash = (37 * hash) + DOMAIN_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + getDomainMappingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListDomainMappingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListDomainMappingsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListDomainMappingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListDomainMappingsResponse 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.appengine.v1.ListDomainMappingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListDomainMappingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListDomainMappingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListDomainMappingsResponse 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.appengine.v1.ListDomainMappingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListDomainMappingsResponse 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.appengine.v1.ListDomainMappingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListDomainMappingsResponse 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.appengine.v1.ListDomainMappingsResponse 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 message for `DomainMappings.ListDomainMappings`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListDomainMappingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListDomainMappingsResponse) + com.google.appengine.v1.ListDomainMappingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListDomainMappingsResponse.class, + com.google.appengine.v1.ListDomainMappingsResponse.Builder.class); + } + + // Construct using com.google.appengine.v1.ListDomainMappingsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDomainMappingsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (domainMappingsBuilder_ == null) { + domainMappings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + domainMappingsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListDomainMappingsResponse_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListDomainMappingsResponse getDefaultInstanceForType() { + return com.google.appengine.v1.ListDomainMappingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListDomainMappingsResponse build() { + com.google.appengine.v1.ListDomainMappingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListDomainMappingsResponse buildPartial() { + com.google.appengine.v1.ListDomainMappingsResponse result = + new com.google.appengine.v1.ListDomainMappingsResponse(this); + int from_bitField0_ = bitField0_; + if (domainMappingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + domainMappings_ = java.util.Collections.unmodifiableList(domainMappings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.domainMappings_ = domainMappings_; + } else { + result.domainMappings_ = domainMappingsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.appengine.v1.ListDomainMappingsResponse) { + return mergeFrom((com.google.appengine.v1.ListDomainMappingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListDomainMappingsResponse other) { + if (other == com.google.appengine.v1.ListDomainMappingsResponse.getDefaultInstance()) + return this; + if (domainMappingsBuilder_ == null) { + if (!other.domainMappings_.isEmpty()) { + if (domainMappings_.isEmpty()) { + domainMappings_ = other.domainMappings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDomainMappingsIsMutable(); + domainMappings_.addAll(other.domainMappings_); + } + onChanged(); + } + } else { + if (!other.domainMappings_.isEmpty()) { + if (domainMappingsBuilder_.isEmpty()) { + domainMappingsBuilder_.dispose(); + domainMappingsBuilder_ = null; + domainMappings_ = other.domainMappings_; + bitField0_ = (bitField0_ & ~0x00000001); + domainMappingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDomainMappingsFieldBuilder() + : null; + } else { + domainMappingsBuilder_.addAllMessages(other.domainMappings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + 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.appengine.v1.ListDomainMappingsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.ListDomainMappingsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List domainMappings_ = + java.util.Collections.emptyList(); + + private void ensureDomainMappingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + domainMappings_ = + new java.util.ArrayList(domainMappings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.DomainMapping, + com.google.appengine.v1.DomainMapping.Builder, + com.google.appengine.v1.DomainMappingOrBuilder> + domainMappingsBuilder_; + + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public java.util.List getDomainMappingsList() { + if (domainMappingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(domainMappings_); + } else { + return domainMappingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public int getDomainMappingsCount() { + if (domainMappingsBuilder_ == null) { + return domainMappings_.size(); + } else { + return domainMappingsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public com.google.appengine.v1.DomainMapping getDomainMappings(int index) { + if (domainMappingsBuilder_ == null) { + return domainMappings_.get(index); + } else { + return domainMappingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public Builder setDomainMappings(int index, com.google.appengine.v1.DomainMapping value) { + if (domainMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainMappingsIsMutable(); + domainMappings_.set(index, value); + onChanged(); + } else { + domainMappingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public Builder setDomainMappings( + int index, com.google.appengine.v1.DomainMapping.Builder builderForValue) { + if (domainMappingsBuilder_ == null) { + ensureDomainMappingsIsMutable(); + domainMappings_.set(index, builderForValue.build()); + onChanged(); + } else { + domainMappingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public Builder addDomainMappings(com.google.appengine.v1.DomainMapping value) { + if (domainMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainMappingsIsMutable(); + domainMappings_.add(value); + onChanged(); + } else { + domainMappingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public Builder addDomainMappings(int index, com.google.appengine.v1.DomainMapping value) { + if (domainMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainMappingsIsMutable(); + domainMappings_.add(index, value); + onChanged(); + } else { + domainMappingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public Builder addDomainMappings( + com.google.appengine.v1.DomainMapping.Builder builderForValue) { + if (domainMappingsBuilder_ == null) { + ensureDomainMappingsIsMutable(); + domainMappings_.add(builderForValue.build()); + onChanged(); + } else { + domainMappingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public Builder addDomainMappings( + int index, com.google.appengine.v1.DomainMapping.Builder builderForValue) { + if (domainMappingsBuilder_ == null) { + ensureDomainMappingsIsMutable(); + domainMappings_.add(index, builderForValue.build()); + onChanged(); + } else { + domainMappingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public Builder addAllDomainMappings( + java.lang.Iterable values) { + if (domainMappingsBuilder_ == null) { + ensureDomainMappingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, domainMappings_); + onChanged(); + } else { + domainMappingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public Builder clearDomainMappings() { + if (domainMappingsBuilder_ == null) { + domainMappings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + domainMappingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public Builder removeDomainMappings(int index) { + if (domainMappingsBuilder_ == null) { + ensureDomainMappingsIsMutable(); + domainMappings_.remove(index); + onChanged(); + } else { + domainMappingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public com.google.appengine.v1.DomainMapping.Builder getDomainMappingsBuilder(int index) { + return getDomainMappingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingsOrBuilder(int index) { + if (domainMappingsBuilder_ == null) { + return domainMappings_.get(index); + } else { + return domainMappingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public java.util.List + getDomainMappingsOrBuilderList() { + if (domainMappingsBuilder_ != null) { + return domainMappingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(domainMappings_); + } + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public com.google.appengine.v1.DomainMapping.Builder addDomainMappingsBuilder() { + return getDomainMappingsFieldBuilder() + .addBuilder(com.google.appengine.v1.DomainMapping.getDefaultInstance()); + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public com.google.appengine.v1.DomainMapping.Builder addDomainMappingsBuilder(int index) { + return getDomainMappingsFieldBuilder() + .addBuilder(index, com.google.appengine.v1.DomainMapping.getDefaultInstance()); + } + /** + * + * + *
+     * The domain mappings for the application.
+     * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + public java.util.List + getDomainMappingsBuilderList() { + return getDomainMappingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.DomainMapping, + com.google.appengine.v1.DomainMapping.Builder, + com.google.appengine.v1.DomainMappingOrBuilder> + getDomainMappingsFieldBuilder() { + if (domainMappingsBuilder_ == null) { + domainMappingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.DomainMapping, + com.google.appengine.v1.DomainMapping.Builder, + com.google.appengine.v1.DomainMappingOrBuilder>( + domainMappings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + domainMappings_ = null; + } + return domainMappingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.appengine.v1.ListDomainMappingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListDomainMappingsResponse) + private static final com.google.appengine.v1.ListDomainMappingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListDomainMappingsResponse(); + } + + public static com.google.appengine.v1.ListDomainMappingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDomainMappingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDomainMappingsResponse(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.appengine.v1.ListDomainMappingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsResponseOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsResponseOrBuilder.java new file mode 100644 index 00000000..454614d9 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListDomainMappingsResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListDomainMappingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListDomainMappingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + java.util.List getDomainMappingsList(); + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + com.google.appengine.v1.DomainMapping getDomainMappings(int index); + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + int getDomainMappingsCount(); + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + java.util.List + getDomainMappingsOrBuilderList(); + /** + * + * + *
+   * The domain mappings for the application.
+   * 
+ * + * repeated .google.appengine.v1.DomainMapping domain_mappings = 1; + */ + com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingsOrBuilder(int index); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesRequest.java new file mode 100644 index 00000000..d34288a1 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesRequest.java @@ -0,0 +1,1104 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Firewall.ListIngressRules`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListIngressRulesRequest} + */ +public final class ListIngressRulesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListIngressRulesRequest) + ListIngressRulesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListIngressRulesRequest.newBuilder() to construct. + private ListIngressRulesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListIngressRulesRequest() { + parent_ = ""; + pageToken_ = ""; + matchingAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListIngressRulesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListIngressRulesRequest( + 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(); + + matchingAddress_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListIngressRulesRequest.class, + com.google.appengine.v1.ListIngressRulesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the Firewall collection to retrieve.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the Firewall collection to retrieve.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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 MATCHING_ADDRESS_FIELD_NUMBER = 4; + private volatile java.lang.Object matchingAddress_; + /** + * + * + *
+   * A valid IP Address. If set, only rules matching this address will be
+   * returned. The first returned rule will be the rule that fires on requests
+   * from this IP.
+   * 
+ * + * string matching_address = 4; + * + * @return The matchingAddress. + */ + @java.lang.Override + public java.lang.String getMatchingAddress() { + java.lang.Object ref = matchingAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchingAddress_ = s; + return s; + } + } + /** + * + * + *
+   * A valid IP Address. If set, only rules matching this address will be
+   * returned. The first returned rule will be the rule that fires on requests
+   * from this IP.
+   * 
+ * + * string matching_address = 4; + * + * @return The bytes for matchingAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMatchingAddressBytes() { + java.lang.Object ref = matchingAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchingAddress_ = 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 (!getMatchingAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, matchingAddress_); + } + 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 (!getMatchingAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, matchingAddress_); + } + 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.appengine.v1.ListIngressRulesRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.ListIngressRulesRequest other = + (com.google.appengine.v1.ListIngressRulesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getMatchingAddress().equals(other.getMatchingAddress())) 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) + MATCHING_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getMatchingAddress().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListIngressRulesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListIngressRulesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListIngressRulesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListIngressRulesRequest 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.appengine.v1.ListIngressRulesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListIngressRulesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListIngressRulesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListIngressRulesRequest 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.appengine.v1.ListIngressRulesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListIngressRulesRequest 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.appengine.v1.ListIngressRulesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListIngressRulesRequest 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.appengine.v1.ListIngressRulesRequest 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 message for `Firewall.ListIngressRules`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListIngressRulesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListIngressRulesRequest) + com.google.appengine.v1.ListIngressRulesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListIngressRulesRequest.class, + com.google.appengine.v1.ListIngressRulesRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.ListIngressRulesRequest.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_ = ""; + + matchingAddress_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListIngressRulesRequest getDefaultInstanceForType() { + return com.google.appengine.v1.ListIngressRulesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListIngressRulesRequest build() { + com.google.appengine.v1.ListIngressRulesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListIngressRulesRequest buildPartial() { + com.google.appengine.v1.ListIngressRulesRequest result = + new com.google.appengine.v1.ListIngressRulesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.matchingAddress_ = matchingAddress_; + 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.appengine.v1.ListIngressRulesRequest) { + return mergeFrom((com.google.appengine.v1.ListIngressRulesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListIngressRulesRequest other) { + if (other == com.google.appengine.v1.ListIngressRulesRequest.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.getMatchingAddress().isEmpty()) { + matchingAddress_ = other.matchingAddress_; + 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.appengine.v1.ListIngressRulesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ListIngressRulesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the Firewall collection to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the Firewall collection to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the Firewall collection to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the Firewall collection to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Firewall collection to retrieve.
+     * Example: `apps/myapp/firewall/ingressRules`.
+     * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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 matchingAddress_ = ""; + /** + * + * + *
+     * A valid IP Address. If set, only rules matching this address will be
+     * returned. The first returned rule will be the rule that fires on requests
+     * from this IP.
+     * 
+ * + * string matching_address = 4; + * + * @return The matchingAddress. + */ + public java.lang.String getMatchingAddress() { + java.lang.Object ref = matchingAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchingAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A valid IP Address. If set, only rules matching this address will be
+     * returned. The first returned rule will be the rule that fires on requests
+     * from this IP.
+     * 
+ * + * string matching_address = 4; + * + * @return The bytes for matchingAddress. + */ + public com.google.protobuf.ByteString getMatchingAddressBytes() { + java.lang.Object ref = matchingAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + matchingAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A valid IP Address. If set, only rules matching this address will be
+     * returned. The first returned rule will be the rule that fires on requests
+     * from this IP.
+     * 
+ * + * string matching_address = 4; + * + * @param value The matchingAddress to set. + * @return This builder for chaining. + */ + public Builder setMatchingAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + matchingAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A valid IP Address. If set, only rules matching this address will be
+     * returned. The first returned rule will be the rule that fires on requests
+     * from this IP.
+     * 
+ * + * string matching_address = 4; + * + * @return This builder for chaining. + */ + public Builder clearMatchingAddress() { + + matchingAddress_ = getDefaultInstance().getMatchingAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * A valid IP Address. If set, only rules matching this address will be
+     * returned. The first returned rule will be the rule that fires on requests
+     * from this IP.
+     * 
+ * + * string matching_address = 4; + * + * @param value The bytes for matchingAddress to set. + * @return This builder for chaining. + */ + public Builder setMatchingAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + matchingAddress_ = 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.appengine.v1.ListIngressRulesRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListIngressRulesRequest) + private static final com.google.appengine.v1.ListIngressRulesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListIngressRulesRequest(); + } + + public static com.google.appengine.v1.ListIngressRulesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIngressRulesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListIngressRulesRequest(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.appengine.v1.ListIngressRulesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesRequestOrBuilder.java new file mode 100644 index 00000000..8de20dec --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListIngressRulesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListIngressRulesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Firewall collection to retrieve.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the Firewall collection to retrieve.
+   * Example: `apps/myapp/firewall/ingressRules`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A valid IP Address. If set, only rules matching this address will be
+   * returned. The first returned rule will be the rule that fires on requests
+   * from this IP.
+   * 
+ * + * string matching_address = 4; + * + * @return The matchingAddress. + */ + java.lang.String getMatchingAddress(); + /** + * + * + *
+   * A valid IP Address. If set, only rules matching this address will be
+   * returned. The first returned rule will be the rule that fires on requests
+   * from this IP.
+   * 
+ * + * string matching_address = 4; + * + * @return The bytes for matchingAddress. + */ + com.google.protobuf.ByteString getMatchingAddressBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesResponse.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesResponse.java new file mode 100644 index 00000000..247fbebe --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesResponse.java @@ -0,0 +1,1132 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Response message for `Firewall.ListIngressRules`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListIngressRulesResponse} + */ +public final class ListIngressRulesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListIngressRulesResponse) + ListIngressRulesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListIngressRulesResponse.newBuilder() to construct. + private ListIngressRulesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListIngressRulesResponse() { + ingressRules_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListIngressRulesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListIngressRulesResponse( + 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)) { + ingressRules_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ingressRules_.add( + input.readMessage( + com.google.appengine.v1.firewall.FirewallRule.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + ingressRules_ = java.util.Collections.unmodifiableList(ingressRules_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListIngressRulesResponse.class, + com.google.appengine.v1.ListIngressRulesResponse.Builder.class); + } + + public static final int INGRESS_RULES_FIELD_NUMBER = 1; + private java.util.List ingressRules_; + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public java.util.List getIngressRulesList() { + return ingressRules_; + } + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public java.util.List + getIngressRulesOrBuilderList() { + return ingressRules_; + } + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public int getIngressRulesCount() { + return ingressRules_.size(); + } + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule getIngressRules(int index) { + return ingressRules_.get(index); + } + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getIngressRulesOrBuilder( + int index) { + return ingressRules_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < ingressRules_.size(); i++) { + output.writeMessage(1, ingressRules_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < ingressRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, ingressRules_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.appengine.v1.ListIngressRulesResponse)) { + return super.equals(obj); + } + com.google.appengine.v1.ListIngressRulesResponse other = + (com.google.appengine.v1.ListIngressRulesResponse) obj; + + if (!getIngressRulesList().equals(other.getIngressRulesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getIngressRulesCount() > 0) { + hash = (37 * hash) + INGRESS_RULES_FIELD_NUMBER; + hash = (53 * hash) + getIngressRulesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListIngressRulesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListIngressRulesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListIngressRulesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListIngressRulesResponse 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.appengine.v1.ListIngressRulesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListIngressRulesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListIngressRulesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListIngressRulesResponse 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.appengine.v1.ListIngressRulesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListIngressRulesResponse 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.appengine.v1.ListIngressRulesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListIngressRulesResponse 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.appengine.v1.ListIngressRulesResponse 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 message for `Firewall.ListIngressRules`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListIngressRulesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListIngressRulesResponse) + com.google.appengine.v1.ListIngressRulesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListIngressRulesResponse.class, + com.google.appengine.v1.ListIngressRulesResponse.Builder.class); + } + + // Construct using com.google.appengine.v1.ListIngressRulesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIngressRulesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (ingressRulesBuilder_ == null) { + ingressRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ingressRulesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListIngressRulesResponse_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListIngressRulesResponse getDefaultInstanceForType() { + return com.google.appengine.v1.ListIngressRulesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListIngressRulesResponse build() { + com.google.appengine.v1.ListIngressRulesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListIngressRulesResponse buildPartial() { + com.google.appengine.v1.ListIngressRulesResponse result = + new com.google.appengine.v1.ListIngressRulesResponse(this); + int from_bitField0_ = bitField0_; + if (ingressRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ingressRules_ = java.util.Collections.unmodifiableList(ingressRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ingressRules_ = ingressRules_; + } else { + result.ingressRules_ = ingressRulesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.appengine.v1.ListIngressRulesResponse) { + return mergeFrom((com.google.appengine.v1.ListIngressRulesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListIngressRulesResponse other) { + if (other == com.google.appengine.v1.ListIngressRulesResponse.getDefaultInstance()) + return this; + if (ingressRulesBuilder_ == null) { + if (!other.ingressRules_.isEmpty()) { + if (ingressRules_.isEmpty()) { + ingressRules_ = other.ingressRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIngressRulesIsMutable(); + ingressRules_.addAll(other.ingressRules_); + } + onChanged(); + } + } else { + if (!other.ingressRules_.isEmpty()) { + if (ingressRulesBuilder_.isEmpty()) { + ingressRulesBuilder_.dispose(); + ingressRulesBuilder_ = null; + ingressRules_ = other.ingressRules_; + bitField0_ = (bitField0_ & ~0x00000001); + ingressRulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIngressRulesFieldBuilder() + : null; + } else { + ingressRulesBuilder_.addAllMessages(other.ingressRules_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + 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.appengine.v1.ListIngressRulesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ListIngressRulesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List ingressRules_ = + java.util.Collections.emptyList(); + + private void ensureIngressRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ingressRules_ = + new java.util.ArrayList(ingressRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + ingressRulesBuilder_; + + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public java.util.List getIngressRulesList() { + if (ingressRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ingressRules_); + } else { + return ingressRulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public int getIngressRulesCount() { + if (ingressRulesBuilder_ == null) { + return ingressRules_.size(); + } else { + return ingressRulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRule getIngressRules(int index) { + if (ingressRulesBuilder_ == null) { + return ingressRules_.get(index); + } else { + return ingressRulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder setIngressRules(int index, com.google.appengine.v1.firewall.FirewallRule value) { + if (ingressRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIngressRulesIsMutable(); + ingressRules_.set(index, value); + onChanged(); + } else { + ingressRulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder setIngressRules( + int index, com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.set(index, builderForValue.build()); + onChanged(); + } else { + ingressRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addIngressRules(com.google.appengine.v1.firewall.FirewallRule value) { + if (ingressRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIngressRulesIsMutable(); + ingressRules_.add(value); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addIngressRules(int index, com.google.appengine.v1.firewall.FirewallRule value) { + if (ingressRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIngressRulesIsMutable(); + ingressRules_.add(index, value); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addIngressRules( + com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.add(builderForValue.build()); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addIngressRules( + int index, com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.add(index, builderForValue.build()); + onChanged(); + } else { + ingressRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder addAllIngressRules( + java.lang.Iterable values) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ingressRules_); + onChanged(); + } else { + ingressRulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder clearIngressRules() { + if (ingressRulesBuilder_ == null) { + ingressRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ingressRulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public Builder removeIngressRules(int index) { + if (ingressRulesBuilder_ == null) { + ensureIngressRulesIsMutable(); + ingressRules_.remove(index); + onChanged(); + } else { + ingressRulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder getIngressRulesBuilder(int index) { + return getIngressRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getIngressRulesOrBuilder( + int index) { + if (ingressRulesBuilder_ == null) { + return ingressRules_.get(index); + } else { + return ingressRulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public java.util.List + getIngressRulesOrBuilderList() { + if (ingressRulesBuilder_ != null) { + return ingressRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ingressRules_); + } + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder addIngressRulesBuilder() { + return getIngressRulesFieldBuilder() + .addBuilder(com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance()); + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder addIngressRulesBuilder(int index) { + return getIngressRulesFieldBuilder() + .addBuilder(index, com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance()); + } + /** + * + * + *
+     * The ingress FirewallRules for this application.
+     * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + public java.util.List + getIngressRulesBuilderList() { + return getIngressRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + getIngressRulesFieldBuilder() { + if (ingressRulesBuilder_ == null) { + ingressRulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder>( + ingressRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + ingressRules_ = null; + } + return ingressRulesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.appengine.v1.ListIngressRulesResponse) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListIngressRulesResponse) + private static final com.google.appengine.v1.ListIngressRulesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListIngressRulesResponse(); + } + + public static com.google.appengine.v1.ListIngressRulesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIngressRulesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListIngressRulesResponse(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.appengine.v1.ListIngressRulesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesResponseOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesResponseOrBuilder.java new file mode 100644 index 00000000..c7db2d84 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListIngressRulesResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListIngressRulesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListIngressRulesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + java.util.List getIngressRulesList(); + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + com.google.appengine.v1.firewall.FirewallRule getIngressRules(int index); + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + int getIngressRulesCount(); + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + java.util.List + getIngressRulesOrBuilderList(); + /** + * + * + *
+   * The ingress FirewallRules for this application.
+   * 
+ * + * repeated .google.appengine.v1.FirewallRule ingress_rules = 1; + */ + com.google.appengine.v1.firewall.FirewallRuleOrBuilder getIngressRulesOrBuilder(int index); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesRequest.java new file mode 100644 index 00000000..38622005 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesRequest.java @@ -0,0 +1,910 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Instances.ListInstances`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListInstancesRequest} + */ +public final class ListInstancesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListInstancesRequest) + ListInstancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesRequest.newBuilder() to construct. + private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstancesRequest( + 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; + } + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListInstancesRequest.class, + com.google.appengine.v1.ListInstancesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent Version resource. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent Version resource. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + + 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_); + } + 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_); + } + 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.appengine.v1.ListInstancesRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.ListInstancesRequest other = + (com.google.appengine.v1.ListInstancesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListInstancesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListInstancesRequest 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.appengine.v1.ListInstancesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListInstancesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListInstancesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListInstancesRequest 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.appengine.v1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListInstancesRequest 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.appengine.v1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListInstancesRequest 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.appengine.v1.ListInstancesRequest 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 message for `Instances.ListInstances`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListInstancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListInstancesRequest) + com.google.appengine.v1.ListInstancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListInstancesRequest.class, + com.google.appengine.v1.ListInstancesRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.ListInstancesRequest.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListInstancesRequest getDefaultInstanceForType() { + return com.google.appengine.v1.ListInstancesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListInstancesRequest build() { + com.google.appengine.v1.ListInstancesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListInstancesRequest buildPartial() { + com.google.appengine.v1.ListInstancesRequest result = + new com.google.appengine.v1.ListInstancesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + 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.appengine.v1.ListInstancesRequest) { + return mergeFrom((com.google.appengine.v1.ListInstancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListInstancesRequest other) { + if (other == com.google.appengine.v1.ListInstancesRequest.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(); + } + 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.appengine.v1.ListInstancesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ListInstancesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent Version resource. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Version resource. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Version resource. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent Version resource. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent Version resource. Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + + @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.appengine.v1.ListInstancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListInstancesRequest) + private static final com.google.appengine.v1.ListInstancesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListInstancesRequest(); + } + + public static com.google.appengine.v1.ListInstancesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstancesRequest(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.appengine.v1.ListInstancesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesRequestOrBuilder.java new file mode 100644 index 00000000..c52e4009 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesRequestOrBuilder.java @@ -0,0 +1,90 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListInstancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListInstancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent Version resource. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent Version resource. Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesResponse.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesResponse.java new file mode 100644 index 00000000..eebd71ed --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesResponse.java @@ -0,0 +1,1124 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Response message for `Instances.ListInstances`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListInstancesResponse} + */ +public final class ListInstancesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListInstancesResponse) + ListInstancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesResponse.newBuilder() to construct. + private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesResponse() { + instances_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstancesResponse( + 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)) { + instances_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instances_.add( + input.readMessage(com.google.appengine.v1.Instance.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListInstancesResponse.class, + com.google.appengine.v1.ListInstancesResponse.Builder.class); + } + + public static final int INSTANCES_FIELD_NUMBER = 1; + private java.util.List instances_; + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List + getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.appengine.v1.Instance getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.appengine.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + return instances_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < instances_.size(); i++) { + output.writeMessage(1, instances_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instances_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.appengine.v1.ListInstancesResponse)) { + return super.equals(obj); + } + com.google.appengine.v1.ListInstancesResponse other = + (com.google.appengine.v1.ListInstancesResponse) obj; + + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListInstancesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListInstancesResponse 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.appengine.v1.ListInstancesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListInstancesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListInstancesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListInstancesResponse 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.appengine.v1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListInstancesResponse 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.appengine.v1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListInstancesResponse 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.appengine.v1.ListInstancesResponse 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 message for `Instances.ListInstances`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListInstancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListInstancesResponse) + com.google.appengine.v1.ListInstancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListInstancesResponse.class, + com.google.appengine.v1.ListInstancesResponse.Builder.class); + } + + // Construct using com.google.appengine.v1.ListInstancesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + instancesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListInstancesResponse getDefaultInstanceForType() { + return com.google.appengine.v1.ListInstancesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListInstancesResponse build() { + com.google.appengine.v1.ListInstancesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListInstancesResponse buildPartial() { + com.google.appengine.v1.ListInstancesResponse result = + new com.google.appengine.v1.ListInstancesResponse(this); + int from_bitField0_ = bitField0_; + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.appengine.v1.ListInstancesResponse) { + return mergeFrom((com.google.appengine.v1.ListInstancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListInstancesResponse other) { + if (other == com.google.appengine.v1.ListInstancesResponse.getDefaultInstance()) return this; + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + 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.appengine.v1.ListInstancesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ListInstancesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Instance, + com.google.appengine.v1.Instance.Builder, + com.google.appengine.v1.InstanceOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public com.google.appengine.v1.Instance getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public Builder setInstances(int index, com.google.appengine.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public Builder setInstances( + int index, com.google.appengine.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public Builder addInstances(com.google.appengine.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public Builder addInstances(int index, com.google.appengine.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public Builder addInstances(com.google.appengine.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public Builder addInstances( + int index, com.google.appengine.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public Builder addAllInstances( + java.lang.Iterable values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public com.google.appengine.v1.Instance.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public com.google.appengine.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public com.google.appengine.v1.Instance.Builder addInstancesBuilder() { + return getInstancesFieldBuilder() + .addBuilder(com.google.appengine.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public com.google.appengine.v1.Instance.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.appengine.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * The instances belonging to the requested version.
+     * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + public java.util.List getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Instance, + com.google.appengine.v1.Instance.Builder, + com.google.appengine.v1.InstanceOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Instance, + com.google.appengine.v1.Instance.Builder, + com.google.appengine.v1.InstanceOrBuilder>( + instances_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.appengine.v1.ListInstancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListInstancesResponse) + private static final com.google.appengine.v1.ListInstancesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListInstancesResponse(); + } + + public static com.google.appengine.v1.ListInstancesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstancesResponse(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.appengine.v1.ListInstancesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesResponseOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesResponseOrBuilder.java new file mode 100644 index 00000000..5a93837e --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListInstancesResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListInstancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListInstancesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + com.google.appengine.v1.Instance getInstances(int index); + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + int getInstancesCount(); + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + java.util.List getInstancesOrBuilderList(); + /** + * + * + *
+   * The instances belonging to the requested version.
+   * 
+ * + * repeated .google.appengine.v1.Instance instances = 1; + */ + com.google.appengine.v1.InstanceOrBuilder getInstancesOrBuilder(int index); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesRequest.java new file mode 100644 index 00000000..ce2d8647 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesRequest.java @@ -0,0 +1,903 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Services.ListServices`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListServicesRequest} + */ +public final class ListServicesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListServicesRequest) + ListServicesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListServicesRequest.newBuilder() to construct. + private ListServicesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListServicesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListServicesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListServicesRequest( + 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; + } + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListServicesRequest.class, + com.google.appengine.v1.ListServicesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * 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; + } + } + + 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_); + } + 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_); + } + 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.appengine.v1.ListServicesRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.ListServicesRequest other = + (com.google.appengine.v1.ListServicesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListServicesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListServicesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListServicesRequest 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.appengine.v1.ListServicesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListServicesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListServicesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListServicesRequest 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.appengine.v1.ListServicesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListServicesRequest 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.appengine.v1.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListServicesRequest 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.appengine.v1.ListServicesRequest 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 message for `Services.ListServices`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListServicesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListServicesRequest) + com.google.appengine.v1.ListServicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListServicesRequest.class, + com.google.appengine.v1.ListServicesRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.ListServicesRequest.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListServicesRequest getDefaultInstanceForType() { + return com.google.appengine.v1.ListServicesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListServicesRequest build() { + com.google.appengine.v1.ListServicesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListServicesRequest buildPartial() { + com.google.appengine.v1.ListServicesRequest result = + new com.google.appengine.v1.ListServicesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + 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.appengine.v1.ListServicesRequest) { + return mergeFrom((com.google.appengine.v1.ListServicesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListServicesRequest other) { + if (other == com.google.appengine.v1.ListServicesRequest.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(); + } + 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.appengine.v1.ListServicesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ListServicesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent Application resource. Example: `apps/myapp`.
+     * 
+ * + * string parent = 1; + * + * @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_; + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * 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; + } + + @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.appengine.v1.ListServicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListServicesRequest) + private static final com.google.appengine.v1.ListServicesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListServicesRequest(); + } + + public static com.google.appengine.v1.ListServicesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListServicesRequest(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.appengine.v1.ListServicesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesRequestOrBuilder.java new file mode 100644 index 00000000..9520b6ec --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListServicesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListServicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent Application resource. Example: `apps/myapp`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesResponse.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesResponse.java new file mode 100644 index 00000000..2c754a68 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesResponse.java @@ -0,0 +1,1122 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Response message for `Services.ListServices`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListServicesResponse} + */ +public final class ListServicesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListServicesResponse) + ListServicesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListServicesResponse.newBuilder() to construct. + private ListServicesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListServicesResponse() { + services_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListServicesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListServicesResponse( + 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)) { + services_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + services_.add( + input.readMessage(com.google.appengine.v1.Service.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + services_ = java.util.Collections.unmodifiableList(services_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListServicesResponse.class, + com.google.appengine.v1.ListServicesResponse.Builder.class); + } + + public static final int SERVICES_FIELD_NUMBER = 1; + private java.util.List services_; + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + @java.lang.Override + public java.util.List getServicesList() { + return services_; + } + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + @java.lang.Override + public java.util.List + getServicesOrBuilderList() { + return services_; + } + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + @java.lang.Override + public int getServicesCount() { + return services_.size(); + } + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + @java.lang.Override + public com.google.appengine.v1.Service getServices(int index) { + return services_.get(index); + } + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + @java.lang.Override + public com.google.appengine.v1.ServiceOrBuilder getServicesOrBuilder(int index) { + return services_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < services_.size(); i++) { + output.writeMessage(1, services_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < services_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.appengine.v1.ListServicesResponse)) { + return super.equals(obj); + } + com.google.appengine.v1.ListServicesResponse other = + (com.google.appengine.v1.ListServicesResponse) obj; + + if (!getServicesList().equals(other.getServicesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getServicesCount() > 0) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServicesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListServicesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListServicesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListServicesResponse 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.appengine.v1.ListServicesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListServicesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListServicesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListServicesResponse 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.appengine.v1.ListServicesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListServicesResponse 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.appengine.v1.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListServicesResponse 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.appengine.v1.ListServicesResponse 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 message for `Services.ListServices`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListServicesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListServicesResponse) + com.google.appengine.v1.ListServicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListServicesResponse.class, + com.google.appengine.v1.ListServicesResponse.Builder.class); + } + + // Construct using com.google.appengine.v1.ListServicesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getServicesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + servicesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListServicesResponse getDefaultInstanceForType() { + return com.google.appengine.v1.ListServicesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListServicesResponse build() { + com.google.appengine.v1.ListServicesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListServicesResponse buildPartial() { + com.google.appengine.v1.ListServicesResponse result = + new com.google.appengine.v1.ListServicesResponse(this); + int from_bitField0_ = bitField0_; + if (servicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + services_ = java.util.Collections.unmodifiableList(services_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.services_ = services_; + } else { + result.services_ = servicesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.appengine.v1.ListServicesResponse) { + return mergeFrom((com.google.appengine.v1.ListServicesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListServicesResponse other) { + if (other == com.google.appengine.v1.ListServicesResponse.getDefaultInstance()) return this; + if (servicesBuilder_ == null) { + if (!other.services_.isEmpty()) { + if (services_.isEmpty()) { + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServicesIsMutable(); + services_.addAll(other.services_); + } + onChanged(); + } + } else { + if (!other.services_.isEmpty()) { + if (servicesBuilder_.isEmpty()) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + servicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getServicesFieldBuilder() + : null; + } else { + servicesBuilder_.addAllMessages(other.services_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + 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.appengine.v1.ListServicesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ListServicesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List services_ = + java.util.Collections.emptyList(); + + private void ensureServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + services_ = new java.util.ArrayList(services_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Service, + com.google.appengine.v1.Service.Builder, + com.google.appengine.v1.ServiceOrBuilder> + servicesBuilder_; + + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public java.util.List getServicesList() { + if (servicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(services_); + } else { + return servicesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public int getServicesCount() { + if (servicesBuilder_ == null) { + return services_.size(); + } else { + return servicesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public com.google.appengine.v1.Service getServices(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public Builder setServices(int index, com.google.appengine.v1.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.set(index, value); + onChanged(); + } else { + servicesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public Builder setServices(int index, com.google.appengine.v1.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.set(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public Builder addServices(com.google.appengine.v1.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(value); + onChanged(); + } else { + servicesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public Builder addServices(int index, com.google.appengine.v1.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(index, value); + onChanged(); + } else { + servicesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public Builder addServices(com.google.appengine.v1.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public Builder addServices(int index, com.google.appengine.v1.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public Builder addAllServices( + java.lang.Iterable values) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, services_); + onChanged(); + } else { + servicesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public Builder clearServices() { + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servicesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public Builder removeServices(int index) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.remove(index); + onChanged(); + } else { + servicesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public com.google.appengine.v1.Service.Builder getServicesBuilder(int index) { + return getServicesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public com.google.appengine.v1.ServiceOrBuilder getServicesOrBuilder(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public java.util.List + getServicesOrBuilderList() { + if (servicesBuilder_ != null) { + return servicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(services_); + } + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public com.google.appengine.v1.Service.Builder addServicesBuilder() { + return getServicesFieldBuilder() + .addBuilder(com.google.appengine.v1.Service.getDefaultInstance()); + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public com.google.appengine.v1.Service.Builder addServicesBuilder(int index) { + return getServicesFieldBuilder() + .addBuilder(index, com.google.appengine.v1.Service.getDefaultInstance()); + } + /** + * + * + *
+     * The services belonging to the requested application.
+     * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + public java.util.List getServicesBuilderList() { + return getServicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Service, + com.google.appengine.v1.Service.Builder, + com.google.appengine.v1.ServiceOrBuilder> + getServicesFieldBuilder() { + if (servicesBuilder_ == null) { + servicesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Service, + com.google.appengine.v1.Service.Builder, + com.google.appengine.v1.ServiceOrBuilder>( + services_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + services_ = null; + } + return servicesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.appengine.v1.ListServicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListServicesResponse) + private static final com.google.appengine.v1.ListServicesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListServicesResponse(); + } + + public static com.google.appengine.v1.ListServicesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListServicesResponse(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.appengine.v1.ListServicesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesResponseOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesResponseOrBuilder.java new file mode 100644 index 00000000..7dd3132e --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListServicesResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListServicesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListServicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + java.util.List getServicesList(); + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + com.google.appengine.v1.Service getServices(int index); + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + int getServicesCount(); + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + java.util.List getServicesOrBuilderList(); + /** + * + * + *
+   * The services belonging to the requested application.
+   * 
+ * + * repeated .google.appengine.v1.Service services = 1; + */ + com.google.appengine.v1.ServiceOrBuilder getServicesOrBuilder(int index); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsRequest.java new file mode 100644 index 00000000..5d7e221c --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsRequest.java @@ -0,0 +1,1059 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Versions.ListVersions`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListVersionsRequest} + */ +public final class ListVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListVersionsRequest) + ListVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListVersionsRequest.newBuilder() to construct. + private ListVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListVersionsRequest() { + parent_ = ""; + view_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListVersionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListVersionsRequest( + 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: + { + int rawValue = input.readEnum(); + + view_ = rawValue; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListVersionsRequest.class, + com.google.appengine.v1.ListVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Name of the parent Service resource. Example:
+   * `apps/myapp/services/default`.
+   * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+   * Name of the parent Service resource. Example:
+   * `apps/myapp/services/default`.
+   * 
+ * + * string parent = 1; + * + * @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 VIEW_FIELD_NUMBER = 2; + private int view_; + /** + * + * + *
+   * Controls the set of fields returned in the `List` response.
+   * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Controls the set of fields returned in the `List` response.
+   * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.appengine.v1.VersionView getView() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.VersionView result = com.google.appengine.v1.VersionView.valueOf(view_); + return result == null ? com.google.appengine.v1.VersionView.UNRECOGNIZED : result; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (view_ != com.google.appengine.v1.VersionView.BASIC.getNumber()) { + output.writeEnum(2, view_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + 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 (view_ != com.google.appengine.v1.VersionView.BASIC.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + 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.appengine.v1.ListVersionsRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.ListVersionsRequest other = + (com.google.appengine.v1.ListVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (view_ != other.view_) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListVersionsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListVersionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListVersionsRequest 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.appengine.v1.ListVersionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListVersionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListVersionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListVersionsRequest 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.appengine.v1.ListVersionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListVersionsRequest 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.appengine.v1.ListVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListVersionsRequest 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.appengine.v1.ListVersionsRequest 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 message for `Versions.ListVersions`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListVersionsRequest) + com.google.appengine.v1.ListVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListVersionsRequest.class, + com.google.appengine.v1.ListVersionsRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.ListVersionsRequest.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_ = ""; + + view_ = 0; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListVersionsRequest getDefaultInstanceForType() { + return com.google.appengine.v1.ListVersionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListVersionsRequest build() { + com.google.appengine.v1.ListVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListVersionsRequest buildPartial() { + com.google.appengine.v1.ListVersionsRequest result = + new com.google.appengine.v1.ListVersionsRequest(this); + result.parent_ = parent_; + result.view_ = view_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + 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.appengine.v1.ListVersionsRequest) { + return mergeFrom((com.google.appengine.v1.ListVersionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListVersionsRequest other) { + if (other == com.google.appengine.v1.ListVersionsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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.appengine.v1.ListVersionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ListVersionsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Name of the parent Service resource. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Service resource. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of the parent Service resource. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @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; + } + /** + * + * + *
+     * Name of the parent Service resource. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parent Service resource. Example:
+     * `apps/myapp/services/default`.
+     * 
+ * + * string parent = 1; + * + * @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 view_ = 0; + /** + * + * + *
+     * Controls the set of fields returned in the `List` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Controls the set of fields returned in the `List` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls the set of fields returned in the `List` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.appengine.v1.VersionView getView() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.VersionView result = + com.google.appengine.v1.VersionView.valueOf(view_); + return result == null ? com.google.appengine.v1.VersionView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Controls the set of fields returned in the `List` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.appengine.v1.VersionView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Controls the set of fields returned in the `List` response.
+     * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum results to return per page.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + 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.appengine.v1.ListVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListVersionsRequest) + private static final com.google.appengine.v1.ListVersionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListVersionsRequest(); + } + + public static com.google.appengine.v1.ListVersionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListVersionsRequest(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.appengine.v1.ListVersionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsRequestOrBuilder.java new file mode 100644 index 00000000..cfab08f5 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsRequestOrBuilder.java @@ -0,0 +1,115 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parent Service resource. Example:
+   * `apps/myapp/services/default`.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Name of the parent Service resource. Example:
+   * `apps/myapp/services/default`.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Controls the set of fields returned in the `List` response.
+   * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Controls the set of fields returned in the `List` response.
+   * 
+ * + * .google.appengine.v1.VersionView view = 2; + * + * @return The view. + */ + com.google.appengine.v1.VersionView getView(); + + /** + * + * + *
+   * Maximum results to return per page.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsResponse.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsResponse.java new file mode 100644 index 00000000..2188206b --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsResponse.java @@ -0,0 +1,1122 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Response message for `Versions.ListVersions`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ListVersionsResponse} + */ +public final class ListVersionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ListVersionsResponse) + ListVersionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListVersionsResponse.newBuilder() to construct. + private ListVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListVersionsResponse() { + versions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListVersionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListVersionsResponse( + 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)) { + versions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + versions_.add( + input.readMessage(com.google.appengine.v1.Version.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + versions_ = java.util.Collections.unmodifiableList(versions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListVersionsResponse.class, + com.google.appengine.v1.ListVersionsResponse.Builder.class); + } + + public static final int VERSIONS_FIELD_NUMBER = 1; + private java.util.List versions_; + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + @java.lang.Override + public java.util.List getVersionsList() { + return versions_; + } + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + @java.lang.Override + public java.util.List + getVersionsOrBuilderList() { + return versions_; + } + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + @java.lang.Override + public int getVersionsCount() { + return versions_.size(); + } + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + @java.lang.Override + public com.google.appengine.v1.Version getVersions(int index) { + return versions_.get(index); + } + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + @java.lang.Override + public com.google.appengine.v1.VersionOrBuilder getVersionsOrBuilder(int index) { + return versions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < versions_.size(); i++) { + output.writeMessage(1, versions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < versions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, versions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.appengine.v1.ListVersionsResponse)) { + return super.equals(obj); + } + com.google.appengine.v1.ListVersionsResponse other = + (com.google.appengine.v1.ListVersionsResponse) obj; + + if (!getVersionsList().equals(other.getVersionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getVersionsCount() > 0) { + hash = (37 * hash) + VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getVersionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ListVersionsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListVersionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListVersionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListVersionsResponse 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.appengine.v1.ListVersionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ListVersionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ListVersionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListVersionsResponse 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.appengine.v1.ListVersionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListVersionsResponse 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.appengine.v1.ListVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ListVersionsResponse 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.appengine.v1.ListVersionsResponse 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 message for `Versions.ListVersions`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ListVersionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ListVersionsResponse) + com.google.appengine.v1.ListVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ListVersionsResponse.class, + com.google.appengine.v1.ListVersionsResponse.Builder.class); + } + + // Construct using com.google.appengine.v1.ListVersionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVersionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + versionsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_ListVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ListVersionsResponse getDefaultInstanceForType() { + return com.google.appengine.v1.ListVersionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ListVersionsResponse build() { + com.google.appengine.v1.ListVersionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ListVersionsResponse buildPartial() { + com.google.appengine.v1.ListVersionsResponse result = + new com.google.appengine.v1.ListVersionsResponse(this); + int from_bitField0_ = bitField0_; + if (versionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + versions_ = java.util.Collections.unmodifiableList(versions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.versions_ = versions_; + } else { + result.versions_ = versionsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.appengine.v1.ListVersionsResponse) { + return mergeFrom((com.google.appengine.v1.ListVersionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ListVersionsResponse other) { + if (other == com.google.appengine.v1.ListVersionsResponse.getDefaultInstance()) return this; + if (versionsBuilder_ == null) { + if (!other.versions_.isEmpty()) { + if (versions_.isEmpty()) { + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVersionsIsMutable(); + versions_.addAll(other.versions_); + } + onChanged(); + } + } else { + if (!other.versions_.isEmpty()) { + if (versionsBuilder_.isEmpty()) { + versionsBuilder_.dispose(); + versionsBuilder_ = null; + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000001); + versionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVersionsFieldBuilder() + : null; + } else { + versionsBuilder_.addAllMessages(other.versions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + 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.appengine.v1.ListVersionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ListVersionsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List versions_ = + java.util.Collections.emptyList(); + + private void ensureVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + versions_ = new java.util.ArrayList(versions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Version, + com.google.appengine.v1.Version.Builder, + com.google.appengine.v1.VersionOrBuilder> + versionsBuilder_; + + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public java.util.List getVersionsList() { + if (versionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(versions_); + } else { + return versionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public int getVersionsCount() { + if (versionsBuilder_ == null) { + return versions_.size(); + } else { + return versionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public com.google.appengine.v1.Version getVersions(int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); + } else { + return versionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public Builder setVersions(int index, com.google.appengine.v1.Version value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.set(index, value); + onChanged(); + } else { + versionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public Builder setVersions(int index, com.google.appengine.v1.Version.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.set(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public Builder addVersions(com.google.appengine.v1.Version value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(value); + onChanged(); + } else { + versionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public Builder addVersions(int index, com.google.appengine.v1.Version value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(index, value); + onChanged(); + } else { + versionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public Builder addVersions(com.google.appengine.v1.Version.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public Builder addVersions(int index, com.google.appengine.v1.Version.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public Builder addAllVersions( + java.lang.Iterable values) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versions_); + onChanged(); + } else { + versionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public Builder clearVersions() { + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + versionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public Builder removeVersions(int index) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.remove(index); + onChanged(); + } else { + versionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public com.google.appengine.v1.Version.Builder getVersionsBuilder(int index) { + return getVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public com.google.appengine.v1.VersionOrBuilder getVersionsOrBuilder(int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); + } else { + return versionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public java.util.List + getVersionsOrBuilderList() { + if (versionsBuilder_ != null) { + return versionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(versions_); + } + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public com.google.appengine.v1.Version.Builder addVersionsBuilder() { + return getVersionsFieldBuilder() + .addBuilder(com.google.appengine.v1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public com.google.appengine.v1.Version.Builder addVersionsBuilder(int index) { + return getVersionsFieldBuilder() + .addBuilder(index, com.google.appengine.v1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * The versions belonging to the requested service.
+     * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + public java.util.List getVersionsBuilderList() { + return getVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Version, + com.google.appengine.v1.Version.Builder, + com.google.appengine.v1.VersionOrBuilder> + getVersionsFieldBuilder() { + if (versionsBuilder_ == null) { + versionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Version, + com.google.appengine.v1.Version.Builder, + com.google.appengine.v1.VersionOrBuilder>( + versions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + versions_ = null; + } + return versionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Continuation token for fetching the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + 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.appengine.v1.ListVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ListVersionsResponse) + private static final com.google.appengine.v1.ListVersionsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ListVersionsResponse(); + } + + public static com.google.appengine.v1.ListVersionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListVersionsResponse(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.appengine.v1.ListVersionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsResponseOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsResponseOrBuilder.java new file mode 100644 index 00000000..c90cb5f5 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ListVersionsResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface ListVersionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ListVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + java.util.List getVersionsList(); + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + com.google.appengine.v1.Version getVersions(int index); + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + int getVersionsCount(); + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + java.util.List getVersionsOrBuilderList(); + /** + * + * + *
+   * The versions belonging to the requested service.
+   * 
+ * + * repeated .google.appengine.v1.Version versions = 1; + */ + com.google.appengine.v1.VersionOrBuilder getVersionsOrBuilder(int index); + + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Continuation token for fetching the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LivenessCheck.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LivenessCheck.java new file mode 100644 index 00000000..9adc2371 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LivenessCheck.java @@ -0,0 +1,1828 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Health checking configuration for VM instances. Unhealthy instances
+ * are killed and replaced with new instances.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.LivenessCheck} + */ +public final class LivenessCheck extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.LivenessCheck) + LivenessCheckOrBuilder { + private static final long serialVersionUID = 0L; + // Use LivenessCheck.newBuilder() to construct. + private LivenessCheck(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LivenessCheck() { + path_ = ""; + host_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LivenessCheck(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LivenessCheck( + 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(); + + path_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + host_ = s; + break; + } + case 24: + { + failureThreshold_ = input.readUInt32(); + break; + } + case 32: + { + successThreshold_ = input.readUInt32(); + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (checkInterval_ != null) { + subBuilder = checkInterval_.toBuilder(); + } + checkInterval_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(checkInterval_); + checkInterval_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeout_ != null) { + subBuilder = timeout_.toBuilder(); + } + timeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeout_); + timeout_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (initialDelay_ != null) { + subBuilder = initialDelay_.toBuilder(); + } + initialDelay_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(initialDelay_); + initialDelay_ = 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_LivenessCheck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_LivenessCheck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.LivenessCheck.class, + com.google.appengine.v1.LivenessCheck.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object path_; + /** + * + * + *
+   * The request path.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * The request path.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOST_FIELD_NUMBER = 2; + private volatile java.lang.Object host_; + /** + * + * + *
+   * Host header to send when performing a HTTP Liveness check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } + } + /** + * + * + *
+   * Host header to send when performing a HTTP Liveness check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAILURE_THRESHOLD_FIELD_NUMBER = 3; + private int failureThreshold_; + /** + * + * + *
+   * Number of consecutive failed checks required before considering the
+   * VM unhealthy.
+   * 
+ * + * uint32 failure_threshold = 3; + * + * @return The failureThreshold. + */ + @java.lang.Override + public int getFailureThreshold() { + return failureThreshold_; + } + + public static final int SUCCESS_THRESHOLD_FIELD_NUMBER = 4; + private int successThreshold_; + /** + * + * + *
+   * Number of consecutive successful checks required before considering
+   * the VM healthy.
+   * 
+ * + * uint32 success_threshold = 4; + * + * @return The successThreshold. + */ + @java.lang.Override + public int getSuccessThreshold() { + return successThreshold_; + } + + public static final int CHECK_INTERVAL_FIELD_NUMBER = 5; + private com.google.protobuf.Duration checkInterval_; + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return Whether the checkInterval field is set. + */ + @java.lang.Override + public boolean hasCheckInterval() { + return checkInterval_ != null; + } + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return The checkInterval. + */ + @java.lang.Override + public com.google.protobuf.Duration getCheckInterval() { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() { + return getCheckInterval(); + } + + public static final int TIMEOUT_FIELD_NUMBER = 6; + private com.google.protobuf.Duration timeout_; + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return Whether the timeout field is set. + */ + @java.lang.Override + public boolean hasTimeout() { + return timeout_ != null; + } + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return The timeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeout() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + return getTimeout(); + } + + public static final int INITIAL_DELAY_FIELD_NUMBER = 7; + private com.google.protobuf.Duration initialDelay_; + /** + * + * + *
+   * The initial delay before starting to execute the checks.
+   * 
+ * + * .google.protobuf.Duration initial_delay = 7; + * + * @return Whether the initialDelay field is set. + */ + @java.lang.Override + public boolean hasInitialDelay() { + return initialDelay_ != null; + } + /** + * + * + *
+   * The initial delay before starting to execute the checks.
+   * 
+ * + * .google.protobuf.Duration initial_delay = 7; + * + * @return The initialDelay. + */ + @java.lang.Override + public com.google.protobuf.Duration getInitialDelay() { + return initialDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : initialDelay_; + } + /** + * + * + *
+   * The initial delay before starting to execute the checks.
+   * 
+ * + * .google.protobuf.Duration initial_delay = 7; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getInitialDelayOrBuilder() { + return getInitialDelay(); + } + + 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 (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + if (!getHostBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, host_); + } + if (failureThreshold_ != 0) { + output.writeUInt32(3, failureThreshold_); + } + if (successThreshold_ != 0) { + output.writeUInt32(4, successThreshold_); + } + if (checkInterval_ != null) { + output.writeMessage(5, getCheckInterval()); + } + if (timeout_ != null) { + output.writeMessage(6, getTimeout()); + } + if (initialDelay_ != null) { + output.writeMessage(7, getInitialDelay()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + if (!getHostBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, host_); + } + if (failureThreshold_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, failureThreshold_); + } + if (successThreshold_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, successThreshold_); + } + if (checkInterval_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCheckInterval()); + } + if (timeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTimeout()); + } + if (initialDelay_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getInitialDelay()); + } + 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.appengine.v1.LivenessCheck)) { + return super.equals(obj); + } + com.google.appengine.v1.LivenessCheck other = (com.google.appengine.v1.LivenessCheck) obj; + + if (!getPath().equals(other.getPath())) return false; + if (!getHost().equals(other.getHost())) return false; + if (getFailureThreshold() != other.getFailureThreshold()) return false; + if (getSuccessThreshold() != other.getSuccessThreshold()) return false; + if (hasCheckInterval() != other.hasCheckInterval()) return false; + if (hasCheckInterval()) { + if (!getCheckInterval().equals(other.getCheckInterval())) return false; + } + if (hasTimeout() != other.hasTimeout()) return false; + if (hasTimeout()) { + if (!getTimeout().equals(other.getTimeout())) return false; + } + if (hasInitialDelay() != other.hasInitialDelay()) return false; + if (hasInitialDelay()) { + if (!getInitialDelay().equals(other.getInitialDelay())) 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) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (37 * hash) + FAILURE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getFailureThreshold(); + hash = (37 * hash) + SUCCESS_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getSuccessThreshold(); + if (hasCheckInterval()) { + hash = (37 * hash) + CHECK_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getCheckInterval().hashCode(); + } + if (hasTimeout()) { + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout().hashCode(); + } + if (hasInitialDelay()) { + hash = (37 * hash) + INITIAL_DELAY_FIELD_NUMBER; + hash = (53 * hash) + getInitialDelay().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.LivenessCheck parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.LivenessCheck parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.LivenessCheck parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.LivenessCheck 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.appengine.v1.LivenessCheck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.LivenessCheck parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.LivenessCheck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.LivenessCheck 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.appengine.v1.LivenessCheck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.LivenessCheck 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.appengine.v1.LivenessCheck parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.LivenessCheck 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.appengine.v1.LivenessCheck 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; + } + /** + * + * + *
+   * Health checking configuration for VM instances. Unhealthy instances
+   * are killed and replaced with new instances.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.LivenessCheck} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.LivenessCheck) + com.google.appengine.v1.LivenessCheckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_LivenessCheck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_LivenessCheck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.LivenessCheck.class, + com.google.appengine.v1.LivenessCheck.Builder.class); + } + + // Construct using com.google.appengine.v1.LivenessCheck.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(); + path_ = ""; + + host_ = ""; + + failureThreshold_ = 0; + + successThreshold_ = 0; + + if (checkIntervalBuilder_ == null) { + checkInterval_ = null; + } else { + checkInterval_ = null; + checkIntervalBuilder_ = null; + } + if (timeoutBuilder_ == null) { + timeout_ = null; + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + if (initialDelayBuilder_ == null) { + initialDelay_ = null; + } else { + initialDelay_ = null; + initialDelayBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_LivenessCheck_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.LivenessCheck getDefaultInstanceForType() { + return com.google.appengine.v1.LivenessCheck.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.LivenessCheck build() { + com.google.appengine.v1.LivenessCheck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.LivenessCheck buildPartial() { + com.google.appengine.v1.LivenessCheck result = + new com.google.appengine.v1.LivenessCheck(this); + result.path_ = path_; + result.host_ = host_; + result.failureThreshold_ = failureThreshold_; + result.successThreshold_ = successThreshold_; + if (checkIntervalBuilder_ == null) { + result.checkInterval_ = checkInterval_; + } else { + result.checkInterval_ = checkIntervalBuilder_.build(); + } + if (timeoutBuilder_ == null) { + result.timeout_ = timeout_; + } else { + result.timeout_ = timeoutBuilder_.build(); + } + if (initialDelayBuilder_ == null) { + result.initialDelay_ = initialDelay_; + } else { + result.initialDelay_ = initialDelayBuilder_.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.appengine.v1.LivenessCheck) { + return mergeFrom((com.google.appengine.v1.LivenessCheck) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.LivenessCheck other) { + if (other == com.google.appengine.v1.LivenessCheck.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + if (!other.getHost().isEmpty()) { + host_ = other.host_; + onChanged(); + } + if (other.getFailureThreshold() != 0) { + setFailureThreshold(other.getFailureThreshold()); + } + if (other.getSuccessThreshold() != 0) { + setSuccessThreshold(other.getSuccessThreshold()); + } + if (other.hasCheckInterval()) { + mergeCheckInterval(other.getCheckInterval()); + } + if (other.hasTimeout()) { + mergeTimeout(other.getTimeout()); + } + if (other.hasInitialDelay()) { + mergeInitialDelay(other.getInitialDelay()); + } + 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.appengine.v1.LivenessCheck parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.LivenessCheck) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + + private java.lang.Object host_ = ""; + /** + * + * + *
+     * Host header to send when performing a HTTP Liveness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Host header to send when performing a HTTP Liveness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @return The bytes for host. + */ + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Host header to send when performing a HTTP Liveness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + host_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Host header to send when performing a HTTP Liveness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @return This builder for chaining. + */ + public Builder clearHost() { + + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + * + * + *
+     * Host header to send when performing a HTTP Liveness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + host_ = value; + onChanged(); + return this; + } + + private int failureThreshold_; + /** + * + * + *
+     * Number of consecutive failed checks required before considering the
+     * VM unhealthy.
+     * 
+ * + * uint32 failure_threshold = 3; + * + * @return The failureThreshold. + */ + @java.lang.Override + public int getFailureThreshold() { + return failureThreshold_; + } + /** + * + * + *
+     * Number of consecutive failed checks required before considering the
+     * VM unhealthy.
+     * 
+ * + * uint32 failure_threshold = 3; + * + * @param value The failureThreshold to set. + * @return This builder for chaining. + */ + public Builder setFailureThreshold(int value) { + + failureThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of consecutive failed checks required before considering the
+     * VM unhealthy.
+     * 
+ * + * uint32 failure_threshold = 3; + * + * @return This builder for chaining. + */ + public Builder clearFailureThreshold() { + + failureThreshold_ = 0; + onChanged(); + return this; + } + + private int successThreshold_; + /** + * + * + *
+     * Number of consecutive successful checks required before considering
+     * the VM healthy.
+     * 
+ * + * uint32 success_threshold = 4; + * + * @return The successThreshold. + */ + @java.lang.Override + public int getSuccessThreshold() { + return successThreshold_; + } + /** + * + * + *
+     * Number of consecutive successful checks required before considering
+     * the VM healthy.
+     * 
+ * + * uint32 success_threshold = 4; + * + * @param value The successThreshold to set. + * @return This builder for chaining. + */ + public Builder setSuccessThreshold(int value) { + + successThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of consecutive successful checks required before considering
+     * the VM healthy.
+     * 
+ * + * uint32 success_threshold = 4; + * + * @return This builder for chaining. + */ + public Builder clearSuccessThreshold() { + + successThreshold_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration checkInterval_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + checkIntervalBuilder_; + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return Whether the checkInterval field is set. + */ + public boolean hasCheckInterval() { + return checkIntervalBuilder_ != null || checkInterval_ != null; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return The checkInterval. + */ + public com.google.protobuf.Duration getCheckInterval() { + if (checkIntervalBuilder_ == null) { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } else { + return checkIntervalBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public Builder setCheckInterval(com.google.protobuf.Duration value) { + if (checkIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + checkInterval_ = value; + onChanged(); + } else { + checkIntervalBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public Builder setCheckInterval(com.google.protobuf.Duration.Builder builderForValue) { + if (checkIntervalBuilder_ == null) { + checkInterval_ = builderForValue.build(); + onChanged(); + } else { + checkIntervalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public Builder mergeCheckInterval(com.google.protobuf.Duration value) { + if (checkIntervalBuilder_ == null) { + if (checkInterval_ != null) { + checkInterval_ = + com.google.protobuf.Duration.newBuilder(checkInterval_) + .mergeFrom(value) + .buildPartial(); + } else { + checkInterval_ = value; + } + onChanged(); + } else { + checkIntervalBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public Builder clearCheckInterval() { + if (checkIntervalBuilder_ == null) { + checkInterval_ = null; + onChanged(); + } else { + checkInterval_ = null; + checkIntervalBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public com.google.protobuf.Duration.Builder getCheckIntervalBuilder() { + + onChanged(); + return getCheckIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() { + if (checkIntervalBuilder_ != null) { + return checkIntervalBuilder_.getMessageOrBuilder(); + } else { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getCheckIntervalFieldBuilder() { + if (checkIntervalBuilder_ == null) { + checkIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getCheckInterval(), getParentForChildren(), isClean()); + checkInterval_ = null; + } + return checkIntervalBuilder_; + } + + private com.google.protobuf.Duration timeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeoutBuilder_; + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return timeoutBuilder_ != null || timeout_ != null; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return The timeout. + */ + public com.google.protobuf.Duration getTimeout() { + if (timeoutBuilder_ == null) { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } else { + return timeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public Builder setTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeout_ = value; + onChanged(); + } else { + timeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (timeoutBuilder_ == null) { + timeout_ = builderForValue.build(); + onChanged(); + } else { + timeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public Builder mergeTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (timeout_ != null) { + timeout_ = + com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial(); + } else { + timeout_ = value; + } + onChanged(); + } else { + timeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public Builder clearTimeout() { + if (timeoutBuilder_ == null) { + timeout_ = null; + onChanged(); + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public com.google.protobuf.Duration.Builder getTimeoutBuilder() { + + onChanged(); + return getTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + if (timeoutBuilder_ != null) { + return timeoutBuilder_.getMessageOrBuilder(); + } else { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeoutFieldBuilder() { + if (timeoutBuilder_ == null) { + timeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeout(), getParentForChildren(), isClean()); + timeout_ = null; + } + return timeoutBuilder_; + } + + private com.google.protobuf.Duration initialDelay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + initialDelayBuilder_; + /** + * + * + *
+     * The initial delay before starting to execute the checks.
+     * 
+ * + * .google.protobuf.Duration initial_delay = 7; + * + * @return Whether the initialDelay field is set. + */ + public boolean hasInitialDelay() { + return initialDelayBuilder_ != null || initialDelay_ != null; + } + /** + * + * + *
+     * The initial delay before starting to execute the checks.
+     * 
+ * + * .google.protobuf.Duration initial_delay = 7; + * + * @return The initialDelay. + */ + public com.google.protobuf.Duration getInitialDelay() { + if (initialDelayBuilder_ == null) { + return initialDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : initialDelay_; + } else { + return initialDelayBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The initial delay before starting to execute the checks.
+     * 
+ * + * .google.protobuf.Duration initial_delay = 7; + */ + public Builder setInitialDelay(com.google.protobuf.Duration value) { + if (initialDelayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + initialDelay_ = value; + onChanged(); + } else { + initialDelayBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The initial delay before starting to execute the checks.
+     * 
+ * + * .google.protobuf.Duration initial_delay = 7; + */ + public Builder setInitialDelay(com.google.protobuf.Duration.Builder builderForValue) { + if (initialDelayBuilder_ == null) { + initialDelay_ = builderForValue.build(); + onChanged(); + } else { + initialDelayBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The initial delay before starting to execute the checks.
+     * 
+ * + * .google.protobuf.Duration initial_delay = 7; + */ + public Builder mergeInitialDelay(com.google.protobuf.Duration value) { + if (initialDelayBuilder_ == null) { + if (initialDelay_ != null) { + initialDelay_ = + com.google.protobuf.Duration.newBuilder(initialDelay_) + .mergeFrom(value) + .buildPartial(); + } else { + initialDelay_ = value; + } + onChanged(); + } else { + initialDelayBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The initial delay before starting to execute the checks.
+     * 
+ * + * .google.protobuf.Duration initial_delay = 7; + */ + public Builder clearInitialDelay() { + if (initialDelayBuilder_ == null) { + initialDelay_ = null; + onChanged(); + } else { + initialDelay_ = null; + initialDelayBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The initial delay before starting to execute the checks.
+     * 
+ * + * .google.protobuf.Duration initial_delay = 7; + */ + public com.google.protobuf.Duration.Builder getInitialDelayBuilder() { + + onChanged(); + return getInitialDelayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The initial delay before starting to execute the checks.
+     * 
+ * + * .google.protobuf.Duration initial_delay = 7; + */ + public com.google.protobuf.DurationOrBuilder getInitialDelayOrBuilder() { + if (initialDelayBuilder_ != null) { + return initialDelayBuilder_.getMessageOrBuilder(); + } else { + return initialDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : initialDelay_; + } + } + /** + * + * + *
+     * The initial delay before starting to execute the checks.
+     * 
+ * + * .google.protobuf.Duration initial_delay = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getInitialDelayFieldBuilder() { + if (initialDelayBuilder_ == null) { + initialDelayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getInitialDelay(), getParentForChildren(), isClean()); + initialDelay_ = null; + } + return initialDelayBuilder_; + } + + @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.appengine.v1.LivenessCheck) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.LivenessCheck) + private static final com.google.appengine.v1.LivenessCheck DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.LivenessCheck(); + } + + public static com.google.appengine.v1.LivenessCheck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LivenessCheck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LivenessCheck(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.appengine.v1.LivenessCheck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LivenessCheckOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LivenessCheckOrBuilder.java new file mode 100644 index 00000000..c89b13e2 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LivenessCheckOrBuilder.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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface LivenessCheckOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.LivenessCheck) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The request path.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * The request path.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * Host header to send when performing a HTTP Liveness check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The host. + */ + java.lang.String getHost(); + /** + * + * + *
+   * Host header to send when performing a HTTP Liveness check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The bytes for host. + */ + com.google.protobuf.ByteString getHostBytes(); + + /** + * + * + *
+   * Number of consecutive failed checks required before considering the
+   * VM unhealthy.
+   * 
+ * + * uint32 failure_threshold = 3; + * + * @return The failureThreshold. + */ + int getFailureThreshold(); + + /** + * + * + *
+   * Number of consecutive successful checks required before considering
+   * the VM healthy.
+   * 
+ * + * uint32 success_threshold = 4; + * + * @return The successThreshold. + */ + int getSuccessThreshold(); + + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return Whether the checkInterval field is set. + */ + boolean hasCheckInterval(); + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return The checkInterval. + */ + com.google.protobuf.Duration getCheckInterval(); + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder(); + + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return The timeout. + */ + com.google.protobuf.Duration getTimeout(); + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); + + /** + * + * + *
+   * The initial delay before starting to execute the checks.
+   * 
+ * + * .google.protobuf.Duration initial_delay = 7; + * + * @return Whether the initialDelay field is set. + */ + boolean hasInitialDelay(); + /** + * + * + *
+   * The initial delay before starting to execute the checks.
+   * 
+ * + * .google.protobuf.Duration initial_delay = 7; + * + * @return The initialDelay. + */ + com.google.protobuf.Duration getInitialDelay(); + /** + * + * + *
+   * The initial delay before starting to execute the checks.
+   * 
+ * + * .google.protobuf.Duration initial_delay = 7; + */ + com.google.protobuf.DurationOrBuilder getInitialDelayOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationMetadata.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationMetadata.java new file mode 100644 index 00000000..3b0f6ca3 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationMetadata.java @@ -0,0 +1,739 @@ +/* + * 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/appengine/v1/location.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Metadata for the given [google.cloud.location.Location][google.cloud.location.Location].
+ * 
+ * + * Protobuf type {@code google.appengine.v1.LocationMetadata} + */ +public final class LocationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.LocationMetadata) + LocationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocationMetadata.newBuilder() to construct. + private LocationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LocationMetadata( + 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 16: + { + standardEnvironmentAvailable_ = input.readBool(); + break; + } + case 32: + { + flexibleEnvironmentAvailable_ = input.readBool(); + break; + } + case 48: + { + searchApiAvailable_ = input.readBool(); + 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.appengine.v1.LocationProto + .internal_static_google_appengine_v1_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.LocationProto + .internal_static_google_appengine_v1_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.LocationMetadata.class, + com.google.appengine.v1.LocationMetadata.Builder.class); + } + + public static final int STANDARD_ENVIRONMENT_AVAILABLE_FIELD_NUMBER = 2; + private boolean standardEnvironmentAvailable_; + /** + * + * + *
+   * App Engine standard environment is available in the given location.
+   * @OutputOnly
+   * 
+ * + * bool standard_environment_available = 2; + * + * @return The standardEnvironmentAvailable. + */ + @java.lang.Override + public boolean getStandardEnvironmentAvailable() { + return standardEnvironmentAvailable_; + } + + public static final int FLEXIBLE_ENVIRONMENT_AVAILABLE_FIELD_NUMBER = 4; + private boolean flexibleEnvironmentAvailable_; + /** + * + * + *
+   * App Engine flexible environment is available in the given location.
+   * @OutputOnly
+   * 
+ * + * bool flexible_environment_available = 4; + * + * @return The flexibleEnvironmentAvailable. + */ + @java.lang.Override + public boolean getFlexibleEnvironmentAvailable() { + return flexibleEnvironmentAvailable_; + } + + public static final int SEARCH_API_AVAILABLE_FIELD_NUMBER = 6; + private boolean searchApiAvailable_; + /** + * + * + *
+   * Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search)
+   * is available in the given location.
+   * 
+ * + * bool search_api_available = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The searchApiAvailable. + */ + @java.lang.Override + public boolean getSearchApiAvailable() { + return searchApiAvailable_; + } + + 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 (standardEnvironmentAvailable_ != false) { + output.writeBool(2, standardEnvironmentAvailable_); + } + if (flexibleEnvironmentAvailable_ != false) { + output.writeBool(4, flexibleEnvironmentAvailable_); + } + if (searchApiAvailable_ != false) { + output.writeBool(6, searchApiAvailable_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (standardEnvironmentAvailable_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, standardEnvironmentAvailable_); + } + if (flexibleEnvironmentAvailable_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(4, flexibleEnvironmentAvailable_); + } + if (searchApiAvailable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, searchApiAvailable_); + } + 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.appengine.v1.LocationMetadata)) { + return super.equals(obj); + } + com.google.appengine.v1.LocationMetadata other = (com.google.appengine.v1.LocationMetadata) obj; + + if (getStandardEnvironmentAvailable() != other.getStandardEnvironmentAvailable()) return false; + if (getFlexibleEnvironmentAvailable() != other.getFlexibleEnvironmentAvailable()) return false; + if (getSearchApiAvailable() != other.getSearchApiAvailable()) 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) + STANDARD_ENVIRONMENT_AVAILABLE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStandardEnvironmentAvailable()); + hash = (37 * hash) + FLEXIBLE_ENVIRONMENT_AVAILABLE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFlexibleEnvironmentAvailable()); + hash = (37 * hash) + SEARCH_API_AVAILABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSearchApiAvailable()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.LocationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.LocationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.LocationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.LocationMetadata 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.appengine.v1.LocationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.LocationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.LocationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.LocationMetadata 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.appengine.v1.LocationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.LocationMetadata 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.appengine.v1.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.LocationMetadata 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.appengine.v1.LocationMetadata 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 for the given [google.cloud.location.Location][google.cloud.location.Location].
+   * 
+ * + * Protobuf type {@code google.appengine.v1.LocationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.LocationMetadata) + com.google.appengine.v1.LocationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.LocationProto + .internal_static_google_appengine_v1_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.LocationProto + .internal_static_google_appengine_v1_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.LocationMetadata.class, + com.google.appengine.v1.LocationMetadata.Builder.class); + } + + // Construct using com.google.appengine.v1.LocationMetadata.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(); + standardEnvironmentAvailable_ = false; + + flexibleEnvironmentAvailable_ = false; + + searchApiAvailable_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.LocationProto + .internal_static_google_appengine_v1_LocationMetadata_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.LocationMetadata getDefaultInstanceForType() { + return com.google.appengine.v1.LocationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.LocationMetadata build() { + com.google.appengine.v1.LocationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.LocationMetadata buildPartial() { + com.google.appengine.v1.LocationMetadata result = + new com.google.appengine.v1.LocationMetadata(this); + result.standardEnvironmentAvailable_ = standardEnvironmentAvailable_; + result.flexibleEnvironmentAvailable_ = flexibleEnvironmentAvailable_; + result.searchApiAvailable_ = searchApiAvailable_; + 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.appengine.v1.LocationMetadata) { + return mergeFrom((com.google.appengine.v1.LocationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.LocationMetadata other) { + if (other == com.google.appengine.v1.LocationMetadata.getDefaultInstance()) return this; + if (other.getStandardEnvironmentAvailable() != false) { + setStandardEnvironmentAvailable(other.getStandardEnvironmentAvailable()); + } + if (other.getFlexibleEnvironmentAvailable() != false) { + setFlexibleEnvironmentAvailable(other.getFlexibleEnvironmentAvailable()); + } + if (other.getSearchApiAvailable() != false) { + setSearchApiAvailable(other.getSearchApiAvailable()); + } + 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.appengine.v1.LocationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.LocationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean standardEnvironmentAvailable_; + /** + * + * + *
+     * App Engine standard environment is available in the given location.
+     * @OutputOnly
+     * 
+ * + * bool standard_environment_available = 2; + * + * @return The standardEnvironmentAvailable. + */ + @java.lang.Override + public boolean getStandardEnvironmentAvailable() { + return standardEnvironmentAvailable_; + } + /** + * + * + *
+     * App Engine standard environment is available in the given location.
+     * @OutputOnly
+     * 
+ * + * bool standard_environment_available = 2; + * + * @param value The standardEnvironmentAvailable to set. + * @return This builder for chaining. + */ + public Builder setStandardEnvironmentAvailable(boolean value) { + + standardEnvironmentAvailable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * App Engine standard environment is available in the given location.
+     * @OutputOnly
+     * 
+ * + * bool standard_environment_available = 2; + * + * @return This builder for chaining. + */ + public Builder clearStandardEnvironmentAvailable() { + + standardEnvironmentAvailable_ = false; + onChanged(); + return this; + } + + private boolean flexibleEnvironmentAvailable_; + /** + * + * + *
+     * App Engine flexible environment is available in the given location.
+     * @OutputOnly
+     * 
+ * + * bool flexible_environment_available = 4; + * + * @return The flexibleEnvironmentAvailable. + */ + @java.lang.Override + public boolean getFlexibleEnvironmentAvailable() { + return flexibleEnvironmentAvailable_; + } + /** + * + * + *
+     * App Engine flexible environment is available in the given location.
+     * @OutputOnly
+     * 
+ * + * bool flexible_environment_available = 4; + * + * @param value The flexibleEnvironmentAvailable to set. + * @return This builder for chaining. + */ + public Builder setFlexibleEnvironmentAvailable(boolean value) { + + flexibleEnvironmentAvailable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * App Engine flexible environment is available in the given location.
+     * @OutputOnly
+     * 
+ * + * bool flexible_environment_available = 4; + * + * @return This builder for chaining. + */ + public Builder clearFlexibleEnvironmentAvailable() { + + flexibleEnvironmentAvailable_ = false; + onChanged(); + return this; + } + + private boolean searchApiAvailable_; + /** + * + * + *
+     * Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search)
+     * is available in the given location.
+     * 
+ * + * bool search_api_available = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The searchApiAvailable. + */ + @java.lang.Override + public boolean getSearchApiAvailable() { + return searchApiAvailable_; + } + /** + * + * + *
+     * Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search)
+     * is available in the given location.
+     * 
+ * + * bool search_api_available = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The searchApiAvailable to set. + * @return This builder for chaining. + */ + public Builder setSearchApiAvailable(boolean value) { + + searchApiAvailable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search)
+     * is available in the given location.
+     * 
+ * + * bool search_api_available = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSearchApiAvailable() { + + searchApiAvailable_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.appengine.v1.LocationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.LocationMetadata) + private static final com.google.appengine.v1.LocationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.LocationMetadata(); + } + + public static com.google.appengine.v1.LocationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocationMetadata(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.appengine.v1.LocationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationMetadataOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationMetadataOrBuilder.java new file mode 100644 index 00000000..8375f5df --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationMetadataOrBuilder.java @@ -0,0 +1,67 @@ +/* + * 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/appengine/v1/location.proto + +package com.google.appengine.v1; + +public interface LocationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.LocationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * App Engine standard environment is available in the given location.
+   * @OutputOnly
+   * 
+ * + * bool standard_environment_available = 2; + * + * @return The standardEnvironmentAvailable. + */ + boolean getStandardEnvironmentAvailable(); + + /** + * + * + *
+   * App Engine flexible environment is available in the given location.
+   * @OutputOnly
+   * 
+ * + * bool flexible_environment_available = 4; + * + * @return The flexibleEnvironmentAvailable. + */ + boolean getFlexibleEnvironmentAvailable(); + + /** + * + * + *
+   * Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search)
+   * is available in the given location.
+   * 
+ * + * bool search_api_available = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The searchApiAvailable. + */ + boolean getSearchApiAvailable(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationProto.java new file mode 100644 index 00000000..e2d5c2e6 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/LocationProto.java @@ -0,0 +1,81 @@ +/* + * 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/appengine/v1/location.proto + +package com.google.appengine.v1; + +public final class LocationProto { + private LocationProto() {} + + 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_appengine_v1_LocationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_LocationMetadata_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/appengine/v1/location.proto\022\023go" + + "ogle.appengine.v1\032\037google/api/field_beha" + + "vior.proto\032\034google/api/annotations.proto" + + "\"\205\001\n\020LocationMetadata\022&\n\036standard_enviro" + + "nment_available\030\002 \001(\010\022&\n\036flexible_enviro" + + "nment_available\030\004 \001(\010\022!\n\024search_api_avai" + + "lable\030\006 \001(\010B\003\340A\003B\277\001\n\027com.google.appengin" + + "e.v1B\rLocationProtoP\001Z + * Methods to restrict access to a URL based on login status. + * + * + * Protobuf enum {@code google.appengine.v1.LoginRequirement} + */ +public enum LoginRequirement implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified. `LOGIN_OPTIONAL` is assumed.
+   * 
+ * + * LOGIN_UNSPECIFIED = 0; + */ + LOGIN_UNSPECIFIED(0), + /** + * + * + *
+   * Does not require that the user is signed in.
+   * 
+ * + * LOGIN_OPTIONAL = 1; + */ + LOGIN_OPTIONAL(1), + /** + * + * + *
+   * If the user is not signed in, the `auth_fail_action` is taken.
+   * In addition, if the user is not an administrator for the
+   * application, they are given an error message regardless of
+   * `auth_fail_action`. If the user is an administrator, the handler
+   * proceeds.
+   * 
+ * + * LOGIN_ADMIN = 2; + */ + LOGIN_ADMIN(2), + /** + * + * + *
+   * If the user has signed in, the handler proceeds normally. Otherwise, the
+   * auth_fail_action is taken.
+   * 
+ * + * LOGIN_REQUIRED = 3; + */ + LOGIN_REQUIRED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified. `LOGIN_OPTIONAL` is assumed.
+   * 
+ * + * LOGIN_UNSPECIFIED = 0; + */ + public static final int LOGIN_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Does not require that the user is signed in.
+   * 
+ * + * LOGIN_OPTIONAL = 1; + */ + public static final int LOGIN_OPTIONAL_VALUE = 1; + /** + * + * + *
+   * If the user is not signed in, the `auth_fail_action` is taken.
+   * In addition, if the user is not an administrator for the
+   * application, they are given an error message regardless of
+   * `auth_fail_action`. If the user is an administrator, the handler
+   * proceeds.
+   * 
+ * + * LOGIN_ADMIN = 2; + */ + public static final int LOGIN_ADMIN_VALUE = 2; + /** + * + * + *
+   * If the user has signed in, the handler proceeds normally. Otherwise, the
+   * auth_fail_action is taken.
+   * 
+ * + * LOGIN_REQUIRED = 3; + */ + public static final int LOGIN_REQUIRED_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 LoginRequirement 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 LoginRequirement forNumber(int value) { + switch (value) { + case 0: + return LOGIN_UNSPECIFIED; + case 1: + return LOGIN_OPTIONAL; + case 2: + return LOGIN_ADMIN; + case 3: + return LOGIN_REQUIRED; + 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 LoginRequirement findValueByNumber(int number) { + return LoginRequirement.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.appengine.v1.AppYamlProto.getDescriptor().getEnumTypes().get(1); + } + + private static final LoginRequirement[] VALUES = values(); + + public static LoginRequirement 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 LoginRequirement(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.LoginRequirement) +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagedCertificate.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagedCertificate.java new file mode 100644 index 00000000..cb4babbc --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagedCertificate.java @@ -0,0 +1,933 @@ +/* + * 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/appengine/v1/certificate.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * A certificate managed by App Engine.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ManagedCertificate} + */ +public final class ManagedCertificate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ManagedCertificate) + ManagedCertificateOrBuilder { + private static final long serialVersionUID = 0L; + // Use ManagedCertificate.newBuilder() to construct. + private ManagedCertificate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ManagedCertificate() { + status_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ManagedCertificate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ManagedCertificate( + 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 (lastRenewalTime_ != null) { + subBuilder = lastRenewalTime_.toBuilder(); + } + lastRenewalTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastRenewalTime_); + lastRenewalTime_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + int rawValue = input.readEnum(); + + status_ = 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.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_ManagedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_ManagedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ManagedCertificate.class, + com.google.appengine.v1.ManagedCertificate.Builder.class); + } + + public static final int LAST_RENEWAL_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp lastRenewalTime_; + /** + * + * + *
+   * Time at which the certificate was last renewed. The renewal process is
+   * fully managed. Certificate renewal will automatically occur before the
+   * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + * + * @return Whether the lastRenewalTime field is set. + */ + @java.lang.Override + public boolean hasLastRenewalTime() { + return lastRenewalTime_ != null; + } + /** + * + * + *
+   * Time at which the certificate was last renewed. The renewal process is
+   * fully managed. Certificate renewal will automatically occur before the
+   * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + * + * @return The lastRenewalTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastRenewalTime() { + return lastRenewalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastRenewalTime_; + } + /** + * + * + *
+   * Time at which the certificate was last renewed. The renewal process is
+   * fully managed. Certificate renewal will automatically occur before the
+   * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastRenewalTimeOrBuilder() { + return getLastRenewalTime(); + } + + public static final int STATUS_FIELD_NUMBER = 2; + private int status_; + /** + * + * + *
+   * Status of certificate management. Refers to the most recent certificate
+   * acquisition or renewal attempt.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagementStatus status = 2; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+   * Status of certificate management. Refers to the most recent certificate
+   * acquisition or renewal attempt.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagementStatus status = 2; + * + * @return The status. + */ + @java.lang.Override + public com.google.appengine.v1.ManagementStatus getStatus() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.ManagementStatus result = + com.google.appengine.v1.ManagementStatus.valueOf(status_); + return result == null ? com.google.appengine.v1.ManagementStatus.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 (lastRenewalTime_ != null) { + output.writeMessage(1, getLastRenewalTime()); + } + if (status_ + != com.google.appengine.v1.ManagementStatus.MANAGEMENT_STATUS_UNSPECIFIED.getNumber()) { + output.writeEnum(2, status_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lastRenewalTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLastRenewalTime()); + } + if (status_ + != com.google.appengine.v1.ManagementStatus.MANAGEMENT_STATUS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, status_); + } + 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.appengine.v1.ManagedCertificate)) { + return super.equals(obj); + } + com.google.appengine.v1.ManagedCertificate other = + (com.google.appengine.v1.ManagedCertificate) obj; + + if (hasLastRenewalTime() != other.hasLastRenewalTime()) return false; + if (hasLastRenewalTime()) { + if (!getLastRenewalTime().equals(other.getLastRenewalTime())) return false; + } + if (status_ != other.status_) 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 (hasLastRenewalTime()) { + hash = (37 * hash) + LAST_RENEWAL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastRenewalTime().hashCode(); + } + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ManagedCertificate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ManagedCertificate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ManagedCertificate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ManagedCertificate 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.appengine.v1.ManagedCertificate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ManagedCertificate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ManagedCertificate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ManagedCertificate 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.appengine.v1.ManagedCertificate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ManagedCertificate 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.appengine.v1.ManagedCertificate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ManagedCertificate 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.appengine.v1.ManagedCertificate 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 certificate managed by App Engine.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ManagedCertificate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ManagedCertificate) + com.google.appengine.v1.ManagedCertificateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_ManagedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_ManagedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ManagedCertificate.class, + com.google.appengine.v1.ManagedCertificate.Builder.class); + } + + // Construct using com.google.appengine.v1.ManagedCertificate.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 (lastRenewalTimeBuilder_ == null) { + lastRenewalTime_ = null; + } else { + lastRenewalTime_ = null; + lastRenewalTimeBuilder_ = null; + } + status_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.CertificateProto + .internal_static_google_appengine_v1_ManagedCertificate_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ManagedCertificate getDefaultInstanceForType() { + return com.google.appengine.v1.ManagedCertificate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ManagedCertificate build() { + com.google.appengine.v1.ManagedCertificate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ManagedCertificate buildPartial() { + com.google.appengine.v1.ManagedCertificate result = + new com.google.appengine.v1.ManagedCertificate(this); + if (lastRenewalTimeBuilder_ == null) { + result.lastRenewalTime_ = lastRenewalTime_; + } else { + result.lastRenewalTime_ = lastRenewalTimeBuilder_.build(); + } + result.status_ = status_; + 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.appengine.v1.ManagedCertificate) { + return mergeFrom((com.google.appengine.v1.ManagedCertificate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ManagedCertificate other) { + if (other == com.google.appengine.v1.ManagedCertificate.getDefaultInstance()) return this; + if (other.hasLastRenewalTime()) { + mergeLastRenewalTime(other.getLastRenewalTime()); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + 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.appengine.v1.ManagedCertificate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ManagedCertificate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp lastRenewalTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastRenewalTimeBuilder_; + /** + * + * + *
+     * Time at which the certificate was last renewed. The renewal process is
+     * fully managed. Certificate renewal will automatically occur before the
+     * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + * + * @return Whether the lastRenewalTime field is set. + */ + public boolean hasLastRenewalTime() { + return lastRenewalTimeBuilder_ != null || lastRenewalTime_ != null; + } + /** + * + * + *
+     * Time at which the certificate was last renewed. The renewal process is
+     * fully managed. Certificate renewal will automatically occur before the
+     * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + * + * @return The lastRenewalTime. + */ + public com.google.protobuf.Timestamp getLastRenewalTime() { + if (lastRenewalTimeBuilder_ == null) { + return lastRenewalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastRenewalTime_; + } else { + return lastRenewalTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time at which the certificate was last renewed. The renewal process is
+     * fully managed. Certificate renewal will automatically occur before the
+     * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + */ + public Builder setLastRenewalTime(com.google.protobuf.Timestamp value) { + if (lastRenewalTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastRenewalTime_ = value; + onChanged(); + } else { + lastRenewalTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time at which the certificate was last renewed. The renewal process is
+     * fully managed. Certificate renewal will automatically occur before the
+     * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + */ + public Builder setLastRenewalTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastRenewalTimeBuilder_ == null) { + lastRenewalTime_ = builderForValue.build(); + onChanged(); + } else { + lastRenewalTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time at which the certificate was last renewed. The renewal process is
+     * fully managed. Certificate renewal will automatically occur before the
+     * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + */ + public Builder mergeLastRenewalTime(com.google.protobuf.Timestamp value) { + if (lastRenewalTimeBuilder_ == null) { + if (lastRenewalTime_ != null) { + lastRenewalTime_ = + com.google.protobuf.Timestamp.newBuilder(lastRenewalTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastRenewalTime_ = value; + } + onChanged(); + } else { + lastRenewalTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time at which the certificate was last renewed. The renewal process is
+     * fully managed. Certificate renewal will automatically occur before the
+     * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + */ + public Builder clearLastRenewalTime() { + if (lastRenewalTimeBuilder_ == null) { + lastRenewalTime_ = null; + onChanged(); + } else { + lastRenewalTime_ = null; + lastRenewalTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time at which the certificate was last renewed. The renewal process is
+     * fully managed. Certificate renewal will automatically occur before the
+     * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getLastRenewalTimeBuilder() { + + onChanged(); + return getLastRenewalTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time at which the certificate was last renewed. The renewal process is
+     * fully managed. Certificate renewal will automatically occur before the
+     * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getLastRenewalTimeOrBuilder() { + if (lastRenewalTimeBuilder_ != null) { + return lastRenewalTimeBuilder_.getMessageOrBuilder(); + } else { + return lastRenewalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastRenewalTime_; + } + } + /** + * + * + *
+     * Time at which the certificate was last renewed. The renewal process is
+     * fully managed. Certificate renewal will automatically occur before the
+     * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastRenewalTimeFieldBuilder() { + if (lastRenewalTimeBuilder_ == null) { + lastRenewalTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastRenewalTime(), getParentForChildren(), isClean()); + lastRenewalTime_ = null; + } + return lastRenewalTimeBuilder_; + } + + private int status_ = 0; + /** + * + * + *
+     * Status of certificate management. Refers to the most recent certificate
+     * acquisition or renewal attempt.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagementStatus status = 2; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+     * Status of certificate management. Refers to the most recent certificate
+     * acquisition or renewal attempt.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagementStatus status = 2; + * + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Status of certificate management. Refers to the most recent certificate
+     * acquisition or renewal attempt.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagementStatus status = 2; + * + * @return The status. + */ + @java.lang.Override + public com.google.appengine.v1.ManagementStatus getStatus() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.ManagementStatus result = + com.google.appengine.v1.ManagementStatus.valueOf(status_); + return result == null ? com.google.appengine.v1.ManagementStatus.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Status of certificate management. Refers to the most recent certificate
+     * acquisition or renewal attempt.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagementStatus status = 2; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(com.google.appengine.v1.ManagementStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Status of certificate management. Refers to the most recent certificate
+     * acquisition or renewal attempt.
+     * @OutputOnly
+     * 
+ * + * .google.appengine.v1.ManagementStatus status = 2; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 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.appengine.v1.ManagedCertificate) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ManagedCertificate) + private static final com.google.appengine.v1.ManagedCertificate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ManagedCertificate(); + } + + public static com.google.appengine.v1.ManagedCertificate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ManagedCertificate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ManagedCertificate(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.appengine.v1.ManagedCertificate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagedCertificateOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagedCertificateOrBuilder.java new file mode 100644 index 00000000..fb2ba098 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagedCertificateOrBuilder.java @@ -0,0 +1,98 @@ +/* + * 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/appengine/v1/certificate.proto + +package com.google.appengine.v1; + +public interface ManagedCertificateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ManagedCertificate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Time at which the certificate was last renewed. The renewal process is
+   * fully managed. Certificate renewal will automatically occur before the
+   * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + * + * @return Whether the lastRenewalTime field is set. + */ + boolean hasLastRenewalTime(); + /** + * + * + *
+   * Time at which the certificate was last renewed. The renewal process is
+   * fully managed. Certificate renewal will automatically occur before the
+   * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + * + * @return The lastRenewalTime. + */ + com.google.protobuf.Timestamp getLastRenewalTime(); + /** + * + * + *
+   * Time at which the certificate was last renewed. The renewal process is
+   * fully managed. Certificate renewal will automatically occur before the
+   * certificate expires. Renewal errors can be tracked via `ManagementStatus`.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp last_renewal_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getLastRenewalTimeOrBuilder(); + + /** + * + * + *
+   * Status of certificate management. Refers to the most recent certificate
+   * acquisition or renewal attempt.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagementStatus status = 2; + * + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * + * + *
+   * Status of certificate management. Refers to the most recent certificate
+   * acquisition or renewal attempt.
+   * @OutputOnly
+   * 
+ * + * .google.appengine.v1.ManagementStatus status = 2; + * + * @return The status. + */ + com.google.appengine.v1.ManagementStatus getStatus(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagementStatus.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagementStatus.java new file mode 100644 index 00000000..2f702923 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManagementStatus.java @@ -0,0 +1,275 @@ +/* + * 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/appengine/v1/certificate.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * State of certificate management. Refers to the most recent certificate
+ * acquisition or renewal attempt.
+ * 
+ * + * Protobuf enum {@code google.appengine.v1.ManagementStatus} + */ +public enum ManagementStatus implements com.google.protobuf.ProtocolMessageEnum { + /** MANAGEMENT_STATUS_UNSPECIFIED = 0; */ + MANAGEMENT_STATUS_UNSPECIFIED(0), + /** + * + * + *
+   * Certificate was successfully obtained and inserted into the serving
+   * system.
+   * 
+ * + * OK = 1; + */ + OK(1), + /** + * + * + *
+   * Certificate is under active attempts to acquire or renew.
+   * 
+ * + * PENDING = 2; + */ + PENDING(2), + /** + * + * + *
+   * Most recent renewal failed due to an invalid DNS setup and will be
+   * retried. Renewal attempts will continue to fail until the certificate
+   * domain's DNS configuration is fixed. The last successfully provisioned
+   * certificate may still be serving.
+   * 
+ * + * FAILED_RETRYING_NOT_VISIBLE = 4; + */ + FAILED_RETRYING_NOT_VISIBLE(4), + /** + * + * + *
+   * All renewal attempts have been exhausted, likely due to an invalid DNS
+   * setup.
+   * 
+ * + * FAILED_PERMANENT = 6; + */ + FAILED_PERMANENT(6), + /** + * + * + *
+   * Most recent renewal failed due to an explicit CAA record that does not
+   * include one of the in-use CAs (Google CA and Let's Encrypt). Renewals will
+   * continue to fail until the CAA is reconfigured. The last successfully
+   * provisioned certificate may still be serving.
+   * 
+ * + * FAILED_RETRYING_CAA_FORBIDDEN = 7; + */ + FAILED_RETRYING_CAA_FORBIDDEN(7), + /** + * + * + *
+   * Most recent renewal failed due to a CAA retrieval failure. This means that
+   * the domain's DNS provider does not properly handle CAA records, failing
+   * requests for CAA records when no CAA records are defined. Renewals will
+   * continue to fail until the DNS provider is changed or a CAA record is
+   * added for the given domain. The last successfully provisioned certificate
+   * may still be serving.
+   * 
+ * + * FAILED_RETRYING_CAA_CHECKING = 8; + */ + FAILED_RETRYING_CAA_CHECKING(8), + UNRECOGNIZED(-1), + ; + + /** MANAGEMENT_STATUS_UNSPECIFIED = 0; */ + public static final int MANAGEMENT_STATUS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Certificate was successfully obtained and inserted into the serving
+   * system.
+   * 
+ * + * OK = 1; + */ + public static final int OK_VALUE = 1; + /** + * + * + *
+   * Certificate is under active attempts to acquire or renew.
+   * 
+ * + * PENDING = 2; + */ + public static final int PENDING_VALUE = 2; + /** + * + * + *
+   * Most recent renewal failed due to an invalid DNS setup and will be
+   * retried. Renewal attempts will continue to fail until the certificate
+   * domain's DNS configuration is fixed. The last successfully provisioned
+   * certificate may still be serving.
+   * 
+ * + * FAILED_RETRYING_NOT_VISIBLE = 4; + */ + public static final int FAILED_RETRYING_NOT_VISIBLE_VALUE = 4; + /** + * + * + *
+   * All renewal attempts have been exhausted, likely due to an invalid DNS
+   * setup.
+   * 
+ * + * FAILED_PERMANENT = 6; + */ + public static final int FAILED_PERMANENT_VALUE = 6; + /** + * + * + *
+   * Most recent renewal failed due to an explicit CAA record that does not
+   * include one of the in-use CAs (Google CA and Let's Encrypt). Renewals will
+   * continue to fail until the CAA is reconfigured. The last successfully
+   * provisioned certificate may still be serving.
+   * 
+ * + * FAILED_RETRYING_CAA_FORBIDDEN = 7; + */ + public static final int FAILED_RETRYING_CAA_FORBIDDEN_VALUE = 7; + /** + * + * + *
+   * Most recent renewal failed due to a CAA retrieval failure. This means that
+   * the domain's DNS provider does not properly handle CAA records, failing
+   * requests for CAA records when no CAA records are defined. Renewals will
+   * continue to fail until the DNS provider is changed or a CAA record is
+   * added for the given domain. The last successfully provisioned certificate
+   * may still be serving.
+   * 
+ * + * FAILED_RETRYING_CAA_CHECKING = 8; + */ + public static final int FAILED_RETRYING_CAA_CHECKING_VALUE = 8; + + 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 ManagementStatus 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 ManagementStatus forNumber(int value) { + switch (value) { + case 0: + return MANAGEMENT_STATUS_UNSPECIFIED; + case 1: + return OK; + case 2: + return PENDING; + case 4: + return FAILED_RETRYING_NOT_VISIBLE; + case 6: + return FAILED_PERMANENT; + case 7: + return FAILED_RETRYING_CAA_FORBIDDEN; + case 8: + return FAILED_RETRYING_CAA_CHECKING; + 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 ManagementStatus findValueByNumber(int number) { + return ManagementStatus.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.appengine.v1.CertificateProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ManagementStatus[] VALUES = values(); + + public static ManagementStatus 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 ManagementStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.ManagementStatus) +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManualScaling.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManualScaling.java new file mode 100644 index 00000000..ff7d791d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManualScaling.java @@ -0,0 +1,556 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * A service with manual scaling runs continuously, allowing you to perform
+ * complex initialization and rely on the state of its memory over time.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ManualScaling} + */ +public final class ManualScaling extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ManualScaling) + ManualScalingOrBuilder { + private static final long serialVersionUID = 0L; + // Use ManualScaling.newBuilder() to construct. + private ManualScaling(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ManualScaling() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ManualScaling(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ManualScaling( + 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: + { + instances_ = input.readInt32(); + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_ManualScaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_ManualScaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ManualScaling.class, + com.google.appengine.v1.ManualScaling.Builder.class); + } + + public static final int INSTANCES_FIELD_NUMBER = 1; + private int instances_; + /** + * + * + *
+   * Number of instances to assign to the service at the start. This number
+   * can later be altered by using the
+   * [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions)
+   * `set_num_instances()` function.
+   * 
+ * + * int32 instances = 1; + * + * @return The instances. + */ + @java.lang.Override + public int getInstances() { + return instances_; + } + + 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 (instances_ != 0) { + output.writeInt32(1, instances_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instances_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, instances_); + } + 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.appengine.v1.ManualScaling)) { + return super.equals(obj); + } + com.google.appengine.v1.ManualScaling other = (com.google.appengine.v1.ManualScaling) obj; + + if (getInstances() != other.getInstances()) 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) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstances(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ManualScaling parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ManualScaling parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ManualScaling parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ManualScaling 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.appengine.v1.ManualScaling parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ManualScaling parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ManualScaling parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ManualScaling 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.appengine.v1.ManualScaling parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ManualScaling 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.appengine.v1.ManualScaling parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ManualScaling 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.appengine.v1.ManualScaling 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 service with manual scaling runs continuously, allowing you to perform
+   * complex initialization and rely on the state of its memory over time.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ManualScaling} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ManualScaling) + com.google.appengine.v1.ManualScalingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_ManualScaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_ManualScaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ManualScaling.class, + com.google.appengine.v1.ManualScaling.Builder.class); + } + + // Construct using com.google.appengine.v1.ManualScaling.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(); + instances_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_ManualScaling_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ManualScaling getDefaultInstanceForType() { + return com.google.appengine.v1.ManualScaling.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ManualScaling build() { + com.google.appengine.v1.ManualScaling result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ManualScaling buildPartial() { + com.google.appengine.v1.ManualScaling result = + new com.google.appengine.v1.ManualScaling(this); + result.instances_ = instances_; + 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.appengine.v1.ManualScaling) { + return mergeFrom((com.google.appengine.v1.ManualScaling) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ManualScaling other) { + if (other == com.google.appengine.v1.ManualScaling.getDefaultInstance()) return this; + if (other.getInstances() != 0) { + setInstances(other.getInstances()); + } + 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.appengine.v1.ManualScaling parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ManualScaling) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int instances_; + /** + * + * + *
+     * Number of instances to assign to the service at the start. This number
+     * can later be altered by using the
+     * [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions)
+     * `set_num_instances()` function.
+     * 
+ * + * int32 instances = 1; + * + * @return The instances. + */ + @java.lang.Override + public int getInstances() { + return instances_; + } + /** + * + * + *
+     * Number of instances to assign to the service at the start. This number
+     * can later be altered by using the
+     * [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions)
+     * `set_num_instances()` function.
+     * 
+ * + * int32 instances = 1; + * + * @param value The instances to set. + * @return This builder for chaining. + */ + public Builder setInstances(int value) { + + instances_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of instances to assign to the service at the start. This number
+     * can later be altered by using the
+     * [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions)
+     * `set_num_instances()` function.
+     * 
+ * + * int32 instances = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstances() { + + instances_ = 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.appengine.v1.ManualScaling) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ManualScaling) + private static final com.google.appengine.v1.ManualScaling DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ManualScaling(); + } + + public static com.google.appengine.v1.ManualScaling getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ManualScaling parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ManualScaling(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.appengine.v1.ManualScaling getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManualScalingOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManualScalingOrBuilder.java new file mode 100644 index 00000000..2a8a9460 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ManualScalingOrBuilder.java @@ -0,0 +1,41 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface ManualScalingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ManualScaling) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Number of instances to assign to the service at the start. This number
+   * can later be altered by using the
+   * [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions)
+   * `set_num_instances()` function.
+   * 
+ * + * int32 instances = 1; + * + * @return The instances. + */ + int getInstances(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Network.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Network.java new file mode 100644 index 00000000..4d4782fe --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Network.java @@ -0,0 +1,1508 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Extra network settings.
+ * Only applicable in the App Engine flexible environment.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.Network} + */ +public final class Network extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Network) + NetworkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Network.newBuilder() to construct. + private Network(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Network() { + forwardedPorts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + instanceTag_ = ""; + name_ = ""; + subnetworkName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Network(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Network( + 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(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + forwardedPorts_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + forwardedPorts_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instanceTag_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnetworkName_ = s; + break; + } + case 40: + { + sessionAffinity_ = input.readBool(); + 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)) { + forwardedPorts_ = forwardedPorts_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Network_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Network_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Network.class, com.google.appengine.v1.Network.Builder.class); + } + + public static final int FORWARDED_PORTS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList forwardedPorts_; + /** + * + * + *
+   * List of ports, or port pairs, to forward from the virtual machine to the
+   * application container.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * repeated string forwarded_ports = 1; + * + * @return A list containing the forwardedPorts. + */ + public com.google.protobuf.ProtocolStringList getForwardedPortsList() { + return forwardedPorts_; + } + /** + * + * + *
+   * List of ports, or port pairs, to forward from the virtual machine to the
+   * application container.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * repeated string forwarded_ports = 1; + * + * @return The count of forwardedPorts. + */ + public int getForwardedPortsCount() { + return forwardedPorts_.size(); + } + /** + * + * + *
+   * List of ports, or port pairs, to forward from the virtual machine to the
+   * application container.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * repeated string forwarded_ports = 1; + * + * @param index The index of the element to return. + * @return The forwardedPorts at the given index. + */ + public java.lang.String getForwardedPorts(int index) { + return forwardedPorts_.get(index); + } + /** + * + * + *
+   * List of ports, or port pairs, to forward from the virtual machine to the
+   * application container.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * repeated string forwarded_ports = 1; + * + * @param index The index of the value to return. + * @return The bytes of the forwardedPorts at the given index. + */ + public com.google.protobuf.ByteString getForwardedPortsBytes(int index) { + return forwardedPorts_.getByteString(index); + } + + public static final int INSTANCE_TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object instanceTag_; + /** + * + * + *
+   * Tag to apply to the instance during creation.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * string instance_tag = 2; + * + * @return The instanceTag. + */ + @java.lang.Override + public java.lang.String getInstanceTag() { + java.lang.Object ref = instanceTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceTag_ = s; + return s; + } + } + /** + * + * + *
+   * Tag to apply to the instance during creation.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * string instance_tag = 2; + * + * @return The bytes for instanceTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceTagBytes() { + java.lang.Object ref = instanceTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Google Compute Engine network where the virtual machines are created.
+   * Specify the short name, not the resource path.
+   * Defaults to `default`.
+   * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+   * Google Compute Engine network where the virtual machines are created.
+   * Specify the short name, not the resource path.
+   * Defaults to `default`.
+   * 
+ * + * string name = 3; + * + * @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 SUBNETWORK_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object subnetworkName_; + /** + * + * + *
+   * Google Cloud Platform sub-network where the virtual machines are created.
+   * Specify the short name, not the resource path.
+   * If a subnetwork name is specified, a network name will also be required
+   * unless it is for the default network.
+   * * If the network that the instance is being created in is a Legacy network,
+   * then the IP address is allocated from the IPv4Range.
+   * * If the network that the instance is being created in is an auto Subnet
+   * Mode Network, then only network name should be specified (not the
+   * subnetwork_name) and the IP address is created from the IPCidrRange of the
+   * subnetwork that exists in that zone for that network.
+   * * If the network that the instance is being created in is a custom Subnet
+   * Mode Network, then the subnetwork_name must be specified and the
+   * IP address is created from the IPCidrRange of the subnetwork.
+   * If specified, the subnetwork must exist in the same region as the
+   * App Engine flexible environment application.
+   * 
+ * + * string subnetwork_name = 4; + * + * @return The subnetworkName. + */ + @java.lang.Override + public java.lang.String getSubnetworkName() { + java.lang.Object ref = subnetworkName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetworkName_ = s; + return s; + } + } + /** + * + * + *
+   * Google Cloud Platform sub-network where the virtual machines are created.
+   * Specify the short name, not the resource path.
+   * If a subnetwork name is specified, a network name will also be required
+   * unless it is for the default network.
+   * * If the network that the instance is being created in is a Legacy network,
+   * then the IP address is allocated from the IPv4Range.
+   * * If the network that the instance is being created in is an auto Subnet
+   * Mode Network, then only network name should be specified (not the
+   * subnetwork_name) and the IP address is created from the IPCidrRange of the
+   * subnetwork that exists in that zone for that network.
+   * * If the network that the instance is being created in is a custom Subnet
+   * Mode Network, then the subnetwork_name must be specified and the
+   * IP address is created from the IPCidrRange of the subnetwork.
+   * If specified, the subnetwork must exist in the same region as the
+   * App Engine flexible environment application.
+   * 
+ * + * string subnetwork_name = 4; + * + * @return The bytes for subnetworkName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetworkNameBytes() { + java.lang.Object ref = subnetworkName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetworkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SESSION_AFFINITY_FIELD_NUMBER = 5; + private boolean sessionAffinity_; + /** + * + * + *
+   * Enable session affinity.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * bool session_affinity = 5; + * + * @return The sessionAffinity. + */ + @java.lang.Override + public boolean getSessionAffinity() { + return sessionAffinity_; + } + + 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 < forwardedPorts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, forwardedPorts_.getRaw(i)); + } + if (!getInstanceTagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceTag_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (!getSubnetworkNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subnetworkName_); + } + if (sessionAffinity_ != false) { + output.writeBool(5, sessionAffinity_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < forwardedPorts_.size(); i++) { + dataSize += computeStringSizeNoTag(forwardedPorts_.getRaw(i)); + } + size += dataSize; + size += 1 * getForwardedPortsList().size(); + } + if (!getInstanceTagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceTag_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (!getSubnetworkNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subnetworkName_); + } + if (sessionAffinity_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, sessionAffinity_); + } + 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.appengine.v1.Network)) { + return super.equals(obj); + } + com.google.appengine.v1.Network other = (com.google.appengine.v1.Network) obj; + + if (!getForwardedPortsList().equals(other.getForwardedPortsList())) return false; + if (!getInstanceTag().equals(other.getInstanceTag())) return false; + if (!getName().equals(other.getName())) return false; + if (!getSubnetworkName().equals(other.getSubnetworkName())) return false; + if (getSessionAffinity() != other.getSessionAffinity()) 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 (getForwardedPortsCount() > 0) { + hash = (37 * hash) + FORWARDED_PORTS_FIELD_NUMBER; + hash = (53 * hash) + getForwardedPortsList().hashCode(); + } + hash = (37 * hash) + INSTANCE_TAG_FIELD_NUMBER; + hash = (53 * hash) + getInstanceTag().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SUBNETWORK_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSubnetworkName().hashCode(); + hash = (37 * hash) + SESSION_AFFINITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSessionAffinity()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Network parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Network parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Network parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Network parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Network parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Network parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Network parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Network parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.appengine.v1.Network parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Network parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.appengine.v1.Network parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Network parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.appengine.v1.Network prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Extra network settings.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Network} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Network) + com.google.appengine.v1.NetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Network_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Network_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Network.class, com.google.appengine.v1.Network.Builder.class); + } + + // Construct using com.google.appengine.v1.Network.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(); + forwardedPorts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + instanceTag_ = ""; + + name_ = ""; + + subnetworkName_ = ""; + + sessionAffinity_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Network_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Network getDefaultInstanceForType() { + return com.google.appengine.v1.Network.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Network build() { + com.google.appengine.v1.Network result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Network buildPartial() { + com.google.appengine.v1.Network result = new com.google.appengine.v1.Network(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + forwardedPorts_ = forwardedPorts_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.forwardedPorts_ = forwardedPorts_; + result.instanceTag_ = instanceTag_; + result.name_ = name_; + result.subnetworkName_ = subnetworkName_; + result.sessionAffinity_ = sessionAffinity_; + 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.appengine.v1.Network) { + return mergeFrom((com.google.appengine.v1.Network) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Network other) { + if (other == com.google.appengine.v1.Network.getDefaultInstance()) return this; + if (!other.forwardedPorts_.isEmpty()) { + if (forwardedPorts_.isEmpty()) { + forwardedPorts_ = other.forwardedPorts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureForwardedPortsIsMutable(); + forwardedPorts_.addAll(other.forwardedPorts_); + } + onChanged(); + } + if (!other.getInstanceTag().isEmpty()) { + instanceTag_ = other.instanceTag_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getSubnetworkName().isEmpty()) { + subnetworkName_ = other.subnetworkName_; + onChanged(); + } + if (other.getSessionAffinity() != false) { + setSessionAffinity(other.getSessionAffinity()); + } + 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.appengine.v1.Network parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Network) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList forwardedPorts_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureForwardedPortsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + forwardedPorts_ = new com.google.protobuf.LazyStringArrayList(forwardedPorts_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * List of ports, or port pairs, to forward from the virtual machine to the
+     * application container.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * repeated string forwarded_ports = 1; + * + * @return A list containing the forwardedPorts. + */ + public com.google.protobuf.ProtocolStringList getForwardedPortsList() { + return forwardedPorts_.getUnmodifiableView(); + } + /** + * + * + *
+     * List of ports, or port pairs, to forward from the virtual machine to the
+     * application container.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * repeated string forwarded_ports = 1; + * + * @return The count of forwardedPorts. + */ + public int getForwardedPortsCount() { + return forwardedPorts_.size(); + } + /** + * + * + *
+     * List of ports, or port pairs, to forward from the virtual machine to the
+     * application container.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * repeated string forwarded_ports = 1; + * + * @param index The index of the element to return. + * @return The forwardedPorts at the given index. + */ + public java.lang.String getForwardedPorts(int index) { + return forwardedPorts_.get(index); + } + /** + * + * + *
+     * List of ports, or port pairs, to forward from the virtual machine to the
+     * application container.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * repeated string forwarded_ports = 1; + * + * @param index The index of the value to return. + * @return The bytes of the forwardedPorts at the given index. + */ + public com.google.protobuf.ByteString getForwardedPortsBytes(int index) { + return forwardedPorts_.getByteString(index); + } + /** + * + * + *
+     * List of ports, or port pairs, to forward from the virtual machine to the
+     * application container.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * repeated string forwarded_ports = 1; + * + * @param index The index to set the value at. + * @param value The forwardedPorts to set. + * @return This builder for chaining. + */ + public Builder setForwardedPorts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForwardedPortsIsMutable(); + forwardedPorts_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * List of ports, or port pairs, to forward from the virtual machine to the
+     * application container.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * repeated string forwarded_ports = 1; + * + * @param value The forwardedPorts to add. + * @return This builder for chaining. + */ + public Builder addForwardedPorts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForwardedPortsIsMutable(); + forwardedPorts_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * List of ports, or port pairs, to forward from the virtual machine to the
+     * application container.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * repeated string forwarded_ports = 1; + * + * @param values The forwardedPorts to add. + * @return This builder for chaining. + */ + public Builder addAllForwardedPorts(java.lang.Iterable values) { + ensureForwardedPortsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, forwardedPorts_); + onChanged(); + return this; + } + /** + * + * + *
+     * List of ports, or port pairs, to forward from the virtual machine to the
+     * application container.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * repeated string forwarded_ports = 1; + * + * @return This builder for chaining. + */ + public Builder clearForwardedPorts() { + forwardedPorts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * List of ports, or port pairs, to forward from the virtual machine to the
+     * application container.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * repeated string forwarded_ports = 1; + * + * @param value The bytes of the forwardedPorts to add. + * @return This builder for chaining. + */ + public Builder addForwardedPortsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureForwardedPortsIsMutable(); + forwardedPorts_.add(value); + onChanged(); + return this; + } + + private java.lang.Object instanceTag_ = ""; + /** + * + * + *
+     * Tag to apply to the instance during creation.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * string instance_tag = 2; + * + * @return The instanceTag. + */ + public java.lang.String getInstanceTag() { + java.lang.Object ref = instanceTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Tag to apply to the instance during creation.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * string instance_tag = 2; + * + * @return The bytes for instanceTag. + */ + public com.google.protobuf.ByteString getInstanceTagBytes() { + java.lang.Object ref = instanceTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Tag to apply to the instance during creation.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * string instance_tag = 2; + * + * @param value The instanceTag to set. + * @return This builder for chaining. + */ + public Builder setInstanceTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceTag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Tag to apply to the instance during creation.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * string instance_tag = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceTag() { + + instanceTag_ = getDefaultInstance().getInstanceTag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Tag to apply to the instance during creation.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * string instance_tag = 2; + * + * @param value The bytes for instanceTag to set. + * @return This builder for chaining. + */ + public Builder setInstanceTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceTag_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Google Compute Engine network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * Defaults to `default`.
+     * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+     * Google Compute Engine network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * Defaults to `default`.
+     * 
+ * + * string name = 3; + * + * @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; + } + } + /** + * + * + *
+     * Google Compute Engine network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * Defaults to `default`.
+     * 
+ * + * string name = 3; + * + * @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; + } + /** + * + * + *
+     * Google Compute Engine network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * Defaults to `default`.
+     * 
+ * + * string name = 3; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Google Compute Engine network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * Defaults to `default`.
+     * 
+ * + * string name = 3; + * + * @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 subnetworkName_ = ""; + /** + * + * + *
+     * Google Cloud Platform sub-network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * If a subnetwork name is specified, a network name will also be required
+     * unless it is for the default network.
+     * * If the network that the instance is being created in is a Legacy network,
+     * then the IP address is allocated from the IPv4Range.
+     * * If the network that the instance is being created in is an auto Subnet
+     * Mode Network, then only network name should be specified (not the
+     * subnetwork_name) and the IP address is created from the IPCidrRange of the
+     * subnetwork that exists in that zone for that network.
+     * * If the network that the instance is being created in is a custom Subnet
+     * Mode Network, then the subnetwork_name must be specified and the
+     * IP address is created from the IPCidrRange of the subnetwork.
+     * If specified, the subnetwork must exist in the same region as the
+     * App Engine flexible environment application.
+     * 
+ * + * string subnetwork_name = 4; + * + * @return The subnetworkName. + */ + public java.lang.String getSubnetworkName() { + java.lang.Object ref = subnetworkName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetworkName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Google Cloud Platform sub-network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * If a subnetwork name is specified, a network name will also be required
+     * unless it is for the default network.
+     * * If the network that the instance is being created in is a Legacy network,
+     * then the IP address is allocated from the IPv4Range.
+     * * If the network that the instance is being created in is an auto Subnet
+     * Mode Network, then only network name should be specified (not the
+     * subnetwork_name) and the IP address is created from the IPCidrRange of the
+     * subnetwork that exists in that zone for that network.
+     * * If the network that the instance is being created in is a custom Subnet
+     * Mode Network, then the subnetwork_name must be specified and the
+     * IP address is created from the IPCidrRange of the subnetwork.
+     * If specified, the subnetwork must exist in the same region as the
+     * App Engine flexible environment application.
+     * 
+ * + * string subnetwork_name = 4; + * + * @return The bytes for subnetworkName. + */ + public com.google.protobuf.ByteString getSubnetworkNameBytes() { + java.lang.Object ref = subnetworkName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetworkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Google Cloud Platform sub-network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * If a subnetwork name is specified, a network name will also be required
+     * unless it is for the default network.
+     * * If the network that the instance is being created in is a Legacy network,
+     * then the IP address is allocated from the IPv4Range.
+     * * If the network that the instance is being created in is an auto Subnet
+     * Mode Network, then only network name should be specified (not the
+     * subnetwork_name) and the IP address is created from the IPCidrRange of the
+     * subnetwork that exists in that zone for that network.
+     * * If the network that the instance is being created in is a custom Subnet
+     * Mode Network, then the subnetwork_name must be specified and the
+     * IP address is created from the IPCidrRange of the subnetwork.
+     * If specified, the subnetwork must exist in the same region as the
+     * App Engine flexible environment application.
+     * 
+ * + * string subnetwork_name = 4; + * + * @param value The subnetworkName to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnetworkName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Google Cloud Platform sub-network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * If a subnetwork name is specified, a network name will also be required
+     * unless it is for the default network.
+     * * If the network that the instance is being created in is a Legacy network,
+     * then the IP address is allocated from the IPv4Range.
+     * * If the network that the instance is being created in is an auto Subnet
+     * Mode Network, then only network name should be specified (not the
+     * subnetwork_name) and the IP address is created from the IPCidrRange of the
+     * subnetwork that exists in that zone for that network.
+     * * If the network that the instance is being created in is a custom Subnet
+     * Mode Network, then the subnetwork_name must be specified and the
+     * IP address is created from the IPCidrRange of the subnetwork.
+     * If specified, the subnetwork must exist in the same region as the
+     * App Engine flexible environment application.
+     * 
+ * + * string subnetwork_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearSubnetworkName() { + + subnetworkName_ = getDefaultInstance().getSubnetworkName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Google Cloud Platform sub-network where the virtual machines are created.
+     * Specify the short name, not the resource path.
+     * If a subnetwork name is specified, a network name will also be required
+     * unless it is for the default network.
+     * * If the network that the instance is being created in is a Legacy network,
+     * then the IP address is allocated from the IPv4Range.
+     * * If the network that the instance is being created in is an auto Subnet
+     * Mode Network, then only network name should be specified (not the
+     * subnetwork_name) and the IP address is created from the IPCidrRange of the
+     * subnetwork that exists in that zone for that network.
+     * * If the network that the instance is being created in is a custom Subnet
+     * Mode Network, then the subnetwork_name must be specified and the
+     * IP address is created from the IPCidrRange of the subnetwork.
+     * If specified, the subnetwork must exist in the same region as the
+     * App Engine flexible environment application.
+     * 
+ * + * string subnetwork_name = 4; + * + * @param value The bytes for subnetworkName to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnetworkName_ = value; + onChanged(); + return this; + } + + private boolean sessionAffinity_; + /** + * + * + *
+     * Enable session affinity.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * bool session_affinity = 5; + * + * @return The sessionAffinity. + */ + @java.lang.Override + public boolean getSessionAffinity() { + return sessionAffinity_; + } + /** + * + * + *
+     * Enable session affinity.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * bool session_affinity = 5; + * + * @param value The sessionAffinity to set. + * @return This builder for chaining. + */ + public Builder setSessionAffinity(boolean value) { + + sessionAffinity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Enable session affinity.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * bool session_affinity = 5; + * + * @return This builder for chaining. + */ + public Builder clearSessionAffinity() { + + sessionAffinity_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.appengine.v1.Network) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Network) + private static final com.google.appengine.v1.Network DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Network(); + } + + public static com.google.appengine.v1.Network getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Network parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Network(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.appengine.v1.Network getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkOrBuilder.java new file mode 100644 index 00000000..c5a80382 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkOrBuilder.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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface NetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Network) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of ports, or port pairs, to forward from the virtual machine to the
+   * application container.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * repeated string forwarded_ports = 1; + * + * @return A list containing the forwardedPorts. + */ + java.util.List getForwardedPortsList(); + /** + * + * + *
+   * List of ports, or port pairs, to forward from the virtual machine to the
+   * application container.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * repeated string forwarded_ports = 1; + * + * @return The count of forwardedPorts. + */ + int getForwardedPortsCount(); + /** + * + * + *
+   * List of ports, or port pairs, to forward from the virtual machine to the
+   * application container.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * repeated string forwarded_ports = 1; + * + * @param index The index of the element to return. + * @return The forwardedPorts at the given index. + */ + java.lang.String getForwardedPorts(int index); + /** + * + * + *
+   * List of ports, or port pairs, to forward from the virtual machine to the
+   * application container.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * repeated string forwarded_ports = 1; + * + * @param index The index of the value to return. + * @return The bytes of the forwardedPorts at the given index. + */ + com.google.protobuf.ByteString getForwardedPortsBytes(int index); + + /** + * + * + *
+   * Tag to apply to the instance during creation.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * string instance_tag = 2; + * + * @return The instanceTag. + */ + java.lang.String getInstanceTag(); + /** + * + * + *
+   * Tag to apply to the instance during creation.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * string instance_tag = 2; + * + * @return The bytes for instanceTag. + */ + com.google.protobuf.ByteString getInstanceTagBytes(); + + /** + * + * + *
+   * Google Compute Engine network where the virtual machines are created.
+   * Specify the short name, not the resource path.
+   * Defaults to `default`.
+   * 
+ * + * string name = 3; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Google Compute Engine network where the virtual machines are created.
+   * Specify the short name, not the resource path.
+   * Defaults to `default`.
+   * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Google Cloud Platform sub-network where the virtual machines are created.
+   * Specify the short name, not the resource path.
+   * If a subnetwork name is specified, a network name will also be required
+   * unless it is for the default network.
+   * * If the network that the instance is being created in is a Legacy network,
+   * then the IP address is allocated from the IPv4Range.
+   * * If the network that the instance is being created in is an auto Subnet
+   * Mode Network, then only network name should be specified (not the
+   * subnetwork_name) and the IP address is created from the IPCidrRange of the
+   * subnetwork that exists in that zone for that network.
+   * * If the network that the instance is being created in is a custom Subnet
+   * Mode Network, then the subnetwork_name must be specified and the
+   * IP address is created from the IPCidrRange of the subnetwork.
+   * If specified, the subnetwork must exist in the same region as the
+   * App Engine flexible environment application.
+   * 
+ * + * string subnetwork_name = 4; + * + * @return The subnetworkName. + */ + java.lang.String getSubnetworkName(); + /** + * + * + *
+   * Google Cloud Platform sub-network where the virtual machines are created.
+   * Specify the short name, not the resource path.
+   * If a subnetwork name is specified, a network name will also be required
+   * unless it is for the default network.
+   * * If the network that the instance is being created in is a Legacy network,
+   * then the IP address is allocated from the IPv4Range.
+   * * If the network that the instance is being created in is an auto Subnet
+   * Mode Network, then only network name should be specified (not the
+   * subnetwork_name) and the IP address is created from the IPCidrRange of the
+   * subnetwork that exists in that zone for that network.
+   * * If the network that the instance is being created in is a custom Subnet
+   * Mode Network, then the subnetwork_name must be specified and the
+   * IP address is created from the IPCidrRange of the subnetwork.
+   * If specified, the subnetwork must exist in the same region as the
+   * App Engine flexible environment application.
+   * 
+ * + * string subnetwork_name = 4; + * + * @return The bytes for subnetworkName. + */ + com.google.protobuf.ByteString getSubnetworkNameBytes(); + + /** + * + * + *
+   * Enable session affinity.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * bool session_affinity = 5; + * + * @return The sessionAffinity. + */ + boolean getSessionAffinity(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettings.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettings.java new file mode 100644 index 00000000..bc512e93 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettings.java @@ -0,0 +1,809 @@ +/* + * 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/appengine/v1/network_settings.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * A NetworkSettings resource is a container for ingress settings for a version
+ * or service.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.NetworkSettings} + */ +public final class NetworkSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.NetworkSettings) + NetworkSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkSettings.newBuilder() to construct. + private NetworkSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkSettings() { + ingressTrafficAllowed_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NetworkSettings( + 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(); + + ingressTrafficAllowed_ = 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.appengine.v1.NetworkSettingsProto + .internal_static_google_appengine_v1_NetworkSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.NetworkSettingsProto + .internal_static_google_appengine_v1_NetworkSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.NetworkSettings.class, + com.google.appengine.v1.NetworkSettings.Builder.class); + } + + /** + * + * + *
+   * If unspecified, INGRESS_TRAFFIC_ALLOWED_ALL will be used.
+   * 
+ * + * Protobuf enum {@code google.appengine.v1.NetworkSettings.IngressTrafficAllowed} + */ + public enum IngressTrafficAllowed implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified
+     * 
+ * + * INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED = 0; + */ + INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED(0), + /** + * + * + *
+     * Allow HTTP traffic from public and private sources.
+     * 
+ * + * INGRESS_TRAFFIC_ALLOWED_ALL = 1; + */ + INGRESS_TRAFFIC_ALLOWED_ALL(1), + /** + * + * + *
+     * Allow HTTP traffic from only private VPC sources.
+     * 
+ * + * INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY = 2; + */ + INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY(2), + /** + * + * + *
+     * Allow HTTP traffic from private VPC sources and through load balancers.
+     * 
+ * + * INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB = 3; + */ + INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified
+     * 
+ * + * INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED = 0; + */ + public static final int INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Allow HTTP traffic from public and private sources.
+     * 
+ * + * INGRESS_TRAFFIC_ALLOWED_ALL = 1; + */ + public static final int INGRESS_TRAFFIC_ALLOWED_ALL_VALUE = 1; + /** + * + * + *
+     * Allow HTTP traffic from only private VPC sources.
+     * 
+ * + * INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY = 2; + */ + public static final int INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY_VALUE = 2; + /** + * + * + *
+     * Allow HTTP traffic from private VPC sources and through load balancers.
+     * 
+ * + * INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB = 3; + */ + public static final int INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB_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 IngressTrafficAllowed 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 IngressTrafficAllowed forNumber(int value) { + switch (value) { + case 0: + return INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED; + case 1: + return INGRESS_TRAFFIC_ALLOWED_ALL; + case 2: + return INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY; + case 3: + return INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB; + 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 IngressTrafficAllowed findValueByNumber(int number) { + return IngressTrafficAllowed.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.appengine.v1.NetworkSettings.getDescriptor().getEnumTypes().get(0); + } + + private static final IngressTrafficAllowed[] VALUES = values(); + + public static IngressTrafficAllowed 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 IngressTrafficAllowed(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.NetworkSettings.IngressTrafficAllowed) + } + + public static final int INGRESS_TRAFFIC_ALLOWED_FIELD_NUMBER = 1; + private int ingressTrafficAllowed_; + /** + * + * + *
+   * The ingress settings for version or service.
+   * 
+ * + * .google.appengine.v1.NetworkSettings.IngressTrafficAllowed ingress_traffic_allowed = 1; + * + * + * @return The enum numeric value on the wire for ingressTrafficAllowed. + */ + @java.lang.Override + public int getIngressTrafficAllowedValue() { + return ingressTrafficAllowed_; + } + /** + * + * + *
+   * The ingress settings for version or service.
+   * 
+ * + * .google.appengine.v1.NetworkSettings.IngressTrafficAllowed ingress_traffic_allowed = 1; + * + * + * @return The ingressTrafficAllowed. + */ + @java.lang.Override + public com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed getIngressTrafficAllowed() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed result = + com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed.valueOf( + ingressTrafficAllowed_); + return result == null + ? com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed.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 (ingressTrafficAllowed_ + != com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed + .INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, ingressTrafficAllowed_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ingressTrafficAllowed_ + != com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed + .INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, ingressTrafficAllowed_); + } + 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.appengine.v1.NetworkSettings)) { + return super.equals(obj); + } + com.google.appengine.v1.NetworkSettings other = (com.google.appengine.v1.NetworkSettings) obj; + + if (ingressTrafficAllowed_ != other.ingressTrafficAllowed_) 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) + INGRESS_TRAFFIC_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + ingressTrafficAllowed_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.NetworkSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.NetworkSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.NetworkSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.NetworkSettings 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.appengine.v1.NetworkSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.NetworkSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.NetworkSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.NetworkSettings 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.appengine.v1.NetworkSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.NetworkSettings 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.appengine.v1.NetworkSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.NetworkSettings 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.appengine.v1.NetworkSettings 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 NetworkSettings resource is a container for ingress settings for a version
+   * or service.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.NetworkSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.NetworkSettings) + com.google.appengine.v1.NetworkSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.NetworkSettingsProto + .internal_static_google_appengine_v1_NetworkSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.NetworkSettingsProto + .internal_static_google_appengine_v1_NetworkSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.NetworkSettings.class, + com.google.appengine.v1.NetworkSettings.Builder.class); + } + + // Construct using com.google.appengine.v1.NetworkSettings.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(); + ingressTrafficAllowed_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.NetworkSettingsProto + .internal_static_google_appengine_v1_NetworkSettings_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.NetworkSettings getDefaultInstanceForType() { + return com.google.appengine.v1.NetworkSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.NetworkSettings build() { + com.google.appengine.v1.NetworkSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.NetworkSettings buildPartial() { + com.google.appengine.v1.NetworkSettings result = + new com.google.appengine.v1.NetworkSettings(this); + result.ingressTrafficAllowed_ = ingressTrafficAllowed_; + 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.appengine.v1.NetworkSettings) { + return mergeFrom((com.google.appengine.v1.NetworkSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.NetworkSettings other) { + if (other == com.google.appengine.v1.NetworkSettings.getDefaultInstance()) return this; + if (other.ingressTrafficAllowed_ != 0) { + setIngressTrafficAllowedValue(other.getIngressTrafficAllowedValue()); + } + 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.appengine.v1.NetworkSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.NetworkSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int ingressTrafficAllowed_ = 0; + /** + * + * + *
+     * The ingress settings for version or service.
+     * 
+ * + * .google.appengine.v1.NetworkSettings.IngressTrafficAllowed ingress_traffic_allowed = 1; + * + * + * @return The enum numeric value on the wire for ingressTrafficAllowed. + */ + @java.lang.Override + public int getIngressTrafficAllowedValue() { + return ingressTrafficAllowed_; + } + /** + * + * + *
+     * The ingress settings for version or service.
+     * 
+ * + * .google.appengine.v1.NetworkSettings.IngressTrafficAllowed ingress_traffic_allowed = 1; + * + * + * @param value The enum numeric value on the wire for ingressTrafficAllowed to set. + * @return This builder for chaining. + */ + public Builder setIngressTrafficAllowedValue(int value) { + + ingressTrafficAllowed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The ingress settings for version or service.
+     * 
+ * + * .google.appengine.v1.NetworkSettings.IngressTrafficAllowed ingress_traffic_allowed = 1; + * + * + * @return The ingressTrafficAllowed. + */ + @java.lang.Override + public com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed + getIngressTrafficAllowed() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed result = + com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed.valueOf( + ingressTrafficAllowed_); + return result == null + ? com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The ingress settings for version or service.
+     * 
+ * + * .google.appengine.v1.NetworkSettings.IngressTrafficAllowed ingress_traffic_allowed = 1; + * + * + * @param value The ingressTrafficAllowed to set. + * @return This builder for chaining. + */ + public Builder setIngressTrafficAllowed( + com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed value) { + if (value == null) { + throw new NullPointerException(); + } + + ingressTrafficAllowed_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The ingress settings for version or service.
+     * 
+ * + * .google.appengine.v1.NetworkSettings.IngressTrafficAllowed ingress_traffic_allowed = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearIngressTrafficAllowed() { + + ingressTrafficAllowed_ = 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.appengine.v1.NetworkSettings) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.NetworkSettings) + private static final com.google.appengine.v1.NetworkSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.NetworkSettings(); + } + + public static com.google.appengine.v1.NetworkSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkSettings(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.appengine.v1.NetworkSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettingsOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettingsOrBuilder.java new file mode 100644 index 00000000..24ed4e14 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettingsOrBuilder.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/appengine/v1/network_settings.proto + +package com.google.appengine.v1; + +public interface NetworkSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.NetworkSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The ingress settings for version or service.
+   * 
+ * + * .google.appengine.v1.NetworkSettings.IngressTrafficAllowed ingress_traffic_allowed = 1; + * + * + * @return The enum numeric value on the wire for ingressTrafficAllowed. + */ + int getIngressTrafficAllowedValue(); + /** + * + * + *
+   * The ingress settings for version or service.
+   * 
+ * + * .google.appengine.v1.NetworkSettings.IngressTrafficAllowed ingress_traffic_allowed = 1; + * + * + * @return The ingressTrafficAllowed. + */ + com.google.appengine.v1.NetworkSettings.IngressTrafficAllowed getIngressTrafficAllowed(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettingsProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettingsProto.java new file mode 100644 index 00000000..68dc9861 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkSettingsProto.java @@ -0,0 +1,78 @@ +/* + * 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/appengine/v1/network_settings.proto + +package com.google.appengine.v1; + +public final class NetworkSettingsProto { + private NetworkSettingsProto() {} + + 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_appengine_v1_NetworkSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_NetworkSettings_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/appengine/v1/network_settings.p" + + "roto\022\023google.appengine.v1\032\034google/api/an" + + "notations.proto\"\252\002\n\017NetworkSettings\022[\n\027i" + + "ngress_traffic_allowed\030\001 \001(\0162:.google.ap" + + "pengine.v1.NetworkSettings.IngressTraffi" + + "cAllowed\"\271\001\n\025IngressTrafficAllowed\022\'\n#IN" + + "GRESS_TRAFFIC_ALLOWED_UNSPECIFIED\020\000\022\037\n\033I" + + "NGRESS_TRAFFIC_ALLOWED_ALL\020\001\022)\n%INGRESS_" + + "TRAFFIC_ALLOWED_INTERNAL_ONLY\020\002\022+\n\'INGRE" + + "SS_TRAFFIC_ALLOWED_INTERNAL_AND_LB\020\003B\306\001\n" + + "\027com.google.appengine.v1B\024NetworkSetting" + + "sProtoP\001Z + * Target scaling by network usage. + * Only applicable in the App Engine flexible environment. + * + * + * Protobuf type {@code google.appengine.v1.NetworkUtilization} + */ +public final class NetworkUtilization extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.NetworkUtilization) + NetworkUtilizationOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkUtilization.newBuilder() to construct. + private NetworkUtilization(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkUtilization() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkUtilization(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NetworkUtilization( + 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: + { + targetSentBytesPerSecond_ = input.readInt32(); + break; + } + case 88: + { + targetSentPacketsPerSecond_ = input.readInt32(); + break; + } + case 96: + { + targetReceivedBytesPerSecond_ = input.readInt32(); + break; + } + case 104: + { + targetReceivedPacketsPerSecond_ = input.readInt32(); + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_NetworkUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_NetworkUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.NetworkUtilization.class, + com.google.appengine.v1.NetworkUtilization.Builder.class); + } + + public static final int TARGET_SENT_BYTES_PER_SECOND_FIELD_NUMBER = 1; + private int targetSentBytesPerSecond_; + /** + * + * + *
+   * Target bytes sent per second.
+   * 
+ * + * int32 target_sent_bytes_per_second = 1; + * + * @return The targetSentBytesPerSecond. + */ + @java.lang.Override + public int getTargetSentBytesPerSecond() { + return targetSentBytesPerSecond_; + } + + public static final int TARGET_SENT_PACKETS_PER_SECOND_FIELD_NUMBER = 11; + private int targetSentPacketsPerSecond_; + /** + * + * + *
+   * Target packets sent per second.
+   * 
+ * + * int32 target_sent_packets_per_second = 11; + * + * @return The targetSentPacketsPerSecond. + */ + @java.lang.Override + public int getTargetSentPacketsPerSecond() { + return targetSentPacketsPerSecond_; + } + + public static final int TARGET_RECEIVED_BYTES_PER_SECOND_FIELD_NUMBER = 12; + private int targetReceivedBytesPerSecond_; + /** + * + * + *
+   * Target bytes received per second.
+   * 
+ * + * int32 target_received_bytes_per_second = 12; + * + * @return The targetReceivedBytesPerSecond. + */ + @java.lang.Override + public int getTargetReceivedBytesPerSecond() { + return targetReceivedBytesPerSecond_; + } + + public static final int TARGET_RECEIVED_PACKETS_PER_SECOND_FIELD_NUMBER = 13; + private int targetReceivedPacketsPerSecond_; + /** + * + * + *
+   * Target packets received per second.
+   * 
+ * + * int32 target_received_packets_per_second = 13; + * + * @return The targetReceivedPacketsPerSecond. + */ + @java.lang.Override + public int getTargetReceivedPacketsPerSecond() { + return targetReceivedPacketsPerSecond_; + } + + 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 (targetSentBytesPerSecond_ != 0) { + output.writeInt32(1, targetSentBytesPerSecond_); + } + if (targetSentPacketsPerSecond_ != 0) { + output.writeInt32(11, targetSentPacketsPerSecond_); + } + if (targetReceivedBytesPerSecond_ != 0) { + output.writeInt32(12, targetReceivedBytesPerSecond_); + } + if (targetReceivedPacketsPerSecond_ != 0) { + output.writeInt32(13, targetReceivedPacketsPerSecond_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetSentBytesPerSecond_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, targetSentBytesPerSecond_); + } + if (targetSentPacketsPerSecond_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(11, targetSentPacketsPerSecond_); + } + if (targetReceivedBytesPerSecond_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(12, targetReceivedBytesPerSecond_); + } + if (targetReceivedPacketsPerSecond_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 13, targetReceivedPacketsPerSecond_); + } + 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.appengine.v1.NetworkUtilization)) { + return super.equals(obj); + } + com.google.appengine.v1.NetworkUtilization other = + (com.google.appengine.v1.NetworkUtilization) obj; + + if (getTargetSentBytesPerSecond() != other.getTargetSentBytesPerSecond()) return false; + if (getTargetSentPacketsPerSecond() != other.getTargetSentPacketsPerSecond()) return false; + if (getTargetReceivedBytesPerSecond() != other.getTargetReceivedBytesPerSecond()) return false; + if (getTargetReceivedPacketsPerSecond() != other.getTargetReceivedPacketsPerSecond()) + 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_SENT_BYTES_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + getTargetSentBytesPerSecond(); + hash = (37 * hash) + TARGET_SENT_PACKETS_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + getTargetSentPacketsPerSecond(); + hash = (37 * hash) + TARGET_RECEIVED_BYTES_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + getTargetReceivedBytesPerSecond(); + hash = (37 * hash) + TARGET_RECEIVED_PACKETS_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + getTargetReceivedPacketsPerSecond(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.NetworkUtilization parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.NetworkUtilization parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.NetworkUtilization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.NetworkUtilization 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.appengine.v1.NetworkUtilization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.NetworkUtilization parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.NetworkUtilization parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.NetworkUtilization 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.appengine.v1.NetworkUtilization parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.NetworkUtilization 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.appengine.v1.NetworkUtilization parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.NetworkUtilization 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.appengine.v1.NetworkUtilization 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; + } + /** + * + * + *
+   * Target scaling by network usage.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.NetworkUtilization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.NetworkUtilization) + com.google.appengine.v1.NetworkUtilizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_NetworkUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_NetworkUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.NetworkUtilization.class, + com.google.appengine.v1.NetworkUtilization.Builder.class); + } + + // Construct using com.google.appengine.v1.NetworkUtilization.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(); + targetSentBytesPerSecond_ = 0; + + targetSentPacketsPerSecond_ = 0; + + targetReceivedBytesPerSecond_ = 0; + + targetReceivedPacketsPerSecond_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_NetworkUtilization_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.NetworkUtilization getDefaultInstanceForType() { + return com.google.appengine.v1.NetworkUtilization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.NetworkUtilization build() { + com.google.appengine.v1.NetworkUtilization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.NetworkUtilization buildPartial() { + com.google.appengine.v1.NetworkUtilization result = + new com.google.appengine.v1.NetworkUtilization(this); + result.targetSentBytesPerSecond_ = targetSentBytesPerSecond_; + result.targetSentPacketsPerSecond_ = targetSentPacketsPerSecond_; + result.targetReceivedBytesPerSecond_ = targetReceivedBytesPerSecond_; + result.targetReceivedPacketsPerSecond_ = targetReceivedPacketsPerSecond_; + 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.appengine.v1.NetworkUtilization) { + return mergeFrom((com.google.appengine.v1.NetworkUtilization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.NetworkUtilization other) { + if (other == com.google.appengine.v1.NetworkUtilization.getDefaultInstance()) return this; + if (other.getTargetSentBytesPerSecond() != 0) { + setTargetSentBytesPerSecond(other.getTargetSentBytesPerSecond()); + } + if (other.getTargetSentPacketsPerSecond() != 0) { + setTargetSentPacketsPerSecond(other.getTargetSentPacketsPerSecond()); + } + if (other.getTargetReceivedBytesPerSecond() != 0) { + setTargetReceivedBytesPerSecond(other.getTargetReceivedBytesPerSecond()); + } + if (other.getTargetReceivedPacketsPerSecond() != 0) { + setTargetReceivedPacketsPerSecond(other.getTargetReceivedPacketsPerSecond()); + } + 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.appengine.v1.NetworkUtilization parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.NetworkUtilization) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int targetSentBytesPerSecond_; + /** + * + * + *
+     * Target bytes sent per second.
+     * 
+ * + * int32 target_sent_bytes_per_second = 1; + * + * @return The targetSentBytesPerSecond. + */ + @java.lang.Override + public int getTargetSentBytesPerSecond() { + return targetSentBytesPerSecond_; + } + /** + * + * + *
+     * Target bytes sent per second.
+     * 
+ * + * int32 target_sent_bytes_per_second = 1; + * + * @param value The targetSentBytesPerSecond to set. + * @return This builder for chaining. + */ + public Builder setTargetSentBytesPerSecond(int value) { + + targetSentBytesPerSecond_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target bytes sent per second.
+     * 
+ * + * int32 target_sent_bytes_per_second = 1; + * + * @return This builder for chaining. + */ + public Builder clearTargetSentBytesPerSecond() { + + targetSentBytesPerSecond_ = 0; + onChanged(); + return this; + } + + private int targetSentPacketsPerSecond_; + /** + * + * + *
+     * Target packets sent per second.
+     * 
+ * + * int32 target_sent_packets_per_second = 11; + * + * @return The targetSentPacketsPerSecond. + */ + @java.lang.Override + public int getTargetSentPacketsPerSecond() { + return targetSentPacketsPerSecond_; + } + /** + * + * + *
+     * Target packets sent per second.
+     * 
+ * + * int32 target_sent_packets_per_second = 11; + * + * @param value The targetSentPacketsPerSecond to set. + * @return This builder for chaining. + */ + public Builder setTargetSentPacketsPerSecond(int value) { + + targetSentPacketsPerSecond_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target packets sent per second.
+     * 
+ * + * int32 target_sent_packets_per_second = 11; + * + * @return This builder for chaining. + */ + public Builder clearTargetSentPacketsPerSecond() { + + targetSentPacketsPerSecond_ = 0; + onChanged(); + return this; + } + + private int targetReceivedBytesPerSecond_; + /** + * + * + *
+     * Target bytes received per second.
+     * 
+ * + * int32 target_received_bytes_per_second = 12; + * + * @return The targetReceivedBytesPerSecond. + */ + @java.lang.Override + public int getTargetReceivedBytesPerSecond() { + return targetReceivedBytesPerSecond_; + } + /** + * + * + *
+     * Target bytes received per second.
+     * 
+ * + * int32 target_received_bytes_per_second = 12; + * + * @param value The targetReceivedBytesPerSecond to set. + * @return This builder for chaining. + */ + public Builder setTargetReceivedBytesPerSecond(int value) { + + targetReceivedBytesPerSecond_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target bytes received per second.
+     * 
+ * + * int32 target_received_bytes_per_second = 12; + * + * @return This builder for chaining. + */ + public Builder clearTargetReceivedBytesPerSecond() { + + targetReceivedBytesPerSecond_ = 0; + onChanged(); + return this; + } + + private int targetReceivedPacketsPerSecond_; + /** + * + * + *
+     * Target packets received per second.
+     * 
+ * + * int32 target_received_packets_per_second = 13; + * + * @return The targetReceivedPacketsPerSecond. + */ + @java.lang.Override + public int getTargetReceivedPacketsPerSecond() { + return targetReceivedPacketsPerSecond_; + } + /** + * + * + *
+     * Target packets received per second.
+     * 
+ * + * int32 target_received_packets_per_second = 13; + * + * @param value The targetReceivedPacketsPerSecond to set. + * @return This builder for chaining. + */ + public Builder setTargetReceivedPacketsPerSecond(int value) { + + targetReceivedPacketsPerSecond_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target packets received per second.
+     * 
+ * + * int32 target_received_packets_per_second = 13; + * + * @return This builder for chaining. + */ + public Builder clearTargetReceivedPacketsPerSecond() { + + targetReceivedPacketsPerSecond_ = 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.appengine.v1.NetworkUtilization) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.NetworkUtilization) + private static final com.google.appengine.v1.NetworkUtilization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.NetworkUtilization(); + } + + public static com.google.appengine.v1.NetworkUtilization getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkUtilization parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkUtilization(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.appengine.v1.NetworkUtilization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkUtilizationOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkUtilizationOrBuilder.java new file mode 100644 index 00000000..c7416d62 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/NetworkUtilizationOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface NetworkUtilizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.NetworkUtilization) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target bytes sent per second.
+   * 
+ * + * int32 target_sent_bytes_per_second = 1; + * + * @return The targetSentBytesPerSecond. + */ + int getTargetSentBytesPerSecond(); + + /** + * + * + *
+   * Target packets sent per second.
+   * 
+ * + * int32 target_sent_packets_per_second = 11; + * + * @return The targetSentPacketsPerSecond. + */ + int getTargetSentPacketsPerSecond(); + + /** + * + * + *
+   * Target bytes received per second.
+   * 
+ * + * int32 target_received_bytes_per_second = 12; + * + * @return The targetReceivedBytesPerSecond. + */ + int getTargetReceivedBytesPerSecond(); + + /** + * + * + *
+   * Target packets received per second.
+   * 
+ * + * int32 target_received_packets_per_second = 13; + * + * @return The targetReceivedPacketsPerSecond. + */ + int getTargetReceivedPacketsPerSecond(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationMetadataV1.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationMetadataV1.java new file mode 100644 index 00000000..7c038cf5 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationMetadataV1.java @@ -0,0 +1,2368 @@ +/* + * 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/appengine/v1/operation.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Metadata for the given [google.longrunning.Operation][google.longrunning.Operation].
+ * 
+ * + * Protobuf type {@code google.appengine.v1.OperationMetadataV1} + */ +public final class OperationMetadataV1 extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.OperationMetadataV1) + OperationMetadataV1OrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadataV1.newBuilder() to construct. + private OperationMetadataV1(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadataV1() { + method_ = ""; + user_ = ""; + target_ = ""; + ephemeralMessage_ = ""; + warning_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadataV1(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadataV1( + 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(); + + method_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (insertTime_ != null) { + subBuilder = insertTime_.toBuilder(); + } + insertTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(insertTime_); + insertTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + 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 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + user_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + ephemeralMessage_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + warning_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + warning_.add(s); + break; + } + case 66: + { + com.google.appengine.v1.CreateVersionMetadataV1.Builder subBuilder = null; + if (methodMetadataCase_ == 8) { + subBuilder = + ((com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_).toBuilder(); + } + methodMetadata_ = + input.readMessage( + com.google.appengine.v1.CreateVersionMetadataV1.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_); + methodMetadata_ = subBuilder.buildPartial(); + } + methodMetadataCase_ = 8; + 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)) { + warning_ = warning_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.OperationProto + .internal_static_google_appengine_v1_OperationMetadataV1_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.OperationProto + .internal_static_google_appengine_v1_OperationMetadataV1_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.OperationMetadataV1.class, + com.google.appengine.v1.OperationMetadataV1.Builder.class); + } + + private int methodMetadataCase_ = 0; + private java.lang.Object methodMetadata_; + + public enum MethodMetadataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CREATE_VERSION_METADATA(8), + METHODMETADATA_NOT_SET(0); + private final int value; + + private MethodMetadataCase(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 MethodMetadataCase valueOf(int value) { + return forNumber(value); + } + + public static MethodMetadataCase forNumber(int value) { + switch (value) { + case 8: + return CREATE_VERSION_METADATA; + case 0: + return METHODMETADATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MethodMetadataCase getMethodMetadataCase() { + return MethodMetadataCase.forNumber(methodMetadataCase_); + } + + public static final int METHOD_FIELD_NUMBER = 1; + private volatile java.lang.Object method_; + /** + * + * + *
+   * API method that initiated this operation. Example:
+   * `google.appengine.v1.Versions.CreateVersion`.
+   * @OutputOnly
+   * 
+ * + * string method = 1; + * + * @return The method. + */ + @java.lang.Override + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } + } + /** + * + * + *
+   * API method that initiated this operation. Example:
+   * `google.appengine.v1.Versions.CreateVersion`.
+   * @OutputOnly
+   * 
+ * + * string method = 1; + * + * @return The bytes for method. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSERT_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp insertTime_; + /** + * + * + *
+   * Time that this operation was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + * + * @return Whether the insertTime field is set. + */ + @java.lang.Override + public boolean hasInsertTime() { + return insertTime_ != null; + } + /** + * + * + *
+   * Time that this operation was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + * + * @return The insertTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInsertTime() { + return insertTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : insertTime_; + } + /** + * + * + *
+   * Time that this operation was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInsertTimeOrBuilder() { + return getInsertTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Time that this operation completed.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Time that this operation completed.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Time that this operation completed.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int USER_FIELD_NUMBER = 4; + private volatile java.lang.Object user_; + /** + * + * + *
+   * User who requested this operation.
+   * @OutputOnly
+   * 
+ * + * string user = 4; + * + * @return The user. + */ + @java.lang.Override + public java.lang.String getUser() { + java.lang.Object ref = user_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + user_ = s; + return s; + } + } + /** + * + * + *
+   * User who requested this operation.
+   * @OutputOnly
+   * 
+ * + * string user = 4; + * + * @return The bytes for user. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserBytes() { + java.lang.Object ref = user_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + user_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_FIELD_NUMBER = 5; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Name of the resource that this operation is acting on. Example:
+   * `apps/myapp/services/default`.
+   * @OutputOnly
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Name of the resource that this operation is acting on. Example:
+   * `apps/myapp/services/default`.
+   * @OutputOnly
+   * 
+ * + * 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 EPHEMERAL_MESSAGE_FIELD_NUMBER = 6; + private volatile java.lang.Object ephemeralMessage_; + /** + * + * + *
+   * Ephemeral message that may change every time the operation is polled.
+   * @OutputOnly
+   * 
+ * + * string ephemeral_message = 6; + * + * @return The ephemeralMessage. + */ + @java.lang.Override + public java.lang.String getEphemeralMessage() { + java.lang.Object ref = ephemeralMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ephemeralMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Ephemeral message that may change every time the operation is polled.
+   * @OutputOnly
+   * 
+ * + * string ephemeral_message = 6; + * + * @return The bytes for ephemeralMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEphemeralMessageBytes() { + java.lang.Object ref = ephemeralMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ephemeralMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WARNING_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList warning_; + /** + * + * + *
+   * Durable messages that persist on every operation poll.
+   * @OutputOnly
+   * 
+ * + * repeated string warning = 7; + * + * @return A list containing the warning. + */ + public com.google.protobuf.ProtocolStringList getWarningList() { + return warning_; + } + /** + * + * + *
+   * Durable messages that persist on every operation poll.
+   * @OutputOnly
+   * 
+ * + * repeated string warning = 7; + * + * @return The count of warning. + */ + public int getWarningCount() { + return warning_.size(); + } + /** + * + * + *
+   * Durable messages that persist on every operation poll.
+   * @OutputOnly
+   * 
+ * + * repeated string warning = 7; + * + * @param index The index of the element to return. + * @return The warning at the given index. + */ + public java.lang.String getWarning(int index) { + return warning_.get(index); + } + /** + * + * + *
+   * Durable messages that persist on every operation poll.
+   * @OutputOnly
+   * 
+ * + * repeated string warning = 7; + * + * @param index The index of the value to return. + * @return The bytes of the warning at the given index. + */ + public com.google.protobuf.ByteString getWarningBytes(int index) { + return warning_.getByteString(index); + } + + public static final int CREATE_VERSION_METADATA_FIELD_NUMBER = 8; + /** + * .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; + * + * @return Whether the createVersionMetadata field is set. + */ + @java.lang.Override + public boolean hasCreateVersionMetadata() { + return methodMetadataCase_ == 8; + } + /** + * .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; + * + * @return The createVersionMetadata. + */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionMetadataV1 getCreateVersionMetadata() { + if (methodMetadataCase_ == 8) { + return (com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_; + } + return com.google.appengine.v1.CreateVersionMetadataV1.getDefaultInstance(); + } + /** .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionMetadataV1OrBuilder + getCreateVersionMetadataOrBuilder() { + if (methodMetadataCase_ == 8) { + return (com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_; + } + return com.google.appengine.v1.CreateVersionMetadataV1.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 (!getMethodBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, method_); + } + if (insertTime_ != null) { + output.writeMessage(2, getInsertTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + if (!getUserBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, user_); + } + if (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, target_); + } + if (!getEphemeralMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ephemeralMessage_); + } + for (int i = 0; i < warning_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, warning_.getRaw(i)); + } + if (methodMetadataCase_ == 8) { + output.writeMessage(8, (com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMethodBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, method_); + } + if (insertTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInsertTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + if (!getUserBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, user_); + } + if (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, target_); + } + if (!getEphemeralMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, ephemeralMessage_); + } + { + int dataSize = 0; + for (int i = 0; i < warning_.size(); i++) { + dataSize += computeStringSizeNoTag(warning_.getRaw(i)); + } + size += dataSize; + size += 1 * getWarningList().size(); + } + if (methodMetadataCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_); + } + 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.appengine.v1.OperationMetadataV1)) { + return super.equals(obj); + } + com.google.appengine.v1.OperationMetadataV1 other = + (com.google.appengine.v1.OperationMetadataV1) obj; + + if (!getMethod().equals(other.getMethod())) return false; + if (hasInsertTime() != other.hasInsertTime()) return false; + if (hasInsertTime()) { + if (!getInsertTime().equals(other.getInsertTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUser().equals(other.getUser())) return false; + if (!getTarget().equals(other.getTarget())) return false; + if (!getEphemeralMessage().equals(other.getEphemeralMessage())) return false; + if (!getWarningList().equals(other.getWarningList())) return false; + if (!getMethodMetadataCase().equals(other.getMethodMetadataCase())) return false; + switch (methodMetadataCase_) { + case 8: + if (!getCreateVersionMetadata().equals(other.getCreateVersionMetadata())) 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) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + if (hasInsertTime()) { + hash = (37 * hash) + INSERT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getInsertTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + EPHEMERAL_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getEphemeralMessage().hashCode(); + if (getWarningCount() > 0) { + hash = (37 * hash) + WARNING_FIELD_NUMBER; + hash = (53 * hash) + getWarningList().hashCode(); + } + switch (methodMetadataCase_) { + case 8: + hash = (37 * hash) + CREATE_VERSION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getCreateVersionMetadata().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.OperationMetadataV1 parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.OperationMetadataV1 parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.OperationMetadataV1 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.OperationMetadataV1 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.appengine.v1.OperationMetadataV1 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.OperationMetadataV1 parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.OperationMetadataV1 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.OperationMetadataV1 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.appengine.v1.OperationMetadataV1 parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.OperationMetadataV1 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.appengine.v1.OperationMetadataV1 parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.OperationMetadataV1 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.appengine.v1.OperationMetadataV1 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 for the given [google.longrunning.Operation][google.longrunning.Operation].
+   * 
+ * + * Protobuf type {@code google.appengine.v1.OperationMetadataV1} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.OperationMetadataV1) + com.google.appengine.v1.OperationMetadataV1OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.OperationProto + .internal_static_google_appengine_v1_OperationMetadataV1_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.OperationProto + .internal_static_google_appengine_v1_OperationMetadataV1_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.OperationMetadataV1.class, + com.google.appengine.v1.OperationMetadataV1.Builder.class); + } + + // Construct using com.google.appengine.v1.OperationMetadataV1.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(); + method_ = ""; + + if (insertTimeBuilder_ == null) { + insertTime_ = null; + } else { + insertTime_ = null; + insertTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + user_ = ""; + + target_ = ""; + + ephemeralMessage_ = ""; + + warning_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + methodMetadataCase_ = 0; + methodMetadata_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.OperationProto + .internal_static_google_appengine_v1_OperationMetadataV1_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.OperationMetadataV1 getDefaultInstanceForType() { + return com.google.appengine.v1.OperationMetadataV1.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.OperationMetadataV1 build() { + com.google.appengine.v1.OperationMetadataV1 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.OperationMetadataV1 buildPartial() { + com.google.appengine.v1.OperationMetadataV1 result = + new com.google.appengine.v1.OperationMetadataV1(this); + int from_bitField0_ = bitField0_; + result.method_ = method_; + if (insertTimeBuilder_ == null) { + result.insertTime_ = insertTime_; + } else { + result.insertTime_ = insertTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.user_ = user_; + result.target_ = target_; + result.ephemeralMessage_ = ephemeralMessage_; + if (((bitField0_ & 0x00000001) != 0)) { + warning_ = warning_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.warning_ = warning_; + if (methodMetadataCase_ == 8) { + if (createVersionMetadataBuilder_ == null) { + result.methodMetadata_ = methodMetadata_; + } else { + result.methodMetadata_ = createVersionMetadataBuilder_.build(); + } + } + result.methodMetadataCase_ = methodMetadataCase_; + 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.appengine.v1.OperationMetadataV1) { + return mergeFrom((com.google.appengine.v1.OperationMetadataV1) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.OperationMetadataV1 other) { + if (other == com.google.appengine.v1.OperationMetadataV1.getDefaultInstance()) return this; + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + onChanged(); + } + if (other.hasInsertTime()) { + mergeInsertTime(other.getInsertTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getUser().isEmpty()) { + user_ = other.user_; + onChanged(); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getEphemeralMessage().isEmpty()) { + ephemeralMessage_ = other.ephemeralMessage_; + onChanged(); + } + if (!other.warning_.isEmpty()) { + if (warning_.isEmpty()) { + warning_ = other.warning_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWarningIsMutable(); + warning_.addAll(other.warning_); + } + onChanged(); + } + switch (other.getMethodMetadataCase()) { + case CREATE_VERSION_METADATA: + { + mergeCreateVersionMetadata(other.getCreateVersionMetadata()); + break; + } + case METHODMETADATA_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.appengine.v1.OperationMetadataV1 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.OperationMetadataV1) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int methodMetadataCase_ = 0; + private java.lang.Object methodMetadata_; + + public MethodMetadataCase getMethodMetadataCase() { + return MethodMetadataCase.forNumber(methodMetadataCase_); + } + + public Builder clearMethodMetadata() { + methodMetadataCase_ = 0; + methodMetadata_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object method_ = ""; + /** + * + * + *
+     * API method that initiated this operation. Example:
+     * `google.appengine.v1.Versions.CreateVersion`.
+     * @OutputOnly
+     * 
+ * + * string method = 1; + * + * @return The method. + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * API method that initiated this operation. Example:
+     * `google.appengine.v1.Versions.CreateVersion`.
+     * @OutputOnly
+     * 
+ * + * string method = 1; + * + * @return The bytes for method. + */ + public com.google.protobuf.ByteString getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * API method that initiated this operation. Example:
+     * `google.appengine.v1.Versions.CreateVersion`.
+     * @OutputOnly
+     * 
+ * + * string method = 1; + * + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + method_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * API method that initiated this operation. Example:
+     * `google.appengine.v1.Versions.CreateVersion`.
+     * @OutputOnly
+     * 
+ * + * string method = 1; + * + * @return This builder for chaining. + */ + public Builder clearMethod() { + + method_ = getDefaultInstance().getMethod(); + onChanged(); + return this; + } + /** + * + * + *
+     * API method that initiated this operation. Example:
+     * `google.appengine.v1.Versions.CreateVersion`.
+     * @OutputOnly
+     * 
+ * + * string method = 1; + * + * @param value The bytes for method to set. + * @return This builder for chaining. + */ + public Builder setMethodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + method_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp insertTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + insertTimeBuilder_; + /** + * + * + *
+     * Time that this operation was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + * + * @return Whether the insertTime field is set. + */ + public boolean hasInsertTime() { + return insertTimeBuilder_ != null || insertTime_ != null; + } + /** + * + * + *
+     * Time that this operation was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + * + * @return The insertTime. + */ + public com.google.protobuf.Timestamp getInsertTime() { + if (insertTimeBuilder_ == null) { + return insertTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : insertTime_; + } else { + return insertTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time that this operation was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + */ + public Builder setInsertTime(com.google.protobuf.Timestamp value) { + if (insertTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + insertTime_ = value; + onChanged(); + } else { + insertTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time that this operation was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + */ + public Builder setInsertTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (insertTimeBuilder_ == null) { + insertTime_ = builderForValue.build(); + onChanged(); + } else { + insertTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time that this operation was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + */ + public Builder mergeInsertTime(com.google.protobuf.Timestamp value) { + if (insertTimeBuilder_ == null) { + if (insertTime_ != null) { + insertTime_ = + com.google.protobuf.Timestamp.newBuilder(insertTime_).mergeFrom(value).buildPartial(); + } else { + insertTime_ = value; + } + onChanged(); + } else { + insertTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time that this operation was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + */ + public Builder clearInsertTime() { + if (insertTimeBuilder_ == null) { + insertTime_ = null; + onChanged(); + } else { + insertTime_ = null; + insertTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time that this operation was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getInsertTimeBuilder() { + + onChanged(); + return getInsertTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time that this operation was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getInsertTimeOrBuilder() { + if (insertTimeBuilder_ != null) { + return insertTimeBuilder_.getMessageOrBuilder(); + } else { + return insertTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : insertTime_; + } + } + /** + * + * + *
+     * Time that this operation was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getInsertTimeFieldBuilder() { + if (insertTimeBuilder_ == null) { + insertTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInsertTime(), getParentForChildren(), isClean()); + insertTime_ = null; + } + return insertTimeBuilder_; + } + + 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_; + /** + * + * + *
+     * Time that this operation completed.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Time that this operation completed.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @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(); + } + } + /** + * + * + *
+     * Time that this operation completed.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + 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; + } + /** + * + * + *
+     * Time that this operation completed.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time that this operation completed.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + 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; + } + /** + * + * + *
+     * Time that this operation completed.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time that this operation completed.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time that this operation completed.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Time that this operation completed.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + 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 user_ = ""; + /** + * + * + *
+     * User who requested this operation.
+     * @OutputOnly
+     * 
+ * + * string user = 4; + * + * @return The user. + */ + public java.lang.String getUser() { + java.lang.Object ref = user_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + user_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User who requested this operation.
+     * @OutputOnly
+     * 
+ * + * string user = 4; + * + * @return The bytes for user. + */ + public com.google.protobuf.ByteString getUserBytes() { + java.lang.Object ref = user_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + user_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User who requested this operation.
+     * @OutputOnly
+     * 
+ * + * string user = 4; + * + * @param value The user to set. + * @return This builder for chaining. + */ + public Builder setUser(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + user_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * User who requested this operation.
+     * @OutputOnly
+     * 
+ * + * string user = 4; + * + * @return This builder for chaining. + */ + public Builder clearUser() { + + user_ = getDefaultInstance().getUser(); + onChanged(); + return this; + } + /** + * + * + *
+     * User who requested this operation.
+     * @OutputOnly
+     * 
+ * + * string user = 4; + * + * @param value The bytes for user to set. + * @return This builder for chaining. + */ + public Builder setUserBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + user_ = value; + onChanged(); + return this; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Name of the resource that this operation is acting on. Example:
+     * `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the resource that this operation is acting on. Example:
+     * `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the resource that this operation is acting on. Example:
+     * `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Name of the resource that this operation is acting on. Example:
+     * `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * string target = 5; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource that this operation is acting on. Example:
+     * `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * 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 ephemeralMessage_ = ""; + /** + * + * + *
+     * Ephemeral message that may change every time the operation is polled.
+     * @OutputOnly
+     * 
+ * + * string ephemeral_message = 6; + * + * @return The ephemeralMessage. + */ + public java.lang.String getEphemeralMessage() { + java.lang.Object ref = ephemeralMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ephemeralMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Ephemeral message that may change every time the operation is polled.
+     * @OutputOnly
+     * 
+ * + * string ephemeral_message = 6; + * + * @return The bytes for ephemeralMessage. + */ + public com.google.protobuf.ByteString getEphemeralMessageBytes() { + java.lang.Object ref = ephemeralMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ephemeralMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Ephemeral message that may change every time the operation is polled.
+     * @OutputOnly
+     * 
+ * + * string ephemeral_message = 6; + * + * @param value The ephemeralMessage to set. + * @return This builder for chaining. + */ + public Builder setEphemeralMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ephemeralMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Ephemeral message that may change every time the operation is polled.
+     * @OutputOnly
+     * 
+ * + * string ephemeral_message = 6; + * + * @return This builder for chaining. + */ + public Builder clearEphemeralMessage() { + + ephemeralMessage_ = getDefaultInstance().getEphemeralMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Ephemeral message that may change every time the operation is polled.
+     * @OutputOnly
+     * 
+ * + * string ephemeral_message = 6; + * + * @param value The bytes for ephemeralMessage to set. + * @return This builder for chaining. + */ + public Builder setEphemeralMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ephemeralMessage_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList warning_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureWarningIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + warning_ = new com.google.protobuf.LazyStringArrayList(warning_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Durable messages that persist on every operation poll.
+     * @OutputOnly
+     * 
+ * + * repeated string warning = 7; + * + * @return A list containing the warning. + */ + public com.google.protobuf.ProtocolStringList getWarningList() { + return warning_.getUnmodifiableView(); + } + /** + * + * + *
+     * Durable messages that persist on every operation poll.
+     * @OutputOnly
+     * 
+ * + * repeated string warning = 7; + * + * @return The count of warning. + */ + public int getWarningCount() { + return warning_.size(); + } + /** + * + * + *
+     * Durable messages that persist on every operation poll.
+     * @OutputOnly
+     * 
+ * + * repeated string warning = 7; + * + * @param index The index of the element to return. + * @return The warning at the given index. + */ + public java.lang.String getWarning(int index) { + return warning_.get(index); + } + /** + * + * + *
+     * Durable messages that persist on every operation poll.
+     * @OutputOnly
+     * 
+ * + * repeated string warning = 7; + * + * @param index The index of the value to return. + * @return The bytes of the warning at the given index. + */ + public com.google.protobuf.ByteString getWarningBytes(int index) { + return warning_.getByteString(index); + } + /** + * + * + *
+     * Durable messages that persist on every operation poll.
+     * @OutputOnly
+     * 
+ * + * repeated string warning = 7; + * + * @param index The index to set the value at. + * @param value The warning to set. + * @return This builder for chaining. + */ + public Builder setWarning(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningIsMutable(); + warning_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Durable messages that persist on every operation poll.
+     * @OutputOnly
+     * 
+ * + * repeated string warning = 7; + * + * @param value The warning to add. + * @return This builder for chaining. + */ + public Builder addWarning(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningIsMutable(); + warning_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Durable messages that persist on every operation poll.
+     * @OutputOnly
+     * 
+ * + * repeated string warning = 7; + * + * @param values The warning to add. + * @return This builder for chaining. + */ + public Builder addAllWarning(java.lang.Iterable values) { + ensureWarningIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, warning_); + onChanged(); + return this; + } + /** + * + * + *
+     * Durable messages that persist on every operation poll.
+     * @OutputOnly
+     * 
+ * + * repeated string warning = 7; + * + * @return This builder for chaining. + */ + public Builder clearWarning() { + warning_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Durable messages that persist on every operation poll.
+     * @OutputOnly
+     * 
+ * + * repeated string warning = 7; + * + * @param value The bytes of the warning to add. + * @return This builder for chaining. + */ + public Builder addWarningBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWarningIsMutable(); + warning_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CreateVersionMetadataV1, + com.google.appengine.v1.CreateVersionMetadataV1.Builder, + com.google.appengine.v1.CreateVersionMetadataV1OrBuilder> + createVersionMetadataBuilder_; + /** + * .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; + * + * @return Whether the createVersionMetadata field is set. + */ + @java.lang.Override + public boolean hasCreateVersionMetadata() { + return methodMetadataCase_ == 8; + } + /** + * .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; + * + * @return The createVersionMetadata. + */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionMetadataV1 getCreateVersionMetadata() { + if (createVersionMetadataBuilder_ == null) { + if (methodMetadataCase_ == 8) { + return (com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_; + } + return com.google.appengine.v1.CreateVersionMetadataV1.getDefaultInstance(); + } else { + if (methodMetadataCase_ == 8) { + return createVersionMetadataBuilder_.getMessage(); + } + return com.google.appengine.v1.CreateVersionMetadataV1.getDefaultInstance(); + } + } + /** .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; */ + public Builder setCreateVersionMetadata(com.google.appengine.v1.CreateVersionMetadataV1 value) { + if (createVersionMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + methodMetadata_ = value; + onChanged(); + } else { + createVersionMetadataBuilder_.setMessage(value); + } + methodMetadataCase_ = 8; + return this; + } + /** .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; */ + public Builder setCreateVersionMetadata( + com.google.appengine.v1.CreateVersionMetadataV1.Builder builderForValue) { + if (createVersionMetadataBuilder_ == null) { + methodMetadata_ = builderForValue.build(); + onChanged(); + } else { + createVersionMetadataBuilder_.setMessage(builderForValue.build()); + } + methodMetadataCase_ = 8; + return this; + } + /** .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; */ + public Builder mergeCreateVersionMetadata( + com.google.appengine.v1.CreateVersionMetadataV1 value) { + if (createVersionMetadataBuilder_ == null) { + if (methodMetadataCase_ == 8 + && methodMetadata_ + != com.google.appengine.v1.CreateVersionMetadataV1.getDefaultInstance()) { + methodMetadata_ = + com.google.appengine.v1.CreateVersionMetadataV1.newBuilder( + (com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + methodMetadata_ = value; + } + onChanged(); + } else { + if (methodMetadataCase_ == 8) { + createVersionMetadataBuilder_.mergeFrom(value); + } + createVersionMetadataBuilder_.setMessage(value); + } + methodMetadataCase_ = 8; + return this; + } + /** .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; */ + public Builder clearCreateVersionMetadata() { + if (createVersionMetadataBuilder_ == null) { + if (methodMetadataCase_ == 8) { + methodMetadataCase_ = 0; + methodMetadata_ = null; + onChanged(); + } + } else { + if (methodMetadataCase_ == 8) { + methodMetadataCase_ = 0; + methodMetadata_ = null; + } + createVersionMetadataBuilder_.clear(); + } + return this; + } + /** .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; */ + public com.google.appengine.v1.CreateVersionMetadataV1.Builder + getCreateVersionMetadataBuilder() { + return getCreateVersionMetadataFieldBuilder().getBuilder(); + } + /** .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; */ + @java.lang.Override + public com.google.appengine.v1.CreateVersionMetadataV1OrBuilder + getCreateVersionMetadataOrBuilder() { + if ((methodMetadataCase_ == 8) && (createVersionMetadataBuilder_ != null)) { + return createVersionMetadataBuilder_.getMessageOrBuilder(); + } else { + if (methodMetadataCase_ == 8) { + return (com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_; + } + return com.google.appengine.v1.CreateVersionMetadataV1.getDefaultInstance(); + } + } + /** .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CreateVersionMetadataV1, + com.google.appengine.v1.CreateVersionMetadataV1.Builder, + com.google.appengine.v1.CreateVersionMetadataV1OrBuilder> + getCreateVersionMetadataFieldBuilder() { + if (createVersionMetadataBuilder_ == null) { + if (!(methodMetadataCase_ == 8)) { + methodMetadata_ = com.google.appengine.v1.CreateVersionMetadataV1.getDefaultInstance(); + } + createVersionMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.CreateVersionMetadataV1, + com.google.appengine.v1.CreateVersionMetadataV1.Builder, + com.google.appengine.v1.CreateVersionMetadataV1OrBuilder>( + (com.google.appengine.v1.CreateVersionMetadataV1) methodMetadata_, + getParentForChildren(), + isClean()); + methodMetadata_ = null; + } + methodMetadataCase_ = 8; + onChanged(); + ; + return createVersionMetadataBuilder_; + } + + @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.appengine.v1.OperationMetadataV1) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.OperationMetadataV1) + private static final com.google.appengine.v1.OperationMetadataV1 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.OperationMetadataV1(); + } + + public static com.google.appengine.v1.OperationMetadataV1 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadataV1 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadataV1(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.appengine.v1.OperationMetadataV1 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationMetadataV1OrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationMetadataV1OrBuilder.java new file mode 100644 index 00000000..06542421 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationMetadataV1OrBuilder.java @@ -0,0 +1,285 @@ +/* + * 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/appengine/v1/operation.proto + +package com.google.appengine.v1; + +public interface OperationMetadataV1OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.OperationMetadataV1) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * API method that initiated this operation. Example:
+   * `google.appengine.v1.Versions.CreateVersion`.
+   * @OutputOnly
+   * 
+ * + * string method = 1; + * + * @return The method. + */ + java.lang.String getMethod(); + /** + * + * + *
+   * API method that initiated this operation. Example:
+   * `google.appengine.v1.Versions.CreateVersion`.
+   * @OutputOnly
+   * 
+ * + * string method = 1; + * + * @return The bytes for method. + */ + com.google.protobuf.ByteString getMethodBytes(); + + /** + * + * + *
+   * Time that this operation was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + * + * @return Whether the insertTime field is set. + */ + boolean hasInsertTime(); + /** + * + * + *
+   * Time that this operation was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + * + * @return The insertTime. + */ + com.google.protobuf.Timestamp getInsertTime(); + /** + * + * + *
+   * Time that this operation was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp insert_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getInsertTimeOrBuilder(); + + /** + * + * + *
+   * Time that this operation completed.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Time that this operation completed.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Time that this operation completed.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * User who requested this operation.
+   * @OutputOnly
+   * 
+ * + * string user = 4; + * + * @return The user. + */ + java.lang.String getUser(); + /** + * + * + *
+   * User who requested this operation.
+   * @OutputOnly
+   * 
+ * + * string user = 4; + * + * @return The bytes for user. + */ + com.google.protobuf.ByteString getUserBytes(); + + /** + * + * + *
+   * Name of the resource that this operation is acting on. Example:
+   * `apps/myapp/services/default`.
+   * @OutputOnly
+   * 
+ * + * string target = 5; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Name of the resource that this operation is acting on. Example:
+   * `apps/myapp/services/default`.
+   * @OutputOnly
+   * 
+ * + * string target = 5; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Ephemeral message that may change every time the operation is polled.
+   * @OutputOnly
+   * 
+ * + * string ephemeral_message = 6; + * + * @return The ephemeralMessage. + */ + java.lang.String getEphemeralMessage(); + /** + * + * + *
+   * Ephemeral message that may change every time the operation is polled.
+   * @OutputOnly
+   * 
+ * + * string ephemeral_message = 6; + * + * @return The bytes for ephemeralMessage. + */ + com.google.protobuf.ByteString getEphemeralMessageBytes(); + + /** + * + * + *
+   * Durable messages that persist on every operation poll.
+   * @OutputOnly
+   * 
+ * + * repeated string warning = 7; + * + * @return A list containing the warning. + */ + java.util.List getWarningList(); + /** + * + * + *
+   * Durable messages that persist on every operation poll.
+   * @OutputOnly
+   * 
+ * + * repeated string warning = 7; + * + * @return The count of warning. + */ + int getWarningCount(); + /** + * + * + *
+   * Durable messages that persist on every operation poll.
+   * @OutputOnly
+   * 
+ * + * repeated string warning = 7; + * + * @param index The index of the element to return. + * @return The warning at the given index. + */ + java.lang.String getWarning(int index); + /** + * + * + *
+   * Durable messages that persist on every operation poll.
+   * @OutputOnly
+   * 
+ * + * repeated string warning = 7; + * + * @param index The index of the value to return. + * @return The bytes of the warning at the given index. + */ + com.google.protobuf.ByteString getWarningBytes(int index); + + /** + * .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; + * + * @return Whether the createVersionMetadata field is set. + */ + boolean hasCreateVersionMetadata(); + /** + * .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; + * + * @return The createVersionMetadata. + */ + com.google.appengine.v1.CreateVersionMetadataV1 getCreateVersionMetadata(); + /** .google.appengine.v1.CreateVersionMetadataV1 create_version_metadata = 8; */ + com.google.appengine.v1.CreateVersionMetadataV1OrBuilder getCreateVersionMetadataOrBuilder(); + + public com.google.appengine.v1.OperationMetadataV1.MethodMetadataCase getMethodMetadataCase(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationProto.java new file mode 100644 index 00000000..e74bfce8 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/OperationProto.java @@ -0,0 +1,104 @@ +/* + * 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/appengine/v1/operation.proto + +package com.google.appengine.v1; + +public final class OperationProto { + private OperationProto() {} + + 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_appengine_v1_OperationMetadataV1_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_OperationMetadataV1_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_CreateVersionMetadataV1_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_CreateVersionMetadataV1_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/appengine/v1/operation.proto\022\023g" + + "oogle.appengine.v1\032\036google/protobuf/dura" + + "tion.proto\032\037google/protobuf/timestamp.pr" + + "oto\032\034google/api/annotations.proto\"\262\002\n\023Op" + + "erationMetadataV1\022\016\n\006method\030\001 \001(\t\022/\n\013ins" + + "ert_time\030\002 \001(\0132\032.google.protobuf.Timesta" + + "mp\022,\n\010end_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestamp\022\014\n\004user\030\004 \001(\t\022\016\n\006target\030\005 \001(\t\022\031" + + "\n\021ephemeral_message\030\006 \001(\t\022\017\n\007warning\030\007 \003" + + "(\t\022O\n\027create_version_metadata\030\010 \001(\0132,.go" + + "ogle.appengine.v1.CreateVersionMetadataV" + + "1H\000B\021\n\017method_metadata\"1\n\027CreateVersionM" + + "etadataV1\022\026\n\016cloud_build_id\030\001 \001(\tB\300\001\n\027co" + + "m.google.appengine.v1B\016OperationProtoP\001Z" + + " + * Readiness checking configuration for VM instances. Unhealthy instances + * are removed from traffic rotation. + * + * + * Protobuf type {@code google.appengine.v1.ReadinessCheck} + */ +public final class ReadinessCheck extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ReadinessCheck) + ReadinessCheckOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadinessCheck.newBuilder() to construct. + private ReadinessCheck(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReadinessCheck() { + path_ = ""; + host_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReadinessCheck(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReadinessCheck( + 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(); + + path_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + host_ = s; + break; + } + case 24: + { + failureThreshold_ = input.readUInt32(); + break; + } + case 32: + { + successThreshold_ = input.readUInt32(); + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (checkInterval_ != null) { + subBuilder = checkInterval_.toBuilder(); + } + checkInterval_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(checkInterval_); + checkInterval_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeout_ != null) { + subBuilder = timeout_.toBuilder(); + } + timeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeout_); + timeout_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (appStartTimeout_ != null) { + subBuilder = appStartTimeout_.toBuilder(); + } + appStartTimeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(appStartTimeout_); + appStartTimeout_ = 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ReadinessCheck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ReadinessCheck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ReadinessCheck.class, + com.google.appengine.v1.ReadinessCheck.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object path_; + /** + * + * + *
+   * The request path.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * The request path.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOST_FIELD_NUMBER = 2; + private volatile java.lang.Object host_; + /** + * + * + *
+   * Host header to send when performing a HTTP Readiness check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } + } + /** + * + * + *
+   * Host header to send when performing a HTTP Readiness check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAILURE_THRESHOLD_FIELD_NUMBER = 3; + private int failureThreshold_; + /** + * + * + *
+   * Number of consecutive failed checks required before removing
+   * traffic.
+   * 
+ * + * uint32 failure_threshold = 3; + * + * @return The failureThreshold. + */ + @java.lang.Override + public int getFailureThreshold() { + return failureThreshold_; + } + + public static final int SUCCESS_THRESHOLD_FIELD_NUMBER = 4; + private int successThreshold_; + /** + * + * + *
+   * Number of consecutive successful checks required before receiving
+   * traffic.
+   * 
+ * + * uint32 success_threshold = 4; + * + * @return The successThreshold. + */ + @java.lang.Override + public int getSuccessThreshold() { + return successThreshold_; + } + + public static final int CHECK_INTERVAL_FIELD_NUMBER = 5; + private com.google.protobuf.Duration checkInterval_; + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return Whether the checkInterval field is set. + */ + @java.lang.Override + public boolean hasCheckInterval() { + return checkInterval_ != null; + } + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return The checkInterval. + */ + @java.lang.Override + public com.google.protobuf.Duration getCheckInterval() { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() { + return getCheckInterval(); + } + + public static final int TIMEOUT_FIELD_NUMBER = 6; + private com.google.protobuf.Duration timeout_; + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return Whether the timeout field is set. + */ + @java.lang.Override + public boolean hasTimeout() { + return timeout_ != null; + } + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return The timeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeout() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + return getTimeout(); + } + + public static final int APP_START_TIMEOUT_FIELD_NUMBER = 7; + private com.google.protobuf.Duration appStartTimeout_; + /** + * + * + *
+   * A maximum time limit on application initialization, measured from moment
+   * the application successfully replies to a healthcheck until it is ready to
+   * serve traffic.
+   * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + * + * @return Whether the appStartTimeout field is set. + */ + @java.lang.Override + public boolean hasAppStartTimeout() { + return appStartTimeout_ != null; + } + /** + * + * + *
+   * A maximum time limit on application initialization, measured from moment
+   * the application successfully replies to a healthcheck until it is ready to
+   * serve traffic.
+   * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + * + * @return The appStartTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getAppStartTimeout() { + return appStartTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : appStartTimeout_; + } + /** + * + * + *
+   * A maximum time limit on application initialization, measured from moment
+   * the application successfully replies to a healthcheck until it is ready to
+   * serve traffic.
+   * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getAppStartTimeoutOrBuilder() { + return getAppStartTimeout(); + } + + 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 (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + if (!getHostBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, host_); + } + if (failureThreshold_ != 0) { + output.writeUInt32(3, failureThreshold_); + } + if (successThreshold_ != 0) { + output.writeUInt32(4, successThreshold_); + } + if (checkInterval_ != null) { + output.writeMessage(5, getCheckInterval()); + } + if (timeout_ != null) { + output.writeMessage(6, getTimeout()); + } + if (appStartTimeout_ != null) { + output.writeMessage(7, getAppStartTimeout()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + if (!getHostBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, host_); + } + if (failureThreshold_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, failureThreshold_); + } + if (successThreshold_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, successThreshold_); + } + if (checkInterval_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCheckInterval()); + } + if (timeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTimeout()); + } + if (appStartTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAppStartTimeout()); + } + 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.appengine.v1.ReadinessCheck)) { + return super.equals(obj); + } + com.google.appengine.v1.ReadinessCheck other = (com.google.appengine.v1.ReadinessCheck) obj; + + if (!getPath().equals(other.getPath())) return false; + if (!getHost().equals(other.getHost())) return false; + if (getFailureThreshold() != other.getFailureThreshold()) return false; + if (getSuccessThreshold() != other.getSuccessThreshold()) return false; + if (hasCheckInterval() != other.hasCheckInterval()) return false; + if (hasCheckInterval()) { + if (!getCheckInterval().equals(other.getCheckInterval())) return false; + } + if (hasTimeout() != other.hasTimeout()) return false; + if (hasTimeout()) { + if (!getTimeout().equals(other.getTimeout())) return false; + } + if (hasAppStartTimeout() != other.hasAppStartTimeout()) return false; + if (hasAppStartTimeout()) { + if (!getAppStartTimeout().equals(other.getAppStartTimeout())) 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) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (37 * hash) + FAILURE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getFailureThreshold(); + hash = (37 * hash) + SUCCESS_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getSuccessThreshold(); + if (hasCheckInterval()) { + hash = (37 * hash) + CHECK_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getCheckInterval().hashCode(); + } + if (hasTimeout()) { + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout().hashCode(); + } + if (hasAppStartTimeout()) { + hash = (37 * hash) + APP_START_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getAppStartTimeout().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ReadinessCheck parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ReadinessCheck parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ReadinessCheck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ReadinessCheck 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.appengine.v1.ReadinessCheck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ReadinessCheck parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ReadinessCheck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ReadinessCheck 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.appengine.v1.ReadinessCheck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ReadinessCheck 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.appengine.v1.ReadinessCheck parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ReadinessCheck 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.appengine.v1.ReadinessCheck 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; + } + /** + * + * + *
+   * Readiness checking configuration for VM instances. Unhealthy instances
+   * are removed from traffic rotation.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ReadinessCheck} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ReadinessCheck) + com.google.appengine.v1.ReadinessCheckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ReadinessCheck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ReadinessCheck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ReadinessCheck.class, + com.google.appengine.v1.ReadinessCheck.Builder.class); + } + + // Construct using com.google.appengine.v1.ReadinessCheck.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(); + path_ = ""; + + host_ = ""; + + failureThreshold_ = 0; + + successThreshold_ = 0; + + if (checkIntervalBuilder_ == null) { + checkInterval_ = null; + } else { + checkInterval_ = null; + checkIntervalBuilder_ = null; + } + if (timeoutBuilder_ == null) { + timeout_ = null; + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + if (appStartTimeoutBuilder_ == null) { + appStartTimeout_ = null; + } else { + appStartTimeout_ = null; + appStartTimeoutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ReadinessCheck_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ReadinessCheck getDefaultInstanceForType() { + return com.google.appengine.v1.ReadinessCheck.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ReadinessCheck build() { + com.google.appengine.v1.ReadinessCheck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ReadinessCheck buildPartial() { + com.google.appengine.v1.ReadinessCheck result = + new com.google.appengine.v1.ReadinessCheck(this); + result.path_ = path_; + result.host_ = host_; + result.failureThreshold_ = failureThreshold_; + result.successThreshold_ = successThreshold_; + if (checkIntervalBuilder_ == null) { + result.checkInterval_ = checkInterval_; + } else { + result.checkInterval_ = checkIntervalBuilder_.build(); + } + if (timeoutBuilder_ == null) { + result.timeout_ = timeout_; + } else { + result.timeout_ = timeoutBuilder_.build(); + } + if (appStartTimeoutBuilder_ == null) { + result.appStartTimeout_ = appStartTimeout_; + } else { + result.appStartTimeout_ = appStartTimeoutBuilder_.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.appengine.v1.ReadinessCheck) { + return mergeFrom((com.google.appengine.v1.ReadinessCheck) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ReadinessCheck other) { + if (other == com.google.appengine.v1.ReadinessCheck.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + if (!other.getHost().isEmpty()) { + host_ = other.host_; + onChanged(); + } + if (other.getFailureThreshold() != 0) { + setFailureThreshold(other.getFailureThreshold()); + } + if (other.getSuccessThreshold() != 0) { + setSuccessThreshold(other.getSuccessThreshold()); + } + if (other.hasCheckInterval()) { + mergeCheckInterval(other.getCheckInterval()); + } + if (other.hasTimeout()) { + mergeTimeout(other.getTimeout()); + } + if (other.hasAppStartTimeout()) { + mergeAppStartTimeout(other.getAppStartTimeout()); + } + 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.appengine.v1.ReadinessCheck parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ReadinessCheck) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * The request path.
+     * 
+ * + * string path = 1; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + + private java.lang.Object host_ = ""; + /** + * + * + *
+     * Host header to send when performing a HTTP Readiness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Host header to send when performing a HTTP Readiness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @return The bytes for host. + */ + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Host header to send when performing a HTTP Readiness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + host_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Host header to send when performing a HTTP Readiness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @return This builder for chaining. + */ + public Builder clearHost() { + + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + * + * + *
+     * Host header to send when performing a HTTP Readiness check.
+     * Example: "myapp.appspot.com"
+     * 
+ * + * string host = 2; + * + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + host_ = value; + onChanged(); + return this; + } + + private int failureThreshold_; + /** + * + * + *
+     * Number of consecutive failed checks required before removing
+     * traffic.
+     * 
+ * + * uint32 failure_threshold = 3; + * + * @return The failureThreshold. + */ + @java.lang.Override + public int getFailureThreshold() { + return failureThreshold_; + } + /** + * + * + *
+     * Number of consecutive failed checks required before removing
+     * traffic.
+     * 
+ * + * uint32 failure_threshold = 3; + * + * @param value The failureThreshold to set. + * @return This builder for chaining. + */ + public Builder setFailureThreshold(int value) { + + failureThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of consecutive failed checks required before removing
+     * traffic.
+     * 
+ * + * uint32 failure_threshold = 3; + * + * @return This builder for chaining. + */ + public Builder clearFailureThreshold() { + + failureThreshold_ = 0; + onChanged(); + return this; + } + + private int successThreshold_; + /** + * + * + *
+     * Number of consecutive successful checks required before receiving
+     * traffic.
+     * 
+ * + * uint32 success_threshold = 4; + * + * @return The successThreshold. + */ + @java.lang.Override + public int getSuccessThreshold() { + return successThreshold_; + } + /** + * + * + *
+     * Number of consecutive successful checks required before receiving
+     * traffic.
+     * 
+ * + * uint32 success_threshold = 4; + * + * @param value The successThreshold to set. + * @return This builder for chaining. + */ + public Builder setSuccessThreshold(int value) { + + successThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of consecutive successful checks required before receiving
+     * traffic.
+     * 
+ * + * uint32 success_threshold = 4; + * + * @return This builder for chaining. + */ + public Builder clearSuccessThreshold() { + + successThreshold_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration checkInterval_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + checkIntervalBuilder_; + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return Whether the checkInterval field is set. + */ + public boolean hasCheckInterval() { + return checkIntervalBuilder_ != null || checkInterval_ != null; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return The checkInterval. + */ + public com.google.protobuf.Duration getCheckInterval() { + if (checkIntervalBuilder_ == null) { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } else { + return checkIntervalBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public Builder setCheckInterval(com.google.protobuf.Duration value) { + if (checkIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + checkInterval_ = value; + onChanged(); + } else { + checkIntervalBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public Builder setCheckInterval(com.google.protobuf.Duration.Builder builderForValue) { + if (checkIntervalBuilder_ == null) { + checkInterval_ = builderForValue.build(); + onChanged(); + } else { + checkIntervalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public Builder mergeCheckInterval(com.google.protobuf.Duration value) { + if (checkIntervalBuilder_ == null) { + if (checkInterval_ != null) { + checkInterval_ = + com.google.protobuf.Duration.newBuilder(checkInterval_) + .mergeFrom(value) + .buildPartial(); + } else { + checkInterval_ = value; + } + onChanged(); + } else { + checkIntervalBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public Builder clearCheckInterval() { + if (checkIntervalBuilder_ == null) { + checkInterval_ = null; + onChanged(); + } else { + checkInterval_ = null; + checkIntervalBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public com.google.protobuf.Duration.Builder getCheckIntervalBuilder() { + + onChanged(); + return getCheckIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() { + if (checkIntervalBuilder_ != null) { + return checkIntervalBuilder_.getMessageOrBuilder(); + } else { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } + } + /** + * + * + *
+     * Interval between health checks.
+     * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getCheckIntervalFieldBuilder() { + if (checkIntervalBuilder_ == null) { + checkIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getCheckInterval(), getParentForChildren(), isClean()); + checkInterval_ = null; + } + return checkIntervalBuilder_; + } + + private com.google.protobuf.Duration timeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeoutBuilder_; + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return timeoutBuilder_ != null || timeout_ != null; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return The timeout. + */ + public com.google.protobuf.Duration getTimeout() { + if (timeoutBuilder_ == null) { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } else { + return timeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public Builder setTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeout_ = value; + onChanged(); + } else { + timeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (timeoutBuilder_ == null) { + timeout_ = builderForValue.build(); + onChanged(); + } else { + timeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public Builder mergeTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (timeout_ != null) { + timeout_ = + com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial(); + } else { + timeout_ = value; + } + onChanged(); + } else { + timeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public Builder clearTimeout() { + if (timeoutBuilder_ == null) { + timeout_ = null; + onChanged(); + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public com.google.protobuf.Duration.Builder getTimeoutBuilder() { + + onChanged(); + return getTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + if (timeoutBuilder_ != null) { + return timeoutBuilder_.getMessageOrBuilder(); + } else { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + } + /** + * + * + *
+     * Time before the check is considered failed.
+     * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeoutFieldBuilder() { + if (timeoutBuilder_ == null) { + timeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeout(), getParentForChildren(), isClean()); + timeout_ = null; + } + return timeoutBuilder_; + } + + private com.google.protobuf.Duration appStartTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + appStartTimeoutBuilder_; + /** + * + * + *
+     * A maximum time limit on application initialization, measured from moment
+     * the application successfully replies to a healthcheck until it is ready to
+     * serve traffic.
+     * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + * + * @return Whether the appStartTimeout field is set. + */ + public boolean hasAppStartTimeout() { + return appStartTimeoutBuilder_ != null || appStartTimeout_ != null; + } + /** + * + * + *
+     * A maximum time limit on application initialization, measured from moment
+     * the application successfully replies to a healthcheck until it is ready to
+     * serve traffic.
+     * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + * + * @return The appStartTimeout. + */ + public com.google.protobuf.Duration getAppStartTimeout() { + if (appStartTimeoutBuilder_ == null) { + return appStartTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : appStartTimeout_; + } else { + return appStartTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A maximum time limit on application initialization, measured from moment
+     * the application successfully replies to a healthcheck until it is ready to
+     * serve traffic.
+     * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + */ + public Builder setAppStartTimeout(com.google.protobuf.Duration value) { + if (appStartTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + appStartTimeout_ = value; + onChanged(); + } else { + appStartTimeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A maximum time limit on application initialization, measured from moment
+     * the application successfully replies to a healthcheck until it is ready to
+     * serve traffic.
+     * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + */ + public Builder setAppStartTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (appStartTimeoutBuilder_ == null) { + appStartTimeout_ = builderForValue.build(); + onChanged(); + } else { + appStartTimeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A maximum time limit on application initialization, measured from moment
+     * the application successfully replies to a healthcheck until it is ready to
+     * serve traffic.
+     * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + */ + public Builder mergeAppStartTimeout(com.google.protobuf.Duration value) { + if (appStartTimeoutBuilder_ == null) { + if (appStartTimeout_ != null) { + appStartTimeout_ = + com.google.protobuf.Duration.newBuilder(appStartTimeout_) + .mergeFrom(value) + .buildPartial(); + } else { + appStartTimeout_ = value; + } + onChanged(); + } else { + appStartTimeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A maximum time limit on application initialization, measured from moment
+     * the application successfully replies to a healthcheck until it is ready to
+     * serve traffic.
+     * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + */ + public Builder clearAppStartTimeout() { + if (appStartTimeoutBuilder_ == null) { + appStartTimeout_ = null; + onChanged(); + } else { + appStartTimeout_ = null; + appStartTimeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A maximum time limit on application initialization, measured from moment
+     * the application successfully replies to a healthcheck until it is ready to
+     * serve traffic.
+     * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + */ + public com.google.protobuf.Duration.Builder getAppStartTimeoutBuilder() { + + onChanged(); + return getAppStartTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A maximum time limit on application initialization, measured from moment
+     * the application successfully replies to a healthcheck until it is ready to
+     * serve traffic.
+     * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + */ + public com.google.protobuf.DurationOrBuilder getAppStartTimeoutOrBuilder() { + if (appStartTimeoutBuilder_ != null) { + return appStartTimeoutBuilder_.getMessageOrBuilder(); + } else { + return appStartTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : appStartTimeout_; + } + } + /** + * + * + *
+     * A maximum time limit on application initialization, measured from moment
+     * the application successfully replies to a healthcheck until it is ready to
+     * serve traffic.
+     * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getAppStartTimeoutFieldBuilder() { + if (appStartTimeoutBuilder_ == null) { + appStartTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getAppStartTimeout(), getParentForChildren(), isClean()); + appStartTimeout_ = null; + } + return appStartTimeoutBuilder_; + } + + @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.appengine.v1.ReadinessCheck) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ReadinessCheck) + private static final com.google.appengine.v1.ReadinessCheck DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ReadinessCheck(); + } + + public static com.google.appengine.v1.ReadinessCheck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadinessCheck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadinessCheck(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.appengine.v1.ReadinessCheck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ReadinessCheckOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ReadinessCheckOrBuilder.java new file mode 100644 index 00000000..dd3fd43c --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ReadinessCheckOrBuilder.java @@ -0,0 +1,216 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface ReadinessCheckOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ReadinessCheck) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The request path.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * The request path.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * Host header to send when performing a HTTP Readiness check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The host. + */ + java.lang.String getHost(); + /** + * + * + *
+   * Host header to send when performing a HTTP Readiness check.
+   * Example: "myapp.appspot.com"
+   * 
+ * + * string host = 2; + * + * @return The bytes for host. + */ + com.google.protobuf.ByteString getHostBytes(); + + /** + * + * + *
+   * Number of consecutive failed checks required before removing
+   * traffic.
+   * 
+ * + * uint32 failure_threshold = 3; + * + * @return The failureThreshold. + */ + int getFailureThreshold(); + + /** + * + * + *
+   * Number of consecutive successful checks required before receiving
+   * traffic.
+   * 
+ * + * uint32 success_threshold = 4; + * + * @return The successThreshold. + */ + int getSuccessThreshold(); + + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return Whether the checkInterval field is set. + */ + boolean hasCheckInterval(); + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + * + * @return The checkInterval. + */ + com.google.protobuf.Duration getCheckInterval(); + /** + * + * + *
+   * Interval between health checks.
+   * 
+ * + * .google.protobuf.Duration check_interval = 5; + */ + com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder(); + + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + * + * @return The timeout. + */ + com.google.protobuf.Duration getTimeout(); + /** + * + * + *
+   * Time before the check is considered failed.
+   * 
+ * + * .google.protobuf.Duration timeout = 6; + */ + com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); + + /** + * + * + *
+   * A maximum time limit on application initialization, measured from moment
+   * the application successfully replies to a healthcheck until it is ready to
+   * serve traffic.
+   * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + * + * @return Whether the appStartTimeout field is set. + */ + boolean hasAppStartTimeout(); + /** + * + * + *
+   * A maximum time limit on application initialization, measured from moment
+   * the application successfully replies to a healthcheck until it is ready to
+   * serve traffic.
+   * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + * + * @return The appStartTimeout. + */ + com.google.protobuf.Duration getAppStartTimeout(); + /** + * + * + *
+   * A maximum time limit on application initialization, measured from moment
+   * the application successfully replies to a healthcheck until it is ready to
+   * serve traffic.
+   * 
+ * + * .google.protobuf.Duration app_start_timeout = 7; + */ + com.google.protobuf.DurationOrBuilder getAppStartTimeoutOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RepairApplicationRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RepairApplicationRequest.java new file mode 100644 index 00000000..c9d43b97 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RepairApplicationRequest.java @@ -0,0 +1,635 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for 'Applications.RepairApplication'.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.RepairApplicationRequest} + */ +public final class RepairApplicationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.RepairApplicationRequest) + RepairApplicationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RepairApplicationRequest.newBuilder() to construct. + private RepairApplicationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RepairApplicationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RepairApplicationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RepairApplicationRequest( + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_RepairApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_RepairApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.RepairApplicationRequest.class, + com.google.appengine.v1.RepairApplicationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the application to repair. Example: `apps/myapp`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the application to repair. Example: `apps/myapp`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.RepairApplicationRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.RepairApplicationRequest other = + (com.google.appengine.v1.RepairApplicationRequest) 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.appengine.v1.RepairApplicationRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.RepairApplicationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.RepairApplicationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.RepairApplicationRequest 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.appengine.v1.RepairApplicationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.RepairApplicationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.RepairApplicationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.RepairApplicationRequest 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.appengine.v1.RepairApplicationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.RepairApplicationRequest 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.appengine.v1.RepairApplicationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.RepairApplicationRequest 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.appengine.v1.RepairApplicationRequest 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 message for 'Applications.RepairApplication'.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.RepairApplicationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.RepairApplicationRequest) + com.google.appengine.v1.RepairApplicationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_RepairApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_RepairApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.RepairApplicationRequest.class, + com.google.appengine.v1.RepairApplicationRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.RepairApplicationRequest.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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_RepairApplicationRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.RepairApplicationRequest getDefaultInstanceForType() { + return com.google.appengine.v1.RepairApplicationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.RepairApplicationRequest build() { + com.google.appengine.v1.RepairApplicationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.RepairApplicationRequest buildPartial() { + com.google.appengine.v1.RepairApplicationRequest result = + new com.google.appengine.v1.RepairApplicationRequest(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.appengine.v1.RepairApplicationRequest) { + return mergeFrom((com.google.appengine.v1.RepairApplicationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.RepairApplicationRequest other) { + if (other == com.google.appengine.v1.RepairApplicationRequest.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.appengine.v1.RepairApplicationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.RepairApplicationRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the application to repair. Example: `apps/myapp`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the application to repair. Example: `apps/myapp`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the application to repair. Example: `apps/myapp`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the application to repair. Example: `apps/myapp`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the application to repair. Example: `apps/myapp`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.RepairApplicationRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.RepairApplicationRequest) + private static final com.google.appengine.v1.RepairApplicationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.RepairApplicationRequest(); + } + + public static com.google.appengine.v1.RepairApplicationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RepairApplicationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RepairApplicationRequest(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.appengine.v1.RepairApplicationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RepairApplicationRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RepairApplicationRequestOrBuilder.java new file mode 100644 index 00000000..fb261335 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RepairApplicationRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface RepairApplicationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.RepairApplicationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the application to repair. Example: `apps/myapp`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the application to repair. Example: `apps/myapp`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RequestUtilization.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RequestUtilization.java new file mode 100644 index 00000000..6d977201 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RequestUtilization.java @@ -0,0 +1,637 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Target scaling by request utilization.
+ * Only applicable in the App Engine flexible environment.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.RequestUtilization} + */ +public final class RequestUtilization extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.RequestUtilization) + RequestUtilizationOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestUtilization.newBuilder() to construct. + private RequestUtilization(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RequestUtilization() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RequestUtilization(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RequestUtilization( + 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: + { + targetRequestCountPerSecond_ = input.readInt32(); + break; + } + case 16: + { + targetConcurrentRequests_ = input.readInt32(); + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_RequestUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_RequestUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.RequestUtilization.class, + com.google.appengine.v1.RequestUtilization.Builder.class); + } + + public static final int TARGET_REQUEST_COUNT_PER_SECOND_FIELD_NUMBER = 1; + private int targetRequestCountPerSecond_; + /** + * + * + *
+   * Target requests per second.
+   * 
+ * + * int32 target_request_count_per_second = 1; + * + * @return The targetRequestCountPerSecond. + */ + @java.lang.Override + public int getTargetRequestCountPerSecond() { + return targetRequestCountPerSecond_; + } + + public static final int TARGET_CONCURRENT_REQUESTS_FIELD_NUMBER = 2; + private int targetConcurrentRequests_; + /** + * + * + *
+   * Target number of concurrent requests.
+   * 
+ * + * int32 target_concurrent_requests = 2; + * + * @return The targetConcurrentRequests. + */ + @java.lang.Override + public int getTargetConcurrentRequests() { + return targetConcurrentRequests_; + } + + 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 (targetRequestCountPerSecond_ != 0) { + output.writeInt32(1, targetRequestCountPerSecond_); + } + if (targetConcurrentRequests_ != 0) { + output.writeInt32(2, targetConcurrentRequests_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetRequestCountPerSecond_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(1, targetRequestCountPerSecond_); + } + if (targetConcurrentRequests_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, targetConcurrentRequests_); + } + 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.appengine.v1.RequestUtilization)) { + return super.equals(obj); + } + com.google.appengine.v1.RequestUtilization other = + (com.google.appengine.v1.RequestUtilization) obj; + + if (getTargetRequestCountPerSecond() != other.getTargetRequestCountPerSecond()) return false; + if (getTargetConcurrentRequests() != other.getTargetConcurrentRequests()) 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_REQUEST_COUNT_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + getTargetRequestCountPerSecond(); + hash = (37 * hash) + TARGET_CONCURRENT_REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getTargetConcurrentRequests(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.RequestUtilization parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.RequestUtilization parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.RequestUtilization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.RequestUtilization 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.appengine.v1.RequestUtilization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.RequestUtilization parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.RequestUtilization parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.RequestUtilization 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.appengine.v1.RequestUtilization parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.RequestUtilization 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.appengine.v1.RequestUtilization parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.RequestUtilization 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.appengine.v1.RequestUtilization 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; + } + /** + * + * + *
+   * Target scaling by request utilization.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.RequestUtilization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.RequestUtilization) + com.google.appengine.v1.RequestUtilizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_RequestUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_RequestUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.RequestUtilization.class, + com.google.appengine.v1.RequestUtilization.Builder.class); + } + + // Construct using com.google.appengine.v1.RequestUtilization.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(); + targetRequestCountPerSecond_ = 0; + + targetConcurrentRequests_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_RequestUtilization_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.RequestUtilization getDefaultInstanceForType() { + return com.google.appengine.v1.RequestUtilization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.RequestUtilization build() { + com.google.appengine.v1.RequestUtilization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.RequestUtilization buildPartial() { + com.google.appengine.v1.RequestUtilization result = + new com.google.appengine.v1.RequestUtilization(this); + result.targetRequestCountPerSecond_ = targetRequestCountPerSecond_; + result.targetConcurrentRequests_ = targetConcurrentRequests_; + 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.appengine.v1.RequestUtilization) { + return mergeFrom((com.google.appengine.v1.RequestUtilization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.RequestUtilization other) { + if (other == com.google.appengine.v1.RequestUtilization.getDefaultInstance()) return this; + if (other.getTargetRequestCountPerSecond() != 0) { + setTargetRequestCountPerSecond(other.getTargetRequestCountPerSecond()); + } + if (other.getTargetConcurrentRequests() != 0) { + setTargetConcurrentRequests(other.getTargetConcurrentRequests()); + } + 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.appengine.v1.RequestUtilization parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.RequestUtilization) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int targetRequestCountPerSecond_; + /** + * + * + *
+     * Target requests per second.
+     * 
+ * + * int32 target_request_count_per_second = 1; + * + * @return The targetRequestCountPerSecond. + */ + @java.lang.Override + public int getTargetRequestCountPerSecond() { + return targetRequestCountPerSecond_; + } + /** + * + * + *
+     * Target requests per second.
+     * 
+ * + * int32 target_request_count_per_second = 1; + * + * @param value The targetRequestCountPerSecond to set. + * @return This builder for chaining. + */ + public Builder setTargetRequestCountPerSecond(int value) { + + targetRequestCountPerSecond_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target requests per second.
+     * 
+ * + * int32 target_request_count_per_second = 1; + * + * @return This builder for chaining. + */ + public Builder clearTargetRequestCountPerSecond() { + + targetRequestCountPerSecond_ = 0; + onChanged(); + return this; + } + + private int targetConcurrentRequests_; + /** + * + * + *
+     * Target number of concurrent requests.
+     * 
+ * + * int32 target_concurrent_requests = 2; + * + * @return The targetConcurrentRequests. + */ + @java.lang.Override + public int getTargetConcurrentRequests() { + return targetConcurrentRequests_; + } + /** + * + * + *
+     * Target number of concurrent requests.
+     * 
+ * + * int32 target_concurrent_requests = 2; + * + * @param value The targetConcurrentRequests to set. + * @return This builder for chaining. + */ + public Builder setTargetConcurrentRequests(int value) { + + targetConcurrentRequests_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target number of concurrent requests.
+     * 
+ * + * int32 target_concurrent_requests = 2; + * + * @return This builder for chaining. + */ + public Builder clearTargetConcurrentRequests() { + + targetConcurrentRequests_ = 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.appengine.v1.RequestUtilization) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.RequestUtilization) + private static final com.google.appengine.v1.RequestUtilization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.RequestUtilization(); + } + + public static com.google.appengine.v1.RequestUtilization getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestUtilization parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RequestUtilization(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.appengine.v1.RequestUtilization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RequestUtilizationOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RequestUtilizationOrBuilder.java new file mode 100644 index 00000000..164ee266 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/RequestUtilizationOrBuilder.java @@ -0,0 +1,51 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface RequestUtilizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.RequestUtilization) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target requests per second.
+   * 
+ * + * int32 target_request_count_per_second = 1; + * + * @return The targetRequestCountPerSecond. + */ + int getTargetRequestCountPerSecond(); + + /** + * + * + *
+   * Target number of concurrent requests.
+   * 
+ * + * int32 target_concurrent_requests = 2; + * + * @return The targetConcurrentRequests. + */ + int getTargetConcurrentRequests(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourceRecord.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourceRecord.java new file mode 100644 index 00000000..aef7d709 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourceRecord.java @@ -0,0 +1,1159 @@ +/* + * 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/appengine/v1/domain_mapping.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * A DNS resource record.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ResourceRecord} + */ +public final class ResourceRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ResourceRecord) + ResourceRecordOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceRecord.newBuilder() to construct. + private ResourceRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceRecord() { + name_ = ""; + rrdata_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceRecord(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResourceRecord( + 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; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + rrdata_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + type_ = 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.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_ResourceRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_ResourceRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ResourceRecord.class, + com.google.appengine.v1.ResourceRecord.Builder.class); + } + + /** + * + * + *
+   * A resource record type.
+   * 
+ * + * Protobuf enum {@code google.appengine.v1.ResourceRecord.RecordType} + */ + public enum RecordType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * An unknown resource record.
+     * 
+ * + * RECORD_TYPE_UNSPECIFIED = 0; + */ + RECORD_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * An A resource record. Data is an IPv4 address.
+     * 
+ * + * A = 1; + */ + A(1), + /** + * + * + *
+     * An AAAA resource record. Data is an IPv6 address.
+     * 
+ * + * AAAA = 2; + */ + AAAA(2), + /** + * + * + *
+     * A CNAME resource record. Data is a domain name to be aliased.
+     * 
+ * + * CNAME = 3; + */ + CNAME(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * An unknown resource record.
+     * 
+ * + * RECORD_TYPE_UNSPECIFIED = 0; + */ + public static final int RECORD_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * An A resource record. Data is an IPv4 address.
+     * 
+ * + * A = 1; + */ + public static final int A_VALUE = 1; + /** + * + * + *
+     * An AAAA resource record. Data is an IPv6 address.
+     * 
+ * + * AAAA = 2; + */ + public static final int AAAA_VALUE = 2; + /** + * + * + *
+     * A CNAME resource record. Data is a domain name to be aliased.
+     * 
+ * + * CNAME = 3; + */ + public static final int CNAME_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 RecordType 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 RecordType forNumber(int value) { + switch (value) { + case 0: + return RECORD_TYPE_UNSPECIFIED; + case 1: + return A; + case 2: + return AAAA; + case 3: + return CNAME; + 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 RecordType findValueByNumber(int number) { + return RecordType.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.appengine.v1.ResourceRecord.getDescriptor().getEnumTypes().get(0); + } + + private static final RecordType[] VALUES = values(); + + public static RecordType 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 RecordType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.ResourceRecord.RecordType) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Relative name of the object affected by this record. Only applicable for
+   * `CNAME` records. Example: 'www'.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Relative name of the object affected by this record. Only applicable for
+   * `CNAME` records. Example: 'www'.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RRDATA_FIELD_NUMBER = 2; + private volatile java.lang.Object rrdata_; + /** + * + * + *
+   * Data for this record. Values vary by record type, as defined in RFC 1035
+   * (section 5) and RFC 1034 (section 3.6.1).
+   * 
+ * + * string rrdata = 2; + * + * @return The rrdata. + */ + @java.lang.Override + public java.lang.String getRrdata() { + java.lang.Object ref = rrdata_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rrdata_ = s; + return s; + } + } + /** + * + * + *
+   * Data for this record. Values vary by record type, as defined in RFC 1035
+   * (section 5) and RFC 1034 (section 3.6.1).
+   * 
+ * + * string rrdata = 2; + * + * @return The bytes for rrdata. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRrdataBytes() { + java.lang.Object ref = rrdata_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rrdata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + * + * + *
+   * Resource record type. Example: `AAAA`.
+   * 
+ * + * .google.appengine.v1.ResourceRecord.RecordType type = 3; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Resource record type. Example: `AAAA`.
+   * 
+ * + * .google.appengine.v1.ResourceRecord.RecordType type = 3; + * + * @return The type. + */ + @java.lang.Override + public com.google.appengine.v1.ResourceRecord.RecordType getType() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.ResourceRecord.RecordType result = + com.google.appengine.v1.ResourceRecord.RecordType.valueOf(type_); + return result == null ? com.google.appengine.v1.ResourceRecord.RecordType.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRrdataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rrdata_); + } + if (type_ + != com.google.appengine.v1.ResourceRecord.RecordType.RECORD_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, type_); + } + 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 (!getRrdataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rrdata_); + } + if (type_ + != com.google.appengine.v1.ResourceRecord.RecordType.RECORD_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); + } + 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.appengine.v1.ResourceRecord)) { + return super.equals(obj); + } + com.google.appengine.v1.ResourceRecord other = (com.google.appengine.v1.ResourceRecord) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRrdata().equals(other.getRrdata())) return false; + if (type_ != other.type_) 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) + RRDATA_FIELD_NUMBER; + hash = (53 * hash) + getRrdata().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ResourceRecord parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ResourceRecord parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ResourceRecord parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ResourceRecord 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.appengine.v1.ResourceRecord parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ResourceRecord parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ResourceRecord parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ResourceRecord 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.appengine.v1.ResourceRecord parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ResourceRecord 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.appengine.v1.ResourceRecord parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ResourceRecord 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.appengine.v1.ResourceRecord 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 DNS resource record.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ResourceRecord} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ResourceRecord) + com.google.appengine.v1.ResourceRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_ResourceRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_ResourceRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ResourceRecord.class, + com.google.appengine.v1.ResourceRecord.Builder.class); + } + + // Construct using com.google.appengine.v1.ResourceRecord.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_ = ""; + + rrdata_ = ""; + + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_ResourceRecord_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ResourceRecord getDefaultInstanceForType() { + return com.google.appengine.v1.ResourceRecord.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ResourceRecord build() { + com.google.appengine.v1.ResourceRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ResourceRecord buildPartial() { + com.google.appengine.v1.ResourceRecord result = + new com.google.appengine.v1.ResourceRecord(this); + result.name_ = name_; + result.rrdata_ = rrdata_; + result.type_ = type_; + 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.appengine.v1.ResourceRecord) { + return mergeFrom((com.google.appengine.v1.ResourceRecord) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ResourceRecord other) { + if (other == com.google.appengine.v1.ResourceRecord.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRrdata().isEmpty()) { + rrdata_ = other.rrdata_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + 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.appengine.v1.ResourceRecord parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ResourceRecord) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Relative name of the object affected by this record. Only applicable for
+     * `CNAME` records. Example: 'www'.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Relative name of the object affected by this record. Only applicable for
+     * `CNAME` records. Example: 'www'.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Relative name of the object affected by this record. Only applicable for
+     * `CNAME` records. Example: 'www'.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the object affected by this record. Only applicable for
+     * `CNAME` records. Example: 'www'.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the object affected by this record. Only applicable for
+     * `CNAME` records. Example: 'www'.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object rrdata_ = ""; + /** + * + * + *
+     * Data for this record. Values vary by record type, as defined in RFC 1035
+     * (section 5) and RFC 1034 (section 3.6.1).
+     * 
+ * + * string rrdata = 2; + * + * @return The rrdata. + */ + public java.lang.String getRrdata() { + java.lang.Object ref = rrdata_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rrdata_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Data for this record. Values vary by record type, as defined in RFC 1035
+     * (section 5) and RFC 1034 (section 3.6.1).
+     * 
+ * + * string rrdata = 2; + * + * @return The bytes for rrdata. + */ + public com.google.protobuf.ByteString getRrdataBytes() { + java.lang.Object ref = rrdata_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rrdata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Data for this record. Values vary by record type, as defined in RFC 1035
+     * (section 5) and RFC 1034 (section 3.6.1).
+     * 
+ * + * string rrdata = 2; + * + * @param value The rrdata to set. + * @return This builder for chaining. + */ + public Builder setRrdata(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rrdata_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Data for this record. Values vary by record type, as defined in RFC 1035
+     * (section 5) and RFC 1034 (section 3.6.1).
+     * 
+ * + * string rrdata = 2; + * + * @return This builder for chaining. + */ + public Builder clearRrdata() { + + rrdata_ = getDefaultInstance().getRrdata(); + onChanged(); + return this; + } + /** + * + * + *
+     * Data for this record. Values vary by record type, as defined in RFC 1035
+     * (section 5) and RFC 1034 (section 3.6.1).
+     * 
+ * + * string rrdata = 2; + * + * @param value The bytes for rrdata to set. + * @return This builder for chaining. + */ + public Builder setRrdataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rrdata_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Resource record type. Example: `AAAA`.
+     * 
+ * + * .google.appengine.v1.ResourceRecord.RecordType type = 3; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Resource record type. Example: `AAAA`.
+     * 
+ * + * .google.appengine.v1.ResourceRecord.RecordType type = 3; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource record type. Example: `AAAA`.
+     * 
+ * + * .google.appengine.v1.ResourceRecord.RecordType type = 3; + * + * @return The type. + */ + @java.lang.Override + public com.google.appengine.v1.ResourceRecord.RecordType getType() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.ResourceRecord.RecordType result = + com.google.appengine.v1.ResourceRecord.RecordType.valueOf(type_); + return result == null + ? com.google.appengine.v1.ResourceRecord.RecordType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Resource record type. Example: `AAAA`.
+     * 
+ * + * .google.appengine.v1.ResourceRecord.RecordType type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.appengine.v1.ResourceRecord.RecordType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource record type. Example: `AAAA`.
+     * 
+ * + * .google.appengine.v1.ResourceRecord.RecordType type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 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.appengine.v1.ResourceRecord) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ResourceRecord) + private static final com.google.appengine.v1.ResourceRecord DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ResourceRecord(); + } + + public static com.google.appengine.v1.ResourceRecord getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceRecord parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceRecord(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.appengine.v1.ResourceRecord getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourceRecordOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourceRecordOrBuilder.java new file mode 100644 index 00000000..dadceb52 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourceRecordOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/appengine/v1/domain_mapping.proto + +package com.google.appengine.v1; + +public interface ResourceRecordOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ResourceRecord) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Relative name of the object affected by this record. Only applicable for
+   * `CNAME` records. Example: 'www'.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Relative name of the object affected by this record. Only applicable for
+   * `CNAME` records. Example: 'www'.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Data for this record. Values vary by record type, as defined in RFC 1035
+   * (section 5) and RFC 1034 (section 3.6.1).
+   * 
+ * + * string rrdata = 2; + * + * @return The rrdata. + */ + java.lang.String getRrdata(); + /** + * + * + *
+   * Data for this record. Values vary by record type, as defined in RFC 1035
+   * (section 5) and RFC 1034 (section 3.6.1).
+   * 
+ * + * string rrdata = 2; + * + * @return The bytes for rrdata. + */ + com.google.protobuf.ByteString getRrdataBytes(); + + /** + * + * + *
+   * Resource record type. Example: `AAAA`.
+   * 
+ * + * .google.appengine.v1.ResourceRecord.RecordType type = 3; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Resource record type. Example: `AAAA`.
+   * 
+ * + * .google.appengine.v1.ResourceRecord.RecordType type = 3; + * + * @return The type. + */ + com.google.appengine.v1.ResourceRecord.RecordType getType(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Resources.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Resources.java new file mode 100644 index 00000000..5a79bddc --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Resources.java @@ -0,0 +1,1406 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Machine resources for a version.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.Resources} + */ +public final class Resources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Resources) + ResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use Resources.newBuilder() to construct. + private Resources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Resources() { + volumes_ = java.util.Collections.emptyList(); + kmsKeyReference_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Resources(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Resources( + 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 9: + { + cpu_ = input.readDouble(); + break; + } + case 17: + { + diskGb_ = input.readDouble(); + break; + } + case 25: + { + memoryGb_ = input.readDouble(); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + volumes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + volumes_.add( + input.readMessage(com.google.appengine.v1.Volume.parser(), extensionRegistry)); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + kmsKeyReference_ = 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)) { + volumes_ = java.util.Collections.unmodifiableList(volumes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Resources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Resources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Resources.class, + com.google.appengine.v1.Resources.Builder.class); + } + + public static final int CPU_FIELD_NUMBER = 1; + private double cpu_; + /** + * + * + *
+   * Number of CPU cores needed.
+   * 
+ * + * double cpu = 1; + * + * @return The cpu. + */ + @java.lang.Override + public double getCpu() { + return cpu_; + } + + public static final int DISK_GB_FIELD_NUMBER = 2; + private double diskGb_; + /** + * + * + *
+   * Disk size (GB) needed.
+   * 
+ * + * double disk_gb = 2; + * + * @return The diskGb. + */ + @java.lang.Override + public double getDiskGb() { + return diskGb_; + } + + public static final int MEMORY_GB_FIELD_NUMBER = 3; + private double memoryGb_; + /** + * + * + *
+   * Memory (GB) needed.
+   * 
+ * + * double memory_gb = 3; + * + * @return The memoryGb. + */ + @java.lang.Override + public double getMemoryGb() { + return memoryGb_; + } + + public static final int VOLUMES_FIELD_NUMBER = 4; + private java.util.List volumes_; + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + @java.lang.Override + public java.util.List getVolumesList() { + return volumes_; + } + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + @java.lang.Override + public java.util.List + getVolumesOrBuilderList() { + return volumes_; + } + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + @java.lang.Override + public int getVolumesCount() { + return volumes_.size(); + } + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + @java.lang.Override + public com.google.appengine.v1.Volume getVolumes(int index) { + return volumes_.get(index); + } + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + @java.lang.Override + public com.google.appengine.v1.VolumeOrBuilder getVolumesOrBuilder(int index) { + return volumes_.get(index); + } + + public static final int KMS_KEY_REFERENCE_FIELD_NUMBER = 5; + private volatile java.lang.Object kmsKeyReference_; + /** + * + * + *
+   * The name of the encryption key that is stored in Google Cloud KMS.
+   * Only should be used by Cloud Composer to encrypt the vm disk
+   * 
+ * + * string kms_key_reference = 5; + * + * @return The kmsKeyReference. + */ + @java.lang.Override + public java.lang.String getKmsKeyReference() { + java.lang.Object ref = kmsKeyReference_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyReference_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the encryption key that is stored in Google Cloud KMS.
+   * Only should be used by Cloud Composer to encrypt the vm disk
+   * 
+ * + * string kms_key_reference = 5; + * + * @return The bytes for kmsKeyReference. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyReferenceBytes() { + java.lang.Object ref = kmsKeyReference_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyReference_ = 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 (cpu_ != 0D) { + output.writeDouble(1, cpu_); + } + if (diskGb_ != 0D) { + output.writeDouble(2, diskGb_); + } + if (memoryGb_ != 0D) { + output.writeDouble(3, memoryGb_); + } + for (int i = 0; i < volumes_.size(); i++) { + output.writeMessage(4, volumes_.get(i)); + } + if (!getKmsKeyReferenceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, kmsKeyReference_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cpu_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, cpu_); + } + if (diskGb_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, diskGb_); + } + if (memoryGb_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, memoryGb_); + } + for (int i = 0; i < volumes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, volumes_.get(i)); + } + if (!getKmsKeyReferenceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, kmsKeyReference_); + } + 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.appengine.v1.Resources)) { + return super.equals(obj); + } + com.google.appengine.v1.Resources other = (com.google.appengine.v1.Resources) obj; + + if (java.lang.Double.doubleToLongBits(getCpu()) + != java.lang.Double.doubleToLongBits(other.getCpu())) return false; + if (java.lang.Double.doubleToLongBits(getDiskGb()) + != java.lang.Double.doubleToLongBits(other.getDiskGb())) return false; + if (java.lang.Double.doubleToLongBits(getMemoryGb()) + != java.lang.Double.doubleToLongBits(other.getMemoryGb())) return false; + if (!getVolumesList().equals(other.getVolumesList())) return false; + if (!getKmsKeyReference().equals(other.getKmsKeyReference())) 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) + CPU_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getCpu())); + hash = (37 * hash) + DISK_GB_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getDiskGb())); + hash = (37 * hash) + MEMORY_GB_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMemoryGb())); + if (getVolumesCount() > 0) { + hash = (37 * hash) + VOLUMES_FIELD_NUMBER; + hash = (53 * hash) + getVolumesList().hashCode(); + } + hash = (37 * hash) + KMS_KEY_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyReference().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Resources parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Resources parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Resources parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Resources 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.appengine.v1.Resources parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Resources parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Resources parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Resources 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.appengine.v1.Resources parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Resources 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.appengine.v1.Resources parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Resources 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.appengine.v1.Resources 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; + } + /** + * + * + *
+   * Machine resources for a version.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Resources} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Resources) + com.google.appengine.v1.ResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Resources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Resources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Resources.class, + com.google.appengine.v1.Resources.Builder.class); + } + + // Construct using com.google.appengine.v1.Resources.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVolumesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cpu_ = 0D; + + diskGb_ = 0D; + + memoryGb_ = 0D; + + if (volumesBuilder_ == null) { + volumes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + volumesBuilder_.clear(); + } + kmsKeyReference_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Resources_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Resources getDefaultInstanceForType() { + return com.google.appengine.v1.Resources.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Resources build() { + com.google.appengine.v1.Resources result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Resources buildPartial() { + com.google.appengine.v1.Resources result = new com.google.appengine.v1.Resources(this); + int from_bitField0_ = bitField0_; + result.cpu_ = cpu_; + result.diskGb_ = diskGb_; + result.memoryGb_ = memoryGb_; + if (volumesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + volumes_ = java.util.Collections.unmodifiableList(volumes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.volumes_ = volumes_; + } else { + result.volumes_ = volumesBuilder_.build(); + } + result.kmsKeyReference_ = kmsKeyReference_; + 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.appengine.v1.Resources) { + return mergeFrom((com.google.appengine.v1.Resources) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Resources other) { + if (other == com.google.appengine.v1.Resources.getDefaultInstance()) return this; + if (other.getCpu() != 0D) { + setCpu(other.getCpu()); + } + if (other.getDiskGb() != 0D) { + setDiskGb(other.getDiskGb()); + } + if (other.getMemoryGb() != 0D) { + setMemoryGb(other.getMemoryGb()); + } + if (volumesBuilder_ == null) { + if (!other.volumes_.isEmpty()) { + if (volumes_.isEmpty()) { + volumes_ = other.volumes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVolumesIsMutable(); + volumes_.addAll(other.volumes_); + } + onChanged(); + } + } else { + if (!other.volumes_.isEmpty()) { + if (volumesBuilder_.isEmpty()) { + volumesBuilder_.dispose(); + volumesBuilder_ = null; + volumes_ = other.volumes_; + bitField0_ = (bitField0_ & ~0x00000001); + volumesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVolumesFieldBuilder() + : null; + } else { + volumesBuilder_.addAllMessages(other.volumes_); + } + } + } + if (!other.getKmsKeyReference().isEmpty()) { + kmsKeyReference_ = other.kmsKeyReference_; + 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.appengine.v1.Resources parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Resources) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private double cpu_; + /** + * + * + *
+     * Number of CPU cores needed.
+     * 
+ * + * double cpu = 1; + * + * @return The cpu. + */ + @java.lang.Override + public double getCpu() { + return cpu_; + } + /** + * + * + *
+     * Number of CPU cores needed.
+     * 
+ * + * double cpu = 1; + * + * @param value The cpu to set. + * @return This builder for chaining. + */ + public Builder setCpu(double value) { + + cpu_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of CPU cores needed.
+     * 
+ * + * double cpu = 1; + * + * @return This builder for chaining. + */ + public Builder clearCpu() { + + cpu_ = 0D; + onChanged(); + return this; + } + + private double diskGb_; + /** + * + * + *
+     * Disk size (GB) needed.
+     * 
+ * + * double disk_gb = 2; + * + * @return The diskGb. + */ + @java.lang.Override + public double getDiskGb() { + return diskGb_; + } + /** + * + * + *
+     * Disk size (GB) needed.
+     * 
+ * + * double disk_gb = 2; + * + * @param value The diskGb to set. + * @return This builder for chaining. + */ + public Builder setDiskGb(double value) { + + diskGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk size (GB) needed.
+     * 
+ * + * double disk_gb = 2; + * + * @return This builder for chaining. + */ + public Builder clearDiskGb() { + + diskGb_ = 0D; + onChanged(); + return this; + } + + private double memoryGb_; + /** + * + * + *
+     * Memory (GB) needed.
+     * 
+ * + * double memory_gb = 3; + * + * @return The memoryGb. + */ + @java.lang.Override + public double getMemoryGb() { + return memoryGb_; + } + /** + * + * + *
+     * Memory (GB) needed.
+     * 
+ * + * double memory_gb = 3; + * + * @param value The memoryGb to set. + * @return This builder for chaining. + */ + public Builder setMemoryGb(double value) { + + memoryGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory (GB) needed.
+     * 
+ * + * double memory_gb = 3; + * + * @return This builder for chaining. + */ + public Builder clearMemoryGb() { + + memoryGb_ = 0D; + onChanged(); + return this; + } + + private java.util.List volumes_ = + java.util.Collections.emptyList(); + + private void ensureVolumesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + volumes_ = new java.util.ArrayList(volumes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Volume, + com.google.appengine.v1.Volume.Builder, + com.google.appengine.v1.VolumeOrBuilder> + volumesBuilder_; + + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public java.util.List getVolumesList() { + if (volumesBuilder_ == null) { + return java.util.Collections.unmodifiableList(volumes_); + } else { + return volumesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public int getVolumesCount() { + if (volumesBuilder_ == null) { + return volumes_.size(); + } else { + return volumesBuilder_.getCount(); + } + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public com.google.appengine.v1.Volume getVolumes(int index) { + if (volumesBuilder_ == null) { + return volumes_.get(index); + } else { + return volumesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public Builder setVolumes(int index, com.google.appengine.v1.Volume value) { + if (volumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVolumesIsMutable(); + volumes_.set(index, value); + onChanged(); + } else { + volumesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public Builder setVolumes(int index, com.google.appengine.v1.Volume.Builder builderForValue) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.set(index, builderForValue.build()); + onChanged(); + } else { + volumesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public Builder addVolumes(com.google.appengine.v1.Volume value) { + if (volumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVolumesIsMutable(); + volumes_.add(value); + onChanged(); + } else { + volumesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public Builder addVolumes(int index, com.google.appengine.v1.Volume value) { + if (volumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVolumesIsMutable(); + volumes_.add(index, value); + onChanged(); + } else { + volumesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public Builder addVolumes(com.google.appengine.v1.Volume.Builder builderForValue) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.add(builderForValue.build()); + onChanged(); + } else { + volumesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public Builder addVolumes(int index, com.google.appengine.v1.Volume.Builder builderForValue) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.add(index, builderForValue.build()); + onChanged(); + } else { + volumesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public Builder addAllVolumes( + java.lang.Iterable values) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, volumes_); + onChanged(); + } else { + volumesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public Builder clearVolumes() { + if (volumesBuilder_ == null) { + volumes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + volumesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public Builder removeVolumes(int index) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.remove(index); + onChanged(); + } else { + volumesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public com.google.appengine.v1.Volume.Builder getVolumesBuilder(int index) { + return getVolumesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public com.google.appengine.v1.VolumeOrBuilder getVolumesOrBuilder(int index) { + if (volumesBuilder_ == null) { + return volumes_.get(index); + } else { + return volumesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public java.util.List + getVolumesOrBuilderList() { + if (volumesBuilder_ != null) { + return volumesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(volumes_); + } + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public com.google.appengine.v1.Volume.Builder addVolumesBuilder() { + return getVolumesFieldBuilder() + .addBuilder(com.google.appengine.v1.Volume.getDefaultInstance()); + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public com.google.appengine.v1.Volume.Builder addVolumesBuilder(int index) { + return getVolumesFieldBuilder() + .addBuilder(index, com.google.appengine.v1.Volume.getDefaultInstance()); + } + /** + * + * + *
+     * User specified volumes.
+     * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + public java.util.List getVolumesBuilderList() { + return getVolumesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Volume, + com.google.appengine.v1.Volume.Builder, + com.google.appengine.v1.VolumeOrBuilder> + getVolumesFieldBuilder() { + if (volumesBuilder_ == null) { + volumesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Volume, + com.google.appengine.v1.Volume.Builder, + com.google.appengine.v1.VolumeOrBuilder>( + volumes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + volumes_ = null; + } + return volumesBuilder_; + } + + private java.lang.Object kmsKeyReference_ = ""; + /** + * + * + *
+     * The name of the encryption key that is stored in Google Cloud KMS.
+     * Only should be used by Cloud Composer to encrypt the vm disk
+     * 
+ * + * string kms_key_reference = 5; + * + * @return The kmsKeyReference. + */ + public java.lang.String getKmsKeyReference() { + java.lang.Object ref = kmsKeyReference_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyReference_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the encryption key that is stored in Google Cloud KMS.
+     * Only should be used by Cloud Composer to encrypt the vm disk
+     * 
+ * + * string kms_key_reference = 5; + * + * @return The bytes for kmsKeyReference. + */ + public com.google.protobuf.ByteString getKmsKeyReferenceBytes() { + java.lang.Object ref = kmsKeyReference_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyReference_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the encryption key that is stored in Google Cloud KMS.
+     * Only should be used by Cloud Composer to encrypt the vm disk
+     * 
+ * + * string kms_key_reference = 5; + * + * @param value The kmsKeyReference to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyReference(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyReference_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the encryption key that is stored in Google Cloud KMS.
+     * Only should be used by Cloud Composer to encrypt the vm disk
+     * 
+ * + * string kms_key_reference = 5; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyReference() { + + kmsKeyReference_ = getDefaultInstance().getKmsKeyReference(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the encryption key that is stored in Google Cloud KMS.
+     * Only should be used by Cloud Composer to encrypt the vm disk
+     * 
+ * + * string kms_key_reference = 5; + * + * @param value The bytes for kmsKeyReference to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyReferenceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyReference_ = 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.appengine.v1.Resources) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Resources) + private static final com.google.appengine.v1.Resources DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Resources(); + } + + public static com.google.appengine.v1.Resources getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resources(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.appengine.v1.Resources getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourcesOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourcesOrBuilder.java new file mode 100644 index 00000000..26d6c0bf --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ResourcesOrBuilder.java @@ -0,0 +1,142 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface ResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Resources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Number of CPU cores needed.
+   * 
+ * + * double cpu = 1; + * + * @return The cpu. + */ + double getCpu(); + + /** + * + * + *
+   * Disk size (GB) needed.
+   * 
+ * + * double disk_gb = 2; + * + * @return The diskGb. + */ + double getDiskGb(); + + /** + * + * + *
+   * Memory (GB) needed.
+   * 
+ * + * double memory_gb = 3; + * + * @return The memoryGb. + */ + double getMemoryGb(); + + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + java.util.List getVolumesList(); + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + com.google.appengine.v1.Volume getVolumes(int index); + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + int getVolumesCount(); + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + java.util.List getVolumesOrBuilderList(); + /** + * + * + *
+   * User specified volumes.
+   * 
+ * + * repeated .google.appengine.v1.Volume volumes = 4; + */ + com.google.appengine.v1.VolumeOrBuilder getVolumesOrBuilder(int index); + + /** + * + * + *
+   * The name of the encryption key that is stored in Google Cloud KMS.
+   * Only should be used by Cloud Composer to encrypt the vm disk
+   * 
+ * + * string kms_key_reference = 5; + * + * @return The kmsKeyReference. + */ + java.lang.String getKmsKeyReference(); + /** + * + * + *
+   * The name of the encryption key that is stored in Google Cloud KMS.
+   * Only should be used by Cloud Composer to encrypt the vm disk
+   * 
+ * + * string kms_key_reference = 5; + * + * @return The bytes for kmsKeyReference. + */ + com.google.protobuf.ByteString getKmsKeyReferenceBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ScriptHandler.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ScriptHandler.java new file mode 100644 index 00000000..0610127a --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ScriptHandler.java @@ -0,0 +1,632 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Executes a script to handle the request that matches the URL pattern.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ScriptHandler} + */ +public final class ScriptHandler extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ScriptHandler) + ScriptHandlerOrBuilder { + private static final long serialVersionUID = 0L; + // Use ScriptHandler.newBuilder() to construct. + private ScriptHandler(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ScriptHandler() { + scriptPath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ScriptHandler(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ScriptHandler( + 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(); + + scriptPath_ = 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ScriptHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ScriptHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ScriptHandler.class, + com.google.appengine.v1.ScriptHandler.Builder.class); + } + + public static final int SCRIPT_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object scriptPath_; + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script_path = 1; + * + * @return The scriptPath. + */ + @java.lang.Override + public java.lang.String getScriptPath() { + java.lang.Object ref = scriptPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scriptPath_ = s; + return s; + } + } + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script_path = 1; + * + * @return The bytes for scriptPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScriptPathBytes() { + java.lang.Object ref = scriptPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scriptPath_ = 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 (!getScriptPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scriptPath_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getScriptPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scriptPath_); + } + 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.appengine.v1.ScriptHandler)) { + return super.equals(obj); + } + com.google.appengine.v1.ScriptHandler other = (com.google.appengine.v1.ScriptHandler) obj; + + if (!getScriptPath().equals(other.getScriptPath())) 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) + SCRIPT_PATH_FIELD_NUMBER; + hash = (53 * hash) + getScriptPath().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ScriptHandler parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ScriptHandler parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ScriptHandler parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ScriptHandler 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.appengine.v1.ScriptHandler parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ScriptHandler parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ScriptHandler parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ScriptHandler 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.appengine.v1.ScriptHandler parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ScriptHandler 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.appengine.v1.ScriptHandler parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ScriptHandler 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.appengine.v1.ScriptHandler 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; + } + /** + * + * + *
+   * Executes a script to handle the request that matches the URL pattern.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ScriptHandler} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ScriptHandler) + com.google.appengine.v1.ScriptHandlerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ScriptHandler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ScriptHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ScriptHandler.class, + com.google.appengine.v1.ScriptHandler.Builder.class); + } + + // Construct using com.google.appengine.v1.ScriptHandler.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(); + scriptPath_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_ScriptHandler_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ScriptHandler getDefaultInstanceForType() { + return com.google.appengine.v1.ScriptHandler.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ScriptHandler build() { + com.google.appengine.v1.ScriptHandler result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ScriptHandler buildPartial() { + com.google.appengine.v1.ScriptHandler result = + new com.google.appengine.v1.ScriptHandler(this); + result.scriptPath_ = scriptPath_; + 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.appengine.v1.ScriptHandler) { + return mergeFrom((com.google.appengine.v1.ScriptHandler) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ScriptHandler other) { + if (other == com.google.appengine.v1.ScriptHandler.getDefaultInstance()) return this; + if (!other.getScriptPath().isEmpty()) { + scriptPath_ = other.scriptPath_; + 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.appengine.v1.ScriptHandler parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ScriptHandler) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object scriptPath_ = ""; + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @return The scriptPath. + */ + public java.lang.String getScriptPath() { + java.lang.Object ref = scriptPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scriptPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @return The bytes for scriptPath. + */ + public com.google.protobuf.ByteString getScriptPathBytes() { + java.lang.Object ref = scriptPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scriptPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @param value The scriptPath to set. + * @return This builder for chaining. + */ + public Builder setScriptPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scriptPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearScriptPath() { + + scriptPath_ = getDefaultInstance().getScriptPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the script from the application root directory.
+     * 
+ * + * string script_path = 1; + * + * @param value The bytes for scriptPath to set. + * @return This builder for chaining. + */ + public Builder setScriptPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scriptPath_ = 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.appengine.v1.ScriptHandler) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ScriptHandler) + private static final com.google.appengine.v1.ScriptHandler DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ScriptHandler(); + } + + public static com.google.appengine.v1.ScriptHandler getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ScriptHandler parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ScriptHandler(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.appengine.v1.ScriptHandler getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ScriptHandlerOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ScriptHandlerOrBuilder.java new file mode 100644 index 00000000..0f2e676f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ScriptHandlerOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface ScriptHandlerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ScriptHandler) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script_path = 1; + * + * @return The scriptPath. + */ + java.lang.String getScriptPath(); + /** + * + * + *
+   * Path to the script from the application root directory.
+   * 
+ * + * string script_path = 1; + * + * @return The bytes for scriptPath. + */ + com.google.protobuf.ByteString getScriptPathBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SecurityLevel.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SecurityLevel.java new file mode 100644 index 00000000..33bd4547 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SecurityLevel.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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Methods to enforce security (HTTPS) on a URL.
+ * 
+ * + * Protobuf enum {@code google.appengine.v1.SecurityLevel} + */ +public enum SecurityLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified.
+   * 
+ * + * SECURE_UNSPECIFIED = 0; + */ + SECURE_UNSPECIFIED(0, 0), + /** + * + * + *
+   * Requests for a URL that match this handler that use HTTPS are automatically
+   * redirected to the HTTP equivalent URL.
+   * 
+ * + * SECURE_NEVER = 1; + */ + SECURE_NEVER(2, 1), + /** + * + * + *
+   * Both HTTP and HTTPS requests with URLs that match the handler succeed
+   * without redirects. The application can examine the request to determine
+   * which protocol was used and respond accordingly.
+   * 
+ * + * SECURE_OPTIONAL = 2; + */ + SECURE_OPTIONAL(3, 2), + /** + * + * + *
+   * Requests for a URL that match this handler that do not use HTTPS are
+   * automatically redirected to the HTTPS URL with the same path. Query
+   * parameters are reserved for the redirect.
+   * 
+ * + * SECURE_ALWAYS = 3; + */ + SECURE_ALWAYS(4, 3), + UNRECOGNIZED(-1, -1), + ; + + /** + * + * + *
+   * Both HTTP and HTTPS requests with URLs that match the handler succeed
+   * without redirects. The application can examine the request to determine
+   * which protocol was used, and respond accordingly.
+   * 
+ * + * SECURE_DEFAULT = 0; + */ + public static final SecurityLevel SECURE_DEFAULT = SECURE_UNSPECIFIED; + /** + * + * + *
+   * Not specified.
+   * 
+ * + * SECURE_UNSPECIFIED = 0; + */ + public static final int SECURE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Both HTTP and HTTPS requests with URLs that match the handler succeed
+   * without redirects. The application can examine the request to determine
+   * which protocol was used, and respond accordingly.
+   * 
+ * + * SECURE_DEFAULT = 0; + */ + public static final int SECURE_DEFAULT_VALUE = 0; + /** + * + * + *
+   * Requests for a URL that match this handler that use HTTPS are automatically
+   * redirected to the HTTP equivalent URL.
+   * 
+ * + * SECURE_NEVER = 1; + */ + public static final int SECURE_NEVER_VALUE = 1; + /** + * + * + *
+   * Both HTTP and HTTPS requests with URLs that match the handler succeed
+   * without redirects. The application can examine the request to determine
+   * which protocol was used and respond accordingly.
+   * 
+ * + * SECURE_OPTIONAL = 2; + */ + public static final int SECURE_OPTIONAL_VALUE = 2; + /** + * + * + *
+   * Requests for a URL that match this handler that do not use HTTPS are
+   * automatically redirected to the HTTPS URL with the same path. Query
+   * parameters are reserved for the redirect.
+   * 
+ * + * SECURE_ALWAYS = 3; + */ + public static final int SECURE_ALWAYS_VALUE = 3; + + public final int getNumber() { + if (index == -1) { + 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 SecurityLevel 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 SecurityLevel forNumber(int value) { + switch (value) { + case 0: + return SECURE_UNSPECIFIED; + case 1: + return SECURE_NEVER; + case 2: + return SECURE_OPTIONAL; + case 3: + return SECURE_ALWAYS; + 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 SecurityLevel findValueByNumber(int number) { + return SecurityLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto.getDescriptor().getEnumTypes().get(2); + } + + private static final SecurityLevel[] VALUES = getStaticValuesArray(); + + private static SecurityLevel[] getStaticValuesArray() { + return new SecurityLevel[] { + SECURE_UNSPECIFIED, SECURE_DEFAULT, SECURE_NEVER, SECURE_OPTIONAL, SECURE_ALWAYS, + }; + } + + public static SecurityLevel 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 index; + private final int value; + + private SecurityLevel(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.SecurityLevel) +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Service.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Service.java new file mode 100644 index 00000000..ec4ac541 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Service.java @@ -0,0 +1,1409 @@ +/* + * 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/appengine/v1/service.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * A Service resource is a logical component of an application that can share
+ * state and communicate in a secure fashion with other services.
+ * For example, an application that handles customer requests might
+ * include separate services to handle tasks such as backend data
+ * analysis or API requests from mobile devices. Each service has a
+ * collection of versions that define a specific set of code used to
+ * implement the functionality of that service.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.Service} + */ +public final class Service extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Service) + ServiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Service.newBuilder() to construct. + private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Service() { + name_ = ""; + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Service(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Service( + 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; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 26: + { + com.google.appengine.v1.TrafficSplit.Builder subBuilder = null; + if (split_ != null) { + subBuilder = split_.toBuilder(); + } + split_ = + input.readMessage( + com.google.appengine.v1.TrafficSplit.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(split_); + split_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.appengine.v1.NetworkSettings.Builder subBuilder = null; + if (networkSettings_ != null) { + subBuilder = networkSettings_.toBuilder(); + } + networkSettings_ = + input.readMessage( + com.google.appengine.v1.NetworkSettings.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(networkSettings_); + networkSettings_ = 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.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_Service_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Service.class, com.google.appengine.v1.Service.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Full path to the Service resource in the API.
+   * Example: `apps/myapp/services/default`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Full path to the Service resource in the API.
+   * Example: `apps/myapp/services/default`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Relative name of the service within the application.
+   * Example: `default`.
+   * @OutputOnly
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Relative name of the service within the application.
+   * Example: `default`.
+   * @OutputOnly
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPLIT_FIELD_NUMBER = 3; + private com.google.appengine.v1.TrafficSplit split_; + /** + * + * + *
+   * Mapping that defines fractional HTTP traffic diversion to
+   * different versions within the service.
+   * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + * + * @return Whether the split field is set. + */ + @java.lang.Override + public boolean hasSplit() { + return split_ != null; + } + /** + * + * + *
+   * Mapping that defines fractional HTTP traffic diversion to
+   * different versions within the service.
+   * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + * + * @return The split. + */ + @java.lang.Override + public com.google.appengine.v1.TrafficSplit getSplit() { + return split_ == null ? com.google.appengine.v1.TrafficSplit.getDefaultInstance() : split_; + } + /** + * + * + *
+   * Mapping that defines fractional HTTP traffic diversion to
+   * different versions within the service.
+   * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + */ + @java.lang.Override + public com.google.appengine.v1.TrafficSplitOrBuilder getSplitOrBuilder() { + return getSplit(); + } + + public static final int NETWORK_SETTINGS_FIELD_NUMBER = 6; + private com.google.appengine.v1.NetworkSettings networkSettings_; + /** + * + * + *
+   * Ingress settings for this service. Will apply to all versions.
+   * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + * + * @return Whether the networkSettings field is set. + */ + @java.lang.Override + public boolean hasNetworkSettings() { + return networkSettings_ != null; + } + /** + * + * + *
+   * Ingress settings for this service. Will apply to all versions.
+   * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + * + * @return The networkSettings. + */ + @java.lang.Override + public com.google.appengine.v1.NetworkSettings getNetworkSettings() { + return networkSettings_ == null + ? com.google.appengine.v1.NetworkSettings.getDefaultInstance() + : networkSettings_; + } + /** + * + * + *
+   * Ingress settings for this service. Will apply to all versions.
+   * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + */ + @java.lang.Override + public com.google.appengine.v1.NetworkSettingsOrBuilder getNetworkSettingsOrBuilder() { + return getNetworkSettings(); + } + + 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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (split_ != null) { + output.writeMessage(3, getSplit()); + } + if (networkSettings_ != null) { + output.writeMessage(6, getNetworkSettings()); + } + 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 (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (split_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSplit()); + } + if (networkSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getNetworkSettings()); + } + 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.appengine.v1.Service)) { + return super.equals(obj); + } + com.google.appengine.v1.Service other = (com.google.appengine.v1.Service) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; + if (hasSplit() != other.hasSplit()) return false; + if (hasSplit()) { + if (!getSplit().equals(other.getSplit())) return false; + } + if (hasNetworkSettings() != other.hasNetworkSettings()) return false; + if (hasNetworkSettings()) { + if (!getNetworkSettings().equals(other.getNetworkSettings())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasSplit()) { + hash = (37 * hash) + SPLIT_FIELD_NUMBER; + hash = (53 * hash) + getSplit().hashCode(); + } + if (hasNetworkSettings()) { + hash = (37 * hash) + NETWORK_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkSettings().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Service parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Service parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Service parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Service 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.appengine.v1.Service parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Service parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Service parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Service 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.appengine.v1.Service parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Service 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.appengine.v1.Service parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Service 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.appengine.v1.Service 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 Service resource is a logical component of an application that can share
+   * state and communicate in a secure fashion with other services.
+   * For example, an application that handles customer requests might
+   * include separate services to handle tasks such as backend data
+   * analysis or API requests from mobile devices. Each service has a
+   * collection of versions that define a specific set of code used to
+   * implement the functionality of that service.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Service} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Service) + com.google.appengine.v1.ServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_Service_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Service.class, com.google.appengine.v1.Service.Builder.class); + } + + // Construct using com.google.appengine.v1.Service.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_ = ""; + + id_ = ""; + + if (splitBuilder_ == null) { + split_ = null; + } else { + split_ = null; + splitBuilder_ = null; + } + if (networkSettingsBuilder_ == null) { + networkSettings_ = null; + } else { + networkSettings_ = null; + networkSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_Service_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Service getDefaultInstanceForType() { + return com.google.appengine.v1.Service.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Service build() { + com.google.appengine.v1.Service result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Service buildPartial() { + com.google.appengine.v1.Service result = new com.google.appengine.v1.Service(this); + result.name_ = name_; + result.id_ = id_; + if (splitBuilder_ == null) { + result.split_ = split_; + } else { + result.split_ = splitBuilder_.build(); + } + if (networkSettingsBuilder_ == null) { + result.networkSettings_ = networkSettings_; + } else { + result.networkSettings_ = networkSettingsBuilder_.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.appengine.v1.Service) { + return mergeFrom((com.google.appengine.v1.Service) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Service other) { + if (other == com.google.appengine.v1.Service.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.hasSplit()) { + mergeSplit(other.getSplit()); + } + if (other.hasNetworkSettings()) { + mergeNetworkSettings(other.getNetworkSettings()); + } + 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.appengine.v1.Service parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Service) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Full path to the Service resource in the API.
+     * Example: `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Full path to the Service resource in the API.
+     * Example: `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Full path to the Service resource in the API.
+     * Example: `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the Service resource in the API.
+     * Example: `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the Service resource in the API.
+     * Example: `apps/myapp/services/default`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Relative name of the service within the application.
+     * Example: `default`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Relative name of the service within the application.
+     * Example: `default`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Relative name of the service within the application.
+     * Example: `default`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the service within the application.
+     * Example: `default`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the service within the application.
+     * Example: `default`.
+     * @OutputOnly
+     * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.TrafficSplit split_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.TrafficSplit, + com.google.appengine.v1.TrafficSplit.Builder, + com.google.appengine.v1.TrafficSplitOrBuilder> + splitBuilder_; + /** + * + * + *
+     * Mapping that defines fractional HTTP traffic diversion to
+     * different versions within the service.
+     * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + * + * @return Whether the split field is set. + */ + public boolean hasSplit() { + return splitBuilder_ != null || split_ != null; + } + /** + * + * + *
+     * Mapping that defines fractional HTTP traffic diversion to
+     * different versions within the service.
+     * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + * + * @return The split. + */ + public com.google.appengine.v1.TrafficSplit getSplit() { + if (splitBuilder_ == null) { + return split_ == null ? com.google.appengine.v1.TrafficSplit.getDefaultInstance() : split_; + } else { + return splitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mapping that defines fractional HTTP traffic diversion to
+     * different versions within the service.
+     * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + */ + public Builder setSplit(com.google.appengine.v1.TrafficSplit value) { + if (splitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + split_ = value; + onChanged(); + } else { + splitBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mapping that defines fractional HTTP traffic diversion to
+     * different versions within the service.
+     * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + */ + public Builder setSplit(com.google.appengine.v1.TrafficSplit.Builder builderForValue) { + if (splitBuilder_ == null) { + split_ = builderForValue.build(); + onChanged(); + } else { + splitBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mapping that defines fractional HTTP traffic diversion to
+     * different versions within the service.
+     * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + */ + public Builder mergeSplit(com.google.appengine.v1.TrafficSplit value) { + if (splitBuilder_ == null) { + if (split_ != null) { + split_ = + com.google.appengine.v1.TrafficSplit.newBuilder(split_) + .mergeFrom(value) + .buildPartial(); + } else { + split_ = value; + } + onChanged(); + } else { + splitBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mapping that defines fractional HTTP traffic diversion to
+     * different versions within the service.
+     * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + */ + public Builder clearSplit() { + if (splitBuilder_ == null) { + split_ = null; + onChanged(); + } else { + split_ = null; + splitBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mapping that defines fractional HTTP traffic diversion to
+     * different versions within the service.
+     * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + */ + public com.google.appengine.v1.TrafficSplit.Builder getSplitBuilder() { + + onChanged(); + return getSplitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mapping that defines fractional HTTP traffic diversion to
+     * different versions within the service.
+     * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + */ + public com.google.appengine.v1.TrafficSplitOrBuilder getSplitOrBuilder() { + if (splitBuilder_ != null) { + return splitBuilder_.getMessageOrBuilder(); + } else { + return split_ == null ? com.google.appengine.v1.TrafficSplit.getDefaultInstance() : split_; + } + } + /** + * + * + *
+     * Mapping that defines fractional HTTP traffic diversion to
+     * different versions within the service.
+     * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.TrafficSplit, + com.google.appengine.v1.TrafficSplit.Builder, + com.google.appengine.v1.TrafficSplitOrBuilder> + getSplitFieldBuilder() { + if (splitBuilder_ == null) { + splitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.TrafficSplit, + com.google.appengine.v1.TrafficSplit.Builder, + com.google.appengine.v1.TrafficSplitOrBuilder>( + getSplit(), getParentForChildren(), isClean()); + split_ = null; + } + return splitBuilder_; + } + + private com.google.appengine.v1.NetworkSettings networkSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.NetworkSettings, + com.google.appengine.v1.NetworkSettings.Builder, + com.google.appengine.v1.NetworkSettingsOrBuilder> + networkSettingsBuilder_; + /** + * + * + *
+     * Ingress settings for this service. Will apply to all versions.
+     * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + * + * @return Whether the networkSettings field is set. + */ + public boolean hasNetworkSettings() { + return networkSettingsBuilder_ != null || networkSettings_ != null; + } + /** + * + * + *
+     * Ingress settings for this service. Will apply to all versions.
+     * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + * + * @return The networkSettings. + */ + public com.google.appengine.v1.NetworkSettings getNetworkSettings() { + if (networkSettingsBuilder_ == null) { + return networkSettings_ == null + ? com.google.appengine.v1.NetworkSettings.getDefaultInstance() + : networkSettings_; + } else { + return networkSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Ingress settings for this service. Will apply to all versions.
+     * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + */ + public Builder setNetworkSettings(com.google.appengine.v1.NetworkSettings value) { + if (networkSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkSettings_ = value; + onChanged(); + } else { + networkSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Ingress settings for this service. Will apply to all versions.
+     * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + */ + public Builder setNetworkSettings( + com.google.appengine.v1.NetworkSettings.Builder builderForValue) { + if (networkSettingsBuilder_ == null) { + networkSettings_ = builderForValue.build(); + onChanged(); + } else { + networkSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Ingress settings for this service. Will apply to all versions.
+     * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + */ + public Builder mergeNetworkSettings(com.google.appengine.v1.NetworkSettings value) { + if (networkSettingsBuilder_ == null) { + if (networkSettings_ != null) { + networkSettings_ = + com.google.appengine.v1.NetworkSettings.newBuilder(networkSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + networkSettings_ = value; + } + onChanged(); + } else { + networkSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Ingress settings for this service. Will apply to all versions.
+     * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + */ + public Builder clearNetworkSettings() { + if (networkSettingsBuilder_ == null) { + networkSettings_ = null; + onChanged(); + } else { + networkSettings_ = null; + networkSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Ingress settings for this service. Will apply to all versions.
+     * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + */ + public com.google.appengine.v1.NetworkSettings.Builder getNetworkSettingsBuilder() { + + onChanged(); + return getNetworkSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Ingress settings for this service. Will apply to all versions.
+     * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + */ + public com.google.appengine.v1.NetworkSettingsOrBuilder getNetworkSettingsOrBuilder() { + if (networkSettingsBuilder_ != null) { + return networkSettingsBuilder_.getMessageOrBuilder(); + } else { + return networkSettings_ == null + ? com.google.appengine.v1.NetworkSettings.getDefaultInstance() + : networkSettings_; + } + } + /** + * + * + *
+     * Ingress settings for this service. Will apply to all versions.
+     * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.NetworkSettings, + com.google.appengine.v1.NetworkSettings.Builder, + com.google.appengine.v1.NetworkSettingsOrBuilder> + getNetworkSettingsFieldBuilder() { + if (networkSettingsBuilder_ == null) { + networkSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.NetworkSettings, + com.google.appengine.v1.NetworkSettings.Builder, + com.google.appengine.v1.NetworkSettingsOrBuilder>( + getNetworkSettings(), getParentForChildren(), isClean()); + networkSettings_ = null; + } + return networkSettingsBuilder_; + } + + @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.appengine.v1.Service) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Service) + private static final com.google.appengine.v1.Service DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Service(); + } + + public static com.google.appengine.v1.Service getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Service parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Service(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.appengine.v1.Service getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServiceOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServiceOrBuilder.java new file mode 100644 index 00000000..d98db4ae --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServiceOrBuilder.java @@ -0,0 +1,156 @@ +/* + * 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/appengine/v1/service.proto + +package com.google.appengine.v1; + +public interface ServiceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Service) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Full path to the Service resource in the API.
+   * Example: `apps/myapp/services/default`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Full path to the Service resource in the API.
+   * Example: `apps/myapp/services/default`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Relative name of the service within the application.
+   * Example: `default`.
+   * @OutputOnly
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Relative name of the service within the application.
+   * Example: `default`.
+   * @OutputOnly
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Mapping that defines fractional HTTP traffic diversion to
+   * different versions within the service.
+   * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + * + * @return Whether the split field is set. + */ + boolean hasSplit(); + /** + * + * + *
+   * Mapping that defines fractional HTTP traffic diversion to
+   * different versions within the service.
+   * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + * + * @return The split. + */ + com.google.appengine.v1.TrafficSplit getSplit(); + /** + * + * + *
+   * Mapping that defines fractional HTTP traffic diversion to
+   * different versions within the service.
+   * 
+ * + * .google.appengine.v1.TrafficSplit split = 3; + */ + com.google.appengine.v1.TrafficSplitOrBuilder getSplitOrBuilder(); + + /** + * + * + *
+   * Ingress settings for this service. Will apply to all versions.
+   * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + * + * @return Whether the networkSettings field is set. + */ + boolean hasNetworkSettings(); + /** + * + * + *
+   * Ingress settings for this service. Will apply to all versions.
+   * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + * + * @return The networkSettings. + */ + com.google.appengine.v1.NetworkSettings getNetworkSettings(); + /** + * + * + *
+   * Ingress settings for this service. Will apply to all versions.
+   * 
+ * + * .google.appengine.v1.NetworkSettings network_settings = 6; + */ + com.google.appengine.v1.NetworkSettingsOrBuilder getNetworkSettingsOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServiceProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServiceProto.java new file mode 100644 index 00000000..0c6e6d68 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ServiceProto.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/appengine/v1/service.proto + +package com.google.appengine.v1; + +public final class ServiceProto { + private ServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Service_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Service_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_TrafficSplit_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_TrafficSplit_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_TrafficSplit_AllocationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_TrafficSplit_AllocationsEntry_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/appengine/v1/service.proto\022\023goo" + + "gle.appengine.v1\032*google/appengine/v1/ne" + + "twork_settings.proto\032\034google/api/annotat" + + "ions.proto\"\225\001\n\007Service\022\014\n\004name\030\001 \001(\t\022\n\n\002" + + "id\030\002 \001(\t\0220\n\005split\030\003 \001(\0132!.google.appengi" + + "ne.v1.TrafficSplit\022>\n\020network_settings\030\006" + + " \001(\0132$.google.appengine.v1.NetworkSettin" + + "gs\"\204\002\n\014TrafficSplit\022;\n\010shard_by\030\001 \001(\0162)." + + "google.appengine.v1.TrafficSplit.ShardBy" + + "\022G\n\013allocations\030\002 \003(\01322.google.appengine" + + ".v1.TrafficSplit.AllocationsEntry\0322\n\020All" + + "ocationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\001:\0028\001\":\n\007ShardBy\022\017\n\013UNSPECIFIED\020\000\022\n\n\006COO" + + "KIE\020\001\022\006\n\002IP\020\002\022\n\n\006RANDOM\020\003B\276\001\n\027com.google" + + ".appengine.v1B\014ServiceProtoP\001Z + * Run states of a version. + * + * + * Protobuf enum {@code google.appengine.v1.ServingStatus} + */ +public enum ServingStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified.
+   * 
+ * + * SERVING_STATUS_UNSPECIFIED = 0; + */ + SERVING_STATUS_UNSPECIFIED(0), + /** + * + * + *
+   * Currently serving. Instances are created according to the
+   * scaling settings of the version.
+   * 
+ * + * SERVING = 1; + */ + SERVING(1), + /** + * + * + *
+   * Disabled. No instances will be created and the scaling
+   * settings are ignored until the state of the version changes
+   * to `SERVING`.
+   * 
+ * + * STOPPED = 2; + */ + STOPPED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified.
+   * 
+ * + * SERVING_STATUS_UNSPECIFIED = 0; + */ + public static final int SERVING_STATUS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Currently serving. Instances are created according to the
+   * scaling settings of the version.
+   * 
+ * + * SERVING = 1; + */ + public static final int SERVING_VALUE = 1; + /** + * + * + *
+   * Disabled. No instances will be created and the scaling
+   * settings are ignored until the state of the version changes
+   * to `SERVING`.
+   * 
+ * + * STOPPED = 2; + */ + public static final int STOPPED_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 ServingStatus 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 ServingStatus forNumber(int value) { + switch (value) { + case 0: + return SERVING_STATUS_UNSPECIFIED; + case 1: + return SERVING; + case 2: + return STOPPED; + 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 ServingStatus findValueByNumber(int number) { + return ServingStatus.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.appengine.v1.VersionProto.getDescriptor().getEnumTypes().get(1); + } + + private static final ServingStatus[] VALUES = values(); + + public static ServingStatus 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 ServingStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.ServingStatus) +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SslSettings.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SslSettings.java new file mode 100644 index 00000000..badaaf36 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SslSettings.java @@ -0,0 +1,1249 @@ +/* + * 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/appengine/v1/domain_mapping.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * SSL configuration for a `DomainMapping` resource.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.SslSettings} + */ +public final class SslSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.SslSettings) + SslSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SslSettings.newBuilder() to construct. + private SslSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SslSettings() { + certificateId_ = ""; + sslManagementType_ = 0; + pendingManagedCertificateId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SslSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SslSettings( + 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(); + + certificateId_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + sslManagementType_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pendingManagedCertificateId_ = 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.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_SslSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_SslSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.SslSettings.class, + com.google.appengine.v1.SslSettings.Builder.class); + } + + /** + * + * + *
+   * The SSL management type for this domain.
+   * 
+ * + * Protobuf enum {@code google.appengine.v1.SslSettings.SslManagementType} + */ + public enum SslManagementType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Defaults to `AUTOMATIC`.
+     * 
+ * + * SSL_MANAGEMENT_TYPE_UNSPECIFIED = 0; + */ + SSL_MANAGEMENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * SSL support for this domain is configured automatically. The mapped SSL
+     * certificate will be automatically renewed.
+     * 
+ * + * AUTOMATIC = 1; + */ + AUTOMATIC(1), + /** + * + * + *
+     * SSL support for this domain is configured manually by the user. Either
+     * the domain has no SSL support or a user-obtained SSL certificate has been
+     * explictly mapped to this domain.
+     * 
+ * + * MANUAL = 2; + */ + MANUAL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Defaults to `AUTOMATIC`.
+     * 
+ * + * SSL_MANAGEMENT_TYPE_UNSPECIFIED = 0; + */ + public static final int SSL_MANAGEMENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * SSL support for this domain is configured automatically. The mapped SSL
+     * certificate will be automatically renewed.
+     * 
+ * + * AUTOMATIC = 1; + */ + public static final int AUTOMATIC_VALUE = 1; + /** + * + * + *
+     * SSL support for this domain is configured manually by the user. Either
+     * the domain has no SSL support or a user-obtained SSL certificate has been
+     * explictly mapped to this domain.
+     * 
+ * + * MANUAL = 2; + */ + public static final int MANUAL_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 SslManagementType 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 SslManagementType forNumber(int value) { + switch (value) { + case 0: + return SSL_MANAGEMENT_TYPE_UNSPECIFIED; + case 1: + return AUTOMATIC; + case 2: + return MANUAL; + 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 SslManagementType findValueByNumber(int number) { + return SslManagementType.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.appengine.v1.SslSettings.getDescriptor().getEnumTypes().get(0); + } + + private static final SslManagementType[] VALUES = values(); + + public static SslManagementType 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 SslManagementType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.SslSettings.SslManagementType) + } + + public static final int CERTIFICATE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object certificateId_; + /** + * + * + *
+   * ID of the `AuthorizedCertificate` resource configuring SSL for the
+   * application. Clearing this field will remove SSL support.
+   * By default, a managed certificate is automatically created for every
+   * domain mapping. To omit SSL support or to configure SSL manually, specify
+   * `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
+   * be authorized to administer the `AuthorizedCertificate` resource to
+   * manually map it to a `DomainMapping` resource.
+   * Example: `12345`.
+   * 
+ * + * string certificate_id = 1; + * + * @return The certificateId. + */ + @java.lang.Override + public java.lang.String getCertificateId() { + java.lang.Object ref = certificateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateId_ = s; + return s; + } + } + /** + * + * + *
+   * ID of the `AuthorizedCertificate` resource configuring SSL for the
+   * application. Clearing this field will remove SSL support.
+   * By default, a managed certificate is automatically created for every
+   * domain mapping. To omit SSL support or to configure SSL manually, specify
+   * `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
+   * be authorized to administer the `AuthorizedCertificate` resource to
+   * manually map it to a `DomainMapping` resource.
+   * Example: `12345`.
+   * 
+ * + * string certificate_id = 1; + * + * @return The bytes for certificateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCertificateIdBytes() { + java.lang.Object ref = certificateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SSL_MANAGEMENT_TYPE_FIELD_NUMBER = 3; + private int sslManagementType_; + /** + * + * + *
+   * SSL management type for this domain. If `AUTOMATIC`, a managed certificate
+   * is automatically provisioned. If `MANUAL`, `certificate_id` must be
+   * manually specified in order to configure SSL for this domain.
+   * 
+ * + * .google.appengine.v1.SslSettings.SslManagementType ssl_management_type = 3; + * + * @return The enum numeric value on the wire for sslManagementType. + */ + @java.lang.Override + public int getSslManagementTypeValue() { + return sslManagementType_; + } + /** + * + * + *
+   * SSL management type for this domain. If `AUTOMATIC`, a managed certificate
+   * is automatically provisioned. If `MANUAL`, `certificate_id` must be
+   * manually specified in order to configure SSL for this domain.
+   * 
+ * + * .google.appengine.v1.SslSettings.SslManagementType ssl_management_type = 3; + * + * @return The sslManagementType. + */ + @java.lang.Override + public com.google.appengine.v1.SslSettings.SslManagementType getSslManagementType() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.SslSettings.SslManagementType result = + com.google.appengine.v1.SslSettings.SslManagementType.valueOf(sslManagementType_); + return result == null + ? com.google.appengine.v1.SslSettings.SslManagementType.UNRECOGNIZED + : result; + } + + public static final int PENDING_MANAGED_CERTIFICATE_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object pendingManagedCertificateId_; + /** + * + * + *
+   * ID of the managed `AuthorizedCertificate` resource currently being
+   * provisioned, if applicable. Until the new managed certificate has been
+   * successfully provisioned, the previous SSL state will be preserved. Once
+   * the provisioning process completes, the `certificate_id` field will reflect
+   * the new managed certificate and this field will be left empty. To remove
+   * SSL support while there is still a pending managed certificate, clear the
+   * `certificate_id` field with an `UpdateDomainMappingRequest`.
+   * @OutputOnly
+   * 
+ * + * string pending_managed_certificate_id = 4; + * + * @return The pendingManagedCertificateId. + */ + @java.lang.Override + public java.lang.String getPendingManagedCertificateId() { + java.lang.Object ref = pendingManagedCertificateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pendingManagedCertificateId_ = s; + return s; + } + } + /** + * + * + *
+   * ID of the managed `AuthorizedCertificate` resource currently being
+   * provisioned, if applicable. Until the new managed certificate has been
+   * successfully provisioned, the previous SSL state will be preserved. Once
+   * the provisioning process completes, the `certificate_id` field will reflect
+   * the new managed certificate and this field will be left empty. To remove
+   * SSL support while there is still a pending managed certificate, clear the
+   * `certificate_id` field with an `UpdateDomainMappingRequest`.
+   * @OutputOnly
+   * 
+ * + * string pending_managed_certificate_id = 4; + * + * @return The bytes for pendingManagedCertificateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPendingManagedCertificateIdBytes() { + java.lang.Object ref = pendingManagedCertificateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pendingManagedCertificateId_ = 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 (!getCertificateIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, certificateId_); + } + if (sslManagementType_ + != com.google.appengine.v1.SslSettings.SslManagementType.SSL_MANAGEMENT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, sslManagementType_); + } + if (!getPendingManagedCertificateIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pendingManagedCertificateId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCertificateIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, certificateId_); + } + if (sslManagementType_ + != com.google.appengine.v1.SslSettings.SslManagementType.SSL_MANAGEMENT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, sslManagementType_); + } + if (!getPendingManagedCertificateIdBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pendingManagedCertificateId_); + } + 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.appengine.v1.SslSettings)) { + return super.equals(obj); + } + com.google.appengine.v1.SslSettings other = (com.google.appengine.v1.SslSettings) obj; + + if (!getCertificateId().equals(other.getCertificateId())) return false; + if (sslManagementType_ != other.sslManagementType_) return false; + if (!getPendingManagedCertificateId().equals(other.getPendingManagedCertificateId())) + 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) + CERTIFICATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getCertificateId().hashCode(); + hash = (37 * hash) + SSL_MANAGEMENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + sslManagementType_; + hash = (37 * hash) + PENDING_MANAGED_CERTIFICATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPendingManagedCertificateId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.SslSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.SslSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.SslSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.SslSettings 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.appengine.v1.SslSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.SslSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.SslSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.SslSettings 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.appengine.v1.SslSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.SslSettings 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.appengine.v1.SslSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.SslSettings 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.appengine.v1.SslSettings 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; + } + /** + * + * + *
+   * SSL configuration for a `DomainMapping` resource.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.SslSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.SslSettings) + com.google.appengine.v1.SslSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_SslSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_SslSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.SslSettings.class, + com.google.appengine.v1.SslSettings.Builder.class); + } + + // Construct using com.google.appengine.v1.SslSettings.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(); + certificateId_ = ""; + + sslManagementType_ = 0; + + pendingManagedCertificateId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.DomainMappingProto + .internal_static_google_appengine_v1_SslSettings_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.SslSettings getDefaultInstanceForType() { + return com.google.appengine.v1.SslSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.SslSettings build() { + com.google.appengine.v1.SslSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.SslSettings buildPartial() { + com.google.appengine.v1.SslSettings result = new com.google.appengine.v1.SslSettings(this); + result.certificateId_ = certificateId_; + result.sslManagementType_ = sslManagementType_; + result.pendingManagedCertificateId_ = pendingManagedCertificateId_; + 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.appengine.v1.SslSettings) { + return mergeFrom((com.google.appengine.v1.SslSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.SslSettings other) { + if (other == com.google.appengine.v1.SslSettings.getDefaultInstance()) return this; + if (!other.getCertificateId().isEmpty()) { + certificateId_ = other.certificateId_; + onChanged(); + } + if (other.sslManagementType_ != 0) { + setSslManagementTypeValue(other.getSslManagementTypeValue()); + } + if (!other.getPendingManagedCertificateId().isEmpty()) { + pendingManagedCertificateId_ = other.pendingManagedCertificateId_; + 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.appengine.v1.SslSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.SslSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object certificateId_ = ""; + /** + * + * + *
+     * ID of the `AuthorizedCertificate` resource configuring SSL for the
+     * application. Clearing this field will remove SSL support.
+     * By default, a managed certificate is automatically created for every
+     * domain mapping. To omit SSL support or to configure SSL manually, specify
+     * `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
+     * be authorized to administer the `AuthorizedCertificate` resource to
+     * manually map it to a `DomainMapping` resource.
+     * Example: `12345`.
+     * 
+ * + * string certificate_id = 1; + * + * @return The certificateId. + */ + public java.lang.String getCertificateId() { + java.lang.Object ref = certificateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ID of the `AuthorizedCertificate` resource configuring SSL for the
+     * application. Clearing this field will remove SSL support.
+     * By default, a managed certificate is automatically created for every
+     * domain mapping. To omit SSL support or to configure SSL manually, specify
+     * `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
+     * be authorized to administer the `AuthorizedCertificate` resource to
+     * manually map it to a `DomainMapping` resource.
+     * Example: `12345`.
+     * 
+ * + * string certificate_id = 1; + * + * @return The bytes for certificateId. + */ + public com.google.protobuf.ByteString getCertificateIdBytes() { + java.lang.Object ref = certificateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ID of the `AuthorizedCertificate` resource configuring SSL for the
+     * application. Clearing this field will remove SSL support.
+     * By default, a managed certificate is automatically created for every
+     * domain mapping. To omit SSL support or to configure SSL manually, specify
+     * `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
+     * be authorized to administer the `AuthorizedCertificate` resource to
+     * manually map it to a `DomainMapping` resource.
+     * Example: `12345`.
+     * 
+ * + * string certificate_id = 1; + * + * @param value The certificateId to set. + * @return This builder for chaining. + */ + public Builder setCertificateId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + certificateId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the `AuthorizedCertificate` resource configuring SSL for the
+     * application. Clearing this field will remove SSL support.
+     * By default, a managed certificate is automatically created for every
+     * domain mapping. To omit SSL support or to configure SSL manually, specify
+     * `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
+     * be authorized to administer the `AuthorizedCertificate` resource to
+     * manually map it to a `DomainMapping` resource.
+     * Example: `12345`.
+     * 
+ * + * string certificate_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearCertificateId() { + + certificateId_ = getDefaultInstance().getCertificateId(); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the `AuthorizedCertificate` resource configuring SSL for the
+     * application. Clearing this field will remove SSL support.
+     * By default, a managed certificate is automatically created for every
+     * domain mapping. To omit SSL support or to configure SSL manually, specify
+     * `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
+     * be authorized to administer the `AuthorizedCertificate` resource to
+     * manually map it to a `DomainMapping` resource.
+     * Example: `12345`.
+     * 
+ * + * string certificate_id = 1; + * + * @param value The bytes for certificateId to set. + * @return This builder for chaining. + */ + public Builder setCertificateIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + certificateId_ = value; + onChanged(); + return this; + } + + private int sslManagementType_ = 0; + /** + * + * + *
+     * SSL management type for this domain. If `AUTOMATIC`, a managed certificate
+     * is automatically provisioned. If `MANUAL`, `certificate_id` must be
+     * manually specified in order to configure SSL for this domain.
+     * 
+ * + * .google.appengine.v1.SslSettings.SslManagementType ssl_management_type = 3; + * + * @return The enum numeric value on the wire for sslManagementType. + */ + @java.lang.Override + public int getSslManagementTypeValue() { + return sslManagementType_; + } + /** + * + * + *
+     * SSL management type for this domain. If `AUTOMATIC`, a managed certificate
+     * is automatically provisioned. If `MANUAL`, `certificate_id` must be
+     * manually specified in order to configure SSL for this domain.
+     * 
+ * + * .google.appengine.v1.SslSettings.SslManagementType ssl_management_type = 3; + * + * @param value The enum numeric value on the wire for sslManagementType to set. + * @return This builder for chaining. + */ + public Builder setSslManagementTypeValue(int value) { + + sslManagementType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * SSL management type for this domain. If `AUTOMATIC`, a managed certificate
+     * is automatically provisioned. If `MANUAL`, `certificate_id` must be
+     * manually specified in order to configure SSL for this domain.
+     * 
+ * + * .google.appengine.v1.SslSettings.SslManagementType ssl_management_type = 3; + * + * @return The sslManagementType. + */ + @java.lang.Override + public com.google.appengine.v1.SslSettings.SslManagementType getSslManagementType() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.SslSettings.SslManagementType result = + com.google.appengine.v1.SslSettings.SslManagementType.valueOf(sslManagementType_); + return result == null + ? com.google.appengine.v1.SslSettings.SslManagementType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * SSL management type for this domain. If `AUTOMATIC`, a managed certificate
+     * is automatically provisioned. If `MANUAL`, `certificate_id` must be
+     * manually specified in order to configure SSL for this domain.
+     * 
+ * + * .google.appengine.v1.SslSettings.SslManagementType ssl_management_type = 3; + * + * @param value The sslManagementType to set. + * @return This builder for chaining. + */ + public Builder setSslManagementType( + com.google.appengine.v1.SslSettings.SslManagementType value) { + if (value == null) { + throw new NullPointerException(); + } + + sslManagementType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * SSL management type for this domain. If `AUTOMATIC`, a managed certificate
+     * is automatically provisioned. If `MANUAL`, `certificate_id` must be
+     * manually specified in order to configure SSL for this domain.
+     * 
+ * + * .google.appengine.v1.SslSettings.SslManagementType ssl_management_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearSslManagementType() { + + sslManagementType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pendingManagedCertificateId_ = ""; + /** + * + * + *
+     * ID of the managed `AuthorizedCertificate` resource currently being
+     * provisioned, if applicable. Until the new managed certificate has been
+     * successfully provisioned, the previous SSL state will be preserved. Once
+     * the provisioning process completes, the `certificate_id` field will reflect
+     * the new managed certificate and this field will be left empty. To remove
+     * SSL support while there is still a pending managed certificate, clear the
+     * `certificate_id` field with an `UpdateDomainMappingRequest`.
+     * @OutputOnly
+     * 
+ * + * string pending_managed_certificate_id = 4; + * + * @return The pendingManagedCertificateId. + */ + public java.lang.String getPendingManagedCertificateId() { + java.lang.Object ref = pendingManagedCertificateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pendingManagedCertificateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ID of the managed `AuthorizedCertificate` resource currently being
+     * provisioned, if applicable. Until the new managed certificate has been
+     * successfully provisioned, the previous SSL state will be preserved. Once
+     * the provisioning process completes, the `certificate_id` field will reflect
+     * the new managed certificate and this field will be left empty. To remove
+     * SSL support while there is still a pending managed certificate, clear the
+     * `certificate_id` field with an `UpdateDomainMappingRequest`.
+     * @OutputOnly
+     * 
+ * + * string pending_managed_certificate_id = 4; + * + * @return The bytes for pendingManagedCertificateId. + */ + public com.google.protobuf.ByteString getPendingManagedCertificateIdBytes() { + java.lang.Object ref = pendingManagedCertificateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pendingManagedCertificateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ID of the managed `AuthorizedCertificate` resource currently being
+     * provisioned, if applicable. Until the new managed certificate has been
+     * successfully provisioned, the previous SSL state will be preserved. Once
+     * the provisioning process completes, the `certificate_id` field will reflect
+     * the new managed certificate and this field will be left empty. To remove
+     * SSL support while there is still a pending managed certificate, clear the
+     * `certificate_id` field with an `UpdateDomainMappingRequest`.
+     * @OutputOnly
+     * 
+ * + * string pending_managed_certificate_id = 4; + * + * @param value The pendingManagedCertificateId to set. + * @return This builder for chaining. + */ + public Builder setPendingManagedCertificateId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pendingManagedCertificateId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the managed `AuthorizedCertificate` resource currently being
+     * provisioned, if applicable. Until the new managed certificate has been
+     * successfully provisioned, the previous SSL state will be preserved. Once
+     * the provisioning process completes, the `certificate_id` field will reflect
+     * the new managed certificate and this field will be left empty. To remove
+     * SSL support while there is still a pending managed certificate, clear the
+     * `certificate_id` field with an `UpdateDomainMappingRequest`.
+     * @OutputOnly
+     * 
+ * + * string pending_managed_certificate_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearPendingManagedCertificateId() { + + pendingManagedCertificateId_ = getDefaultInstance().getPendingManagedCertificateId(); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the managed `AuthorizedCertificate` resource currently being
+     * provisioned, if applicable. Until the new managed certificate has been
+     * successfully provisioned, the previous SSL state will be preserved. Once
+     * the provisioning process completes, the `certificate_id` field will reflect
+     * the new managed certificate and this field will be left empty. To remove
+     * SSL support while there is still a pending managed certificate, clear the
+     * `certificate_id` field with an `UpdateDomainMappingRequest`.
+     * @OutputOnly
+     * 
+ * + * string pending_managed_certificate_id = 4; + * + * @param value The bytes for pendingManagedCertificateId to set. + * @return This builder for chaining. + */ + public Builder setPendingManagedCertificateIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pendingManagedCertificateId_ = 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.appengine.v1.SslSettings) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.SslSettings) + private static final com.google.appengine.v1.SslSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.SslSettings(); + } + + public static com.google.appengine.v1.SslSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SslSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SslSettings(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.appengine.v1.SslSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SslSettingsOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SslSettingsOrBuilder.java new file mode 100644 index 00000000..fb813b7b --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/SslSettingsOrBuilder.java @@ -0,0 +1,132 @@ +/* + * 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/appengine/v1/domain_mapping.proto + +package com.google.appengine.v1; + +public interface SslSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.SslSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * ID of the `AuthorizedCertificate` resource configuring SSL for the
+   * application. Clearing this field will remove SSL support.
+   * By default, a managed certificate is automatically created for every
+   * domain mapping. To omit SSL support or to configure SSL manually, specify
+   * `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
+   * be authorized to administer the `AuthorizedCertificate` resource to
+   * manually map it to a `DomainMapping` resource.
+   * Example: `12345`.
+   * 
+ * + * string certificate_id = 1; + * + * @return The certificateId. + */ + java.lang.String getCertificateId(); + /** + * + * + *
+   * ID of the `AuthorizedCertificate` resource configuring SSL for the
+   * application. Clearing this field will remove SSL support.
+   * By default, a managed certificate is automatically created for every
+   * domain mapping. To omit SSL support or to configure SSL manually, specify
+   * `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must
+   * be authorized to administer the `AuthorizedCertificate` resource to
+   * manually map it to a `DomainMapping` resource.
+   * Example: `12345`.
+   * 
+ * + * string certificate_id = 1; + * + * @return The bytes for certificateId. + */ + com.google.protobuf.ByteString getCertificateIdBytes(); + + /** + * + * + *
+   * SSL management type for this domain. If `AUTOMATIC`, a managed certificate
+   * is automatically provisioned. If `MANUAL`, `certificate_id` must be
+   * manually specified in order to configure SSL for this domain.
+   * 
+ * + * .google.appengine.v1.SslSettings.SslManagementType ssl_management_type = 3; + * + * @return The enum numeric value on the wire for sslManagementType. + */ + int getSslManagementTypeValue(); + /** + * + * + *
+   * SSL management type for this domain. If `AUTOMATIC`, a managed certificate
+   * is automatically provisioned. If `MANUAL`, `certificate_id` must be
+   * manually specified in order to configure SSL for this domain.
+   * 
+ * + * .google.appengine.v1.SslSettings.SslManagementType ssl_management_type = 3; + * + * @return The sslManagementType. + */ + com.google.appengine.v1.SslSettings.SslManagementType getSslManagementType(); + + /** + * + * + *
+   * ID of the managed `AuthorizedCertificate` resource currently being
+   * provisioned, if applicable. Until the new managed certificate has been
+   * successfully provisioned, the previous SSL state will be preserved. Once
+   * the provisioning process completes, the `certificate_id` field will reflect
+   * the new managed certificate and this field will be left empty. To remove
+   * SSL support while there is still a pending managed certificate, clear the
+   * `certificate_id` field with an `UpdateDomainMappingRequest`.
+   * @OutputOnly
+   * 
+ * + * string pending_managed_certificate_id = 4; + * + * @return The pendingManagedCertificateId. + */ + java.lang.String getPendingManagedCertificateId(); + /** + * + * + *
+   * ID of the managed `AuthorizedCertificate` resource currently being
+   * provisioned, if applicable. Until the new managed certificate has been
+   * successfully provisioned, the previous SSL state will be preserved. Once
+   * the provisioning process completes, the `certificate_id` field will reflect
+   * the new managed certificate and this field will be left empty. To remove
+   * SSL support while there is still a pending managed certificate, clear the
+   * `certificate_id` field with an `UpdateDomainMappingRequest`.
+   * @OutputOnly
+   * 
+ * + * string pending_managed_certificate_id = 4; + * + * @return The bytes for pendingManagedCertificateId. + */ + com.google.protobuf.ByteString getPendingManagedCertificateIdBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StandardSchedulerSettings.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StandardSchedulerSettings.java new file mode 100644 index 00000000..188cc25b --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StandardSchedulerSettings.java @@ -0,0 +1,833 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Scheduler settings for standard environment.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.StandardSchedulerSettings} + */ +public final class StandardSchedulerSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.StandardSchedulerSettings) + StandardSchedulerSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use StandardSchedulerSettings.newBuilder() to construct. + private StandardSchedulerSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StandardSchedulerSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StandardSchedulerSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StandardSchedulerSettings( + 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 9: + { + targetCpuUtilization_ = input.readDouble(); + break; + } + case 17: + { + targetThroughputUtilization_ = input.readDouble(); + break; + } + case 24: + { + minInstances_ = input.readInt32(); + break; + } + case 32: + { + maxInstances_ = input.readInt32(); + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_StandardSchedulerSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_StandardSchedulerSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.StandardSchedulerSettings.class, + com.google.appengine.v1.StandardSchedulerSettings.Builder.class); + } + + public static final int TARGET_CPU_UTILIZATION_FIELD_NUMBER = 1; + private double targetCpuUtilization_; + /** + * + * + *
+   * Target CPU utilization ratio to maintain when scaling.
+   * 
+ * + * double target_cpu_utilization = 1; + * + * @return The targetCpuUtilization. + */ + @java.lang.Override + public double getTargetCpuUtilization() { + return targetCpuUtilization_; + } + + public static final int TARGET_THROUGHPUT_UTILIZATION_FIELD_NUMBER = 2; + private double targetThroughputUtilization_; + /** + * + * + *
+   * Target throughput utilization ratio to maintain when scaling
+   * 
+ * + * double target_throughput_utilization = 2; + * + * @return The targetThroughputUtilization. + */ + @java.lang.Override + public double getTargetThroughputUtilization() { + return targetThroughputUtilization_; + } + + public static final int MIN_INSTANCES_FIELD_NUMBER = 3; + private int minInstances_; + /** + * + * + *
+   * Minimum number of instances to run for this version. Set to zero to disable
+   * `min_instances` configuration.
+   * 
+ * + * int32 min_instances = 3; + * + * @return The minInstances. + */ + @java.lang.Override + public int getMinInstances() { + return minInstances_; + } + + public static final int MAX_INSTANCES_FIELD_NUMBER = 4; + private int maxInstances_; + /** + * + * + *
+   * Maximum number of instances to run for this version. Set to zero to disable
+   * `max_instances` configuration.
+   * 
+ * + * int32 max_instances = 4; + * + * @return The maxInstances. + */ + @java.lang.Override + public int getMaxInstances() { + return maxInstances_; + } + + 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 (targetCpuUtilization_ != 0D) { + output.writeDouble(1, targetCpuUtilization_); + } + if (targetThroughputUtilization_ != 0D) { + output.writeDouble(2, targetThroughputUtilization_); + } + if (minInstances_ != 0) { + output.writeInt32(3, minInstances_); + } + if (maxInstances_ != 0) { + output.writeInt32(4, maxInstances_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetCpuUtilization_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, targetCpuUtilization_); + } + if (targetThroughputUtilization_ != 0D) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize(2, targetThroughputUtilization_); + } + if (minInstances_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, minInstances_); + } + if (maxInstances_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, maxInstances_); + } + 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.appengine.v1.StandardSchedulerSettings)) { + return super.equals(obj); + } + com.google.appengine.v1.StandardSchedulerSettings other = + (com.google.appengine.v1.StandardSchedulerSettings) obj; + + if (java.lang.Double.doubleToLongBits(getTargetCpuUtilization()) + != java.lang.Double.doubleToLongBits(other.getTargetCpuUtilization())) return false; + if (java.lang.Double.doubleToLongBits(getTargetThroughputUtilization()) + != java.lang.Double.doubleToLongBits(other.getTargetThroughputUtilization())) return false; + if (getMinInstances() != other.getMinInstances()) return false; + if (getMaxInstances() != other.getMaxInstances()) 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_CPU_UTILIZATION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTargetCpuUtilization())); + hash = (37 * hash) + TARGET_THROUGHPUT_UTILIZATION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTargetThroughputUtilization())); + hash = (37 * hash) + MIN_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getMinInstances(); + hash = (37 * hash) + MAX_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getMaxInstances(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.StandardSchedulerSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.StandardSchedulerSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.StandardSchedulerSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.StandardSchedulerSettings 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.appengine.v1.StandardSchedulerSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.StandardSchedulerSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.StandardSchedulerSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.StandardSchedulerSettings 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.appengine.v1.StandardSchedulerSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.StandardSchedulerSettings 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.appengine.v1.StandardSchedulerSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.StandardSchedulerSettings 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.appengine.v1.StandardSchedulerSettings 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; + } + /** + * + * + *
+   * Scheduler settings for standard environment.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.StandardSchedulerSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.StandardSchedulerSettings) + com.google.appengine.v1.StandardSchedulerSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_StandardSchedulerSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_StandardSchedulerSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.StandardSchedulerSettings.class, + com.google.appengine.v1.StandardSchedulerSettings.Builder.class); + } + + // Construct using com.google.appengine.v1.StandardSchedulerSettings.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(); + targetCpuUtilization_ = 0D; + + targetThroughputUtilization_ = 0D; + + minInstances_ = 0; + + maxInstances_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_StandardSchedulerSettings_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.StandardSchedulerSettings getDefaultInstanceForType() { + return com.google.appengine.v1.StandardSchedulerSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.StandardSchedulerSettings build() { + com.google.appengine.v1.StandardSchedulerSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.StandardSchedulerSettings buildPartial() { + com.google.appengine.v1.StandardSchedulerSettings result = + new com.google.appengine.v1.StandardSchedulerSettings(this); + result.targetCpuUtilization_ = targetCpuUtilization_; + result.targetThroughputUtilization_ = targetThroughputUtilization_; + result.minInstances_ = minInstances_; + result.maxInstances_ = maxInstances_; + 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.appengine.v1.StandardSchedulerSettings) { + return mergeFrom((com.google.appengine.v1.StandardSchedulerSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.StandardSchedulerSettings other) { + if (other == com.google.appengine.v1.StandardSchedulerSettings.getDefaultInstance()) + return this; + if (other.getTargetCpuUtilization() != 0D) { + setTargetCpuUtilization(other.getTargetCpuUtilization()); + } + if (other.getTargetThroughputUtilization() != 0D) { + setTargetThroughputUtilization(other.getTargetThroughputUtilization()); + } + if (other.getMinInstances() != 0) { + setMinInstances(other.getMinInstances()); + } + if (other.getMaxInstances() != 0) { + setMaxInstances(other.getMaxInstances()); + } + 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.appengine.v1.StandardSchedulerSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.StandardSchedulerSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double targetCpuUtilization_; + /** + * + * + *
+     * Target CPU utilization ratio to maintain when scaling.
+     * 
+ * + * double target_cpu_utilization = 1; + * + * @return The targetCpuUtilization. + */ + @java.lang.Override + public double getTargetCpuUtilization() { + return targetCpuUtilization_; + } + /** + * + * + *
+     * Target CPU utilization ratio to maintain when scaling.
+     * 
+ * + * double target_cpu_utilization = 1; + * + * @param value The targetCpuUtilization to set. + * @return This builder for chaining. + */ + public Builder setTargetCpuUtilization(double value) { + + targetCpuUtilization_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target CPU utilization ratio to maintain when scaling.
+     * 
+ * + * double target_cpu_utilization = 1; + * + * @return This builder for chaining. + */ + public Builder clearTargetCpuUtilization() { + + targetCpuUtilization_ = 0D; + onChanged(); + return this; + } + + private double targetThroughputUtilization_; + /** + * + * + *
+     * Target throughput utilization ratio to maintain when scaling
+     * 
+ * + * double target_throughput_utilization = 2; + * + * @return The targetThroughputUtilization. + */ + @java.lang.Override + public double getTargetThroughputUtilization() { + return targetThroughputUtilization_; + } + /** + * + * + *
+     * Target throughput utilization ratio to maintain when scaling
+     * 
+ * + * double target_throughput_utilization = 2; + * + * @param value The targetThroughputUtilization to set. + * @return This builder for chaining. + */ + public Builder setTargetThroughputUtilization(double value) { + + targetThroughputUtilization_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Target throughput utilization ratio to maintain when scaling
+     * 
+ * + * double target_throughput_utilization = 2; + * + * @return This builder for chaining. + */ + public Builder clearTargetThroughputUtilization() { + + targetThroughputUtilization_ = 0D; + onChanged(); + return this; + } + + private int minInstances_; + /** + * + * + *
+     * Minimum number of instances to run for this version. Set to zero to disable
+     * `min_instances` configuration.
+     * 
+ * + * int32 min_instances = 3; + * + * @return The minInstances. + */ + @java.lang.Override + public int getMinInstances() { + return minInstances_; + } + /** + * + * + *
+     * Minimum number of instances to run for this version. Set to zero to disable
+     * `min_instances` configuration.
+     * 
+ * + * int32 min_instances = 3; + * + * @param value The minInstances to set. + * @return This builder for chaining. + */ + public Builder setMinInstances(int value) { + + minInstances_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Minimum number of instances to run for this version. Set to zero to disable
+     * `min_instances` configuration.
+     * 
+ * + * int32 min_instances = 3; + * + * @return This builder for chaining. + */ + public Builder clearMinInstances() { + + minInstances_ = 0; + onChanged(); + return this; + } + + private int maxInstances_; + /** + * + * + *
+     * Maximum number of instances to run for this version. Set to zero to disable
+     * `max_instances` configuration.
+     * 
+ * + * int32 max_instances = 4; + * + * @return The maxInstances. + */ + @java.lang.Override + public int getMaxInstances() { + return maxInstances_; + } + /** + * + * + *
+     * Maximum number of instances to run for this version. Set to zero to disable
+     * `max_instances` configuration.
+     * 
+ * + * int32 max_instances = 4; + * + * @param value The maxInstances to set. + * @return This builder for chaining. + */ + public Builder setMaxInstances(int value) { + + maxInstances_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of instances to run for this version. Set to zero to disable
+     * `max_instances` configuration.
+     * 
+ * + * int32 max_instances = 4; + * + * @return This builder for chaining. + */ + public Builder clearMaxInstances() { + + maxInstances_ = 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.appengine.v1.StandardSchedulerSettings) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.StandardSchedulerSettings) + private static final com.google.appengine.v1.StandardSchedulerSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.StandardSchedulerSettings(); + } + + public static com.google.appengine.v1.StandardSchedulerSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StandardSchedulerSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StandardSchedulerSettings(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.appengine.v1.StandardSchedulerSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StandardSchedulerSettingsOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StandardSchedulerSettingsOrBuilder.java new file mode 100644 index 00000000..ada0af1f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StandardSchedulerSettingsOrBuilder.java @@ -0,0 +1,79 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface StandardSchedulerSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.StandardSchedulerSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target CPU utilization ratio to maintain when scaling.
+   * 
+ * + * double target_cpu_utilization = 1; + * + * @return The targetCpuUtilization. + */ + double getTargetCpuUtilization(); + + /** + * + * + *
+   * Target throughput utilization ratio to maintain when scaling
+   * 
+ * + * double target_throughput_utilization = 2; + * + * @return The targetThroughputUtilization. + */ + double getTargetThroughputUtilization(); + + /** + * + * + *
+   * Minimum number of instances to run for this version. Set to zero to disable
+   * `min_instances` configuration.
+   * 
+ * + * int32 min_instances = 3; + * + * @return The minInstances. + */ + int getMinInstances(); + + /** + * + * + *
+   * Maximum number of instances to run for this version. Set to zero to disable
+   * `max_instances` configuration.
+   * 
+ * + * int32 max_instances = 4; + * + * @return The maxInstances. + */ + int getMaxInstances(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StaticFilesHandler.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StaticFilesHandler.java new file mode 100644 index 00000000..5db322ab --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StaticFilesHandler.java @@ -0,0 +1,1848 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Files served directly to the user for a given URL, such as images, CSS
+ * stylesheets, or JavaScript source files. Static file handlers describe which
+ * files in the application directory are static files, and which URLs serve
+ * them.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.StaticFilesHandler} + */ +public final class StaticFilesHandler extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.StaticFilesHandler) + StaticFilesHandlerOrBuilder { + private static final long serialVersionUID = 0L; + // Use StaticFilesHandler.newBuilder() to construct. + private StaticFilesHandler(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StaticFilesHandler() { + path_ = ""; + uploadPathRegex_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StaticFilesHandler(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StaticFilesHandler( + 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(); + + path_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uploadPathRegex_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + httpHeaders_ = + com.google.protobuf.MapField.newMapField( + HttpHeadersDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry httpHeaders__ = + input.readMessage( + HttpHeadersDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + httpHeaders_.getMutableMap().put(httpHeaders__.getKey(), httpHeaders__.getValue()); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (expiration_ != null) { + subBuilder = expiration_.toBuilder(); + } + expiration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expiration_); + expiration_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + requireMatchingFile_ = input.readBool(); + break; + } + case 56: + { + applicationReadable_ = input.readBool(); + 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_StaticFilesHandler_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetHttpHeaders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_StaticFilesHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.StaticFilesHandler.class, + com.google.appengine.v1.StaticFilesHandler.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object path_; + /** + * + * + *
+   * Path to the static files matched by the URL pattern, from the
+   * application root directory. The path can refer to text matched in groupings
+   * in the URL pattern.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * Path to the static files matched by the URL pattern, from the
+   * application root directory. The path can refer to text matched in groupings
+   * in the URL pattern.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPLOAD_PATH_REGEX_FIELD_NUMBER = 2; + private volatile java.lang.Object uploadPathRegex_; + /** + * + * + *
+   * Regular expression that matches the file paths for all files that should be
+   * referenced by this handler.
+   * 
+ * + * string upload_path_regex = 2; + * + * @return The uploadPathRegex. + */ + @java.lang.Override + public java.lang.String getUploadPathRegex() { + java.lang.Object ref = uploadPathRegex_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uploadPathRegex_ = s; + return s; + } + } + /** + * + * + *
+   * Regular expression that matches the file paths for all files that should be
+   * referenced by this handler.
+   * 
+ * + * string upload_path_regex = 2; + * + * @return The bytes for uploadPathRegex. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUploadPathRegexBytes() { + java.lang.Object ref = uploadPathRegex_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uploadPathRegex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HTTP_HEADERS_FIELD_NUMBER = 3; + + private static final class HttpHeadersDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_StaticFilesHandler_HttpHeadersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField httpHeaders_; + + private com.google.protobuf.MapField + internalGetHttpHeaders() { + if (httpHeaders_ == null) { + return com.google.protobuf.MapField.emptyMapField(HttpHeadersDefaultEntryHolder.defaultEntry); + } + return httpHeaders_; + } + + public int getHttpHeadersCount() { + return internalGetHttpHeaders().getMap().size(); + } + /** + * + * + *
+   * HTTP headers to use for all responses from these URLs.
+   * 
+ * + * map<string, string> http_headers = 3; + */ + @java.lang.Override + public boolean containsHttpHeaders(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetHttpHeaders().getMap().containsKey(key); + } + /** Use {@link #getHttpHeadersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHttpHeaders() { + return getHttpHeadersMap(); + } + /** + * + * + *
+   * HTTP headers to use for all responses from these URLs.
+   * 
+ * + * map<string, string> http_headers = 3; + */ + @java.lang.Override + public java.util.Map getHttpHeadersMap() { + return internalGetHttpHeaders().getMap(); + } + /** + * + * + *
+   * HTTP headers to use for all responses from these URLs.
+   * 
+ * + * map<string, string> http_headers = 3; + */ + @java.lang.Override + public java.lang.String getHttpHeadersOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHttpHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * HTTP headers to use for all responses from these URLs.
+   * 
+ * + * map<string, string> http_headers = 3; + */ + @java.lang.Override + public java.lang.String getHttpHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHttpHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 4; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+   * MIME type used to serve all files served by this handler.
+   * Defaults to file-specific MIME types, which are derived from each file's
+   * filename extension.
+   * 
+ * + * string mime_type = 4; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+   * MIME type used to serve all files served by this handler.
+   * Defaults to file-specific MIME types, which are derived from each file's
+   * filename extension.
+   * 
+ * + * string mime_type = 4; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRATION_FIELD_NUMBER = 5; + private com.google.protobuf.Duration expiration_; + /** + * + * + *
+   * Time a static file served by this handler should be cached
+   * by web proxies and browsers.
+   * 
+ * + * .google.protobuf.Duration expiration = 5; + * + * @return Whether the expiration field is set. + */ + @java.lang.Override + public boolean hasExpiration() { + return expiration_ != null; + } + /** + * + * + *
+   * Time a static file served by this handler should be cached
+   * by web proxies and browsers.
+   * 
+ * + * .google.protobuf.Duration expiration = 5; + * + * @return The expiration. + */ + @java.lang.Override + public com.google.protobuf.Duration getExpiration() { + return expiration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expiration_; + } + /** + * + * + *
+   * Time a static file served by this handler should be cached
+   * by web proxies and browsers.
+   * 
+ * + * .google.protobuf.Duration expiration = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getExpirationOrBuilder() { + return getExpiration(); + } + + public static final int REQUIRE_MATCHING_FILE_FIELD_NUMBER = 6; + private boolean requireMatchingFile_; + /** + * + * + *
+   * Whether this handler should match the request if the file
+   * referenced by the handler does not exist.
+   * 
+ * + * bool require_matching_file = 6; + * + * @return The requireMatchingFile. + */ + @java.lang.Override + public boolean getRequireMatchingFile() { + return requireMatchingFile_; + } + + public static final int APPLICATION_READABLE_FIELD_NUMBER = 7; + private boolean applicationReadable_; + /** + * + * + *
+   * Whether files should also be uploaded as code data. By default, files
+   * declared in static file handlers are uploaded as static
+   * data and are only served to end users; they cannot be read by the
+   * application. If enabled, uploads are charged against both your code and
+   * static data storage resource quotas.
+   * 
+ * + * bool application_readable = 7; + * + * @return The applicationReadable. + */ + @java.lang.Override + public boolean getApplicationReadable() { + return applicationReadable_; + } + + 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 (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + if (!getUploadPathRegexBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uploadPathRegex_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetHttpHeaders(), HttpHeadersDefaultEntryHolder.defaultEntry, 3); + if (!getMimeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mimeType_); + } + if (expiration_ != null) { + output.writeMessage(5, getExpiration()); + } + if (requireMatchingFile_ != false) { + output.writeBool(6, requireMatchingFile_); + } + if (applicationReadable_ != false) { + output.writeBool(7, applicationReadable_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + if (!getUploadPathRegexBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uploadPathRegex_); + } + for (java.util.Map.Entry entry : + internalGetHttpHeaders().getMap().entrySet()) { + com.google.protobuf.MapEntry httpHeaders__ = + HttpHeadersDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, httpHeaders__); + } + if (!getMimeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mimeType_); + } + if (expiration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExpiration()); + } + if (requireMatchingFile_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requireMatchingFile_); + } + if (applicationReadable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, applicationReadable_); + } + 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.appengine.v1.StaticFilesHandler)) { + return super.equals(obj); + } + com.google.appengine.v1.StaticFilesHandler other = + (com.google.appengine.v1.StaticFilesHandler) obj; + + if (!getPath().equals(other.getPath())) return false; + if (!getUploadPathRegex().equals(other.getUploadPathRegex())) return false; + if (!internalGetHttpHeaders().equals(other.internalGetHttpHeaders())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (hasExpiration() != other.hasExpiration()) return false; + if (hasExpiration()) { + if (!getExpiration().equals(other.getExpiration())) return false; + } + if (getRequireMatchingFile() != other.getRequireMatchingFile()) return false; + if (getApplicationReadable() != other.getApplicationReadable()) 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) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + UPLOAD_PATH_REGEX_FIELD_NUMBER; + hash = (53 * hash) + getUploadPathRegex().hashCode(); + if (!internalGetHttpHeaders().getMap().isEmpty()) { + hash = (37 * hash) + HTTP_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetHttpHeaders().hashCode(); + } + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + if (hasExpiration()) { + hash = (37 * hash) + EXPIRATION_FIELD_NUMBER; + hash = (53 * hash) + getExpiration().hashCode(); + } + hash = (37 * hash) + REQUIRE_MATCHING_FILE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequireMatchingFile()); + hash = (37 * hash) + APPLICATION_READABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getApplicationReadable()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.StaticFilesHandler parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.StaticFilesHandler parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.StaticFilesHandler parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.StaticFilesHandler 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.appengine.v1.StaticFilesHandler parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.StaticFilesHandler parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.StaticFilesHandler parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.StaticFilesHandler 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.appengine.v1.StaticFilesHandler parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.StaticFilesHandler 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.appengine.v1.StaticFilesHandler parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.StaticFilesHandler 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.appengine.v1.StaticFilesHandler 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; + } + /** + * + * + *
+   * Files served directly to the user for a given URL, such as images, CSS
+   * stylesheets, or JavaScript source files. Static file handlers describe which
+   * files in the application directory are static files, and which URLs serve
+   * them.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.StaticFilesHandler} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.StaticFilesHandler) + com.google.appengine.v1.StaticFilesHandlerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_StaticFilesHandler_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetHttpHeaders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableHttpHeaders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_StaticFilesHandler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.StaticFilesHandler.class, + com.google.appengine.v1.StaticFilesHandler.Builder.class); + } + + // Construct using com.google.appengine.v1.StaticFilesHandler.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(); + path_ = ""; + + uploadPathRegex_ = ""; + + internalGetMutableHttpHeaders().clear(); + mimeType_ = ""; + + if (expirationBuilder_ == null) { + expiration_ = null; + } else { + expiration_ = null; + expirationBuilder_ = null; + } + requireMatchingFile_ = false; + + applicationReadable_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_StaticFilesHandler_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.StaticFilesHandler getDefaultInstanceForType() { + return com.google.appengine.v1.StaticFilesHandler.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.StaticFilesHandler build() { + com.google.appengine.v1.StaticFilesHandler result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.StaticFilesHandler buildPartial() { + com.google.appengine.v1.StaticFilesHandler result = + new com.google.appengine.v1.StaticFilesHandler(this); + int from_bitField0_ = bitField0_; + result.path_ = path_; + result.uploadPathRegex_ = uploadPathRegex_; + result.httpHeaders_ = internalGetHttpHeaders(); + result.httpHeaders_.makeImmutable(); + result.mimeType_ = mimeType_; + if (expirationBuilder_ == null) { + result.expiration_ = expiration_; + } else { + result.expiration_ = expirationBuilder_.build(); + } + result.requireMatchingFile_ = requireMatchingFile_; + result.applicationReadable_ = applicationReadable_; + 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.appengine.v1.StaticFilesHandler) { + return mergeFrom((com.google.appengine.v1.StaticFilesHandler) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.StaticFilesHandler other) { + if (other == com.google.appengine.v1.StaticFilesHandler.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + if (!other.getUploadPathRegex().isEmpty()) { + uploadPathRegex_ = other.uploadPathRegex_; + onChanged(); + } + internalGetMutableHttpHeaders().mergeFrom(other.internalGetHttpHeaders()); + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (other.hasExpiration()) { + mergeExpiration(other.getExpiration()); + } + if (other.getRequireMatchingFile() != false) { + setRequireMatchingFile(other.getRequireMatchingFile()); + } + if (other.getApplicationReadable() != false) { + setApplicationReadable(other.getApplicationReadable()); + } + 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.appengine.v1.StaticFilesHandler parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.StaticFilesHandler) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * Path to the static files matched by the URL pattern, from the
+     * application root directory. The path can refer to text matched in groupings
+     * in the URL pattern.
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to the static files matched by the URL pattern, from the
+     * application root directory. The path can refer to text matched in groupings
+     * in the URL pattern.
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to the static files matched by the URL pattern, from the
+     * application root directory. The path can refer to text matched in groupings
+     * in the URL pattern.
+     * 
+ * + * string path = 1; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the static files matched by the URL pattern, from the
+     * application root directory. The path can refer to text matched in groupings
+     * in the URL pattern.
+     * 
+ * + * string path = 1; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the static files matched by the URL pattern, from the
+     * application root directory. The path can refer to text matched in groupings
+     * in the URL pattern.
+     * 
+ * + * string path = 1; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + + private java.lang.Object uploadPathRegex_ = ""; + /** + * + * + *
+     * Regular expression that matches the file paths for all files that should be
+     * referenced by this handler.
+     * 
+ * + * string upload_path_regex = 2; + * + * @return The uploadPathRegex. + */ + public java.lang.String getUploadPathRegex() { + java.lang.Object ref = uploadPathRegex_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uploadPathRegex_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Regular expression that matches the file paths for all files that should be
+     * referenced by this handler.
+     * 
+ * + * string upload_path_regex = 2; + * + * @return The bytes for uploadPathRegex. + */ + public com.google.protobuf.ByteString getUploadPathRegexBytes() { + java.lang.Object ref = uploadPathRegex_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uploadPathRegex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Regular expression that matches the file paths for all files that should be
+     * referenced by this handler.
+     * 
+ * + * string upload_path_regex = 2; + * + * @param value The uploadPathRegex to set. + * @return This builder for chaining. + */ + public Builder setUploadPathRegex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uploadPathRegex_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Regular expression that matches the file paths for all files that should be
+     * referenced by this handler.
+     * 
+ * + * string upload_path_regex = 2; + * + * @return This builder for chaining. + */ + public Builder clearUploadPathRegex() { + + uploadPathRegex_ = getDefaultInstance().getUploadPathRegex(); + onChanged(); + return this; + } + /** + * + * + *
+     * Regular expression that matches the file paths for all files that should be
+     * referenced by this handler.
+     * 
+ * + * string upload_path_regex = 2; + * + * @param value The bytes for uploadPathRegex to set. + * @return This builder for chaining. + */ + public Builder setUploadPathRegexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uploadPathRegex_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField httpHeaders_; + + private com.google.protobuf.MapField + internalGetHttpHeaders() { + if (httpHeaders_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HttpHeadersDefaultEntryHolder.defaultEntry); + } + return httpHeaders_; + } + + private com.google.protobuf.MapField + internalGetMutableHttpHeaders() { + onChanged(); + ; + if (httpHeaders_ == null) { + httpHeaders_ = + com.google.protobuf.MapField.newMapField(HttpHeadersDefaultEntryHolder.defaultEntry); + } + if (!httpHeaders_.isMutable()) { + httpHeaders_ = httpHeaders_.copy(); + } + return httpHeaders_; + } + + public int getHttpHeadersCount() { + return internalGetHttpHeaders().getMap().size(); + } + /** + * + * + *
+     * HTTP headers to use for all responses from these URLs.
+     * 
+ * + * map<string, string> http_headers = 3; + */ + @java.lang.Override + public boolean containsHttpHeaders(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetHttpHeaders().getMap().containsKey(key); + } + /** Use {@link #getHttpHeadersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHttpHeaders() { + return getHttpHeadersMap(); + } + /** + * + * + *
+     * HTTP headers to use for all responses from these URLs.
+     * 
+ * + * map<string, string> http_headers = 3; + */ + @java.lang.Override + public java.util.Map getHttpHeadersMap() { + return internalGetHttpHeaders().getMap(); + } + /** + * + * + *
+     * HTTP headers to use for all responses from these URLs.
+     * 
+ * + * map<string, string> http_headers = 3; + */ + @java.lang.Override + public java.lang.String getHttpHeadersOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHttpHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * HTTP headers to use for all responses from these URLs.
+     * 
+ * + * map<string, string> http_headers = 3; + */ + @java.lang.Override + public java.lang.String getHttpHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHttpHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHttpHeaders() { + internalGetMutableHttpHeaders().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * HTTP headers to use for all responses from these URLs.
+     * 
+ * + * map<string, string> http_headers = 3; + */ + public Builder removeHttpHeaders(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableHttpHeaders().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableHttpHeaders() { + return internalGetMutableHttpHeaders().getMutableMap(); + } + /** + * + * + *
+     * HTTP headers to use for all responses from these URLs.
+     * 
+ * + * map<string, string> http_headers = 3; + */ + public Builder putHttpHeaders(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableHttpHeaders().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * HTTP headers to use for all responses from these URLs.
+     * 
+ * + * map<string, string> http_headers = 3; + */ + public Builder putAllHttpHeaders(java.util.Map values) { + internalGetMutableHttpHeaders().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * MIME type used to serve all files served by this handler.
+     * Defaults to file-specific MIME types, which are derived from each file's
+     * filename extension.
+     * 
+ * + * string mime_type = 4; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * MIME type used to serve all files served by this handler.
+     * Defaults to file-specific MIME types, which are derived from each file's
+     * filename extension.
+     * 
+ * + * string mime_type = 4; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * MIME type used to serve all files served by this handler.
+     * Defaults to file-specific MIME types, which are derived from each file's
+     * filename extension.
+     * 
+ * + * string mime_type = 4; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * MIME type used to serve all files served by this handler.
+     * Defaults to file-specific MIME types, which are derived from each file's
+     * filename extension.
+     * 
+ * + * string mime_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * MIME type used to serve all files served by this handler.
+     * Defaults to file-specific MIME types, which are derived from each file's
+     * filename extension.
+     * 
+ * + * string mime_type = 4; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration expiration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + expirationBuilder_; + /** + * + * + *
+     * Time a static file served by this handler should be cached
+     * by web proxies and browsers.
+     * 
+ * + * .google.protobuf.Duration expiration = 5; + * + * @return Whether the expiration field is set. + */ + public boolean hasExpiration() { + return expirationBuilder_ != null || expiration_ != null; + } + /** + * + * + *
+     * Time a static file served by this handler should be cached
+     * by web proxies and browsers.
+     * 
+ * + * .google.protobuf.Duration expiration = 5; + * + * @return The expiration. + */ + public com.google.protobuf.Duration getExpiration() { + if (expirationBuilder_ == null) { + return expiration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expiration_; + } else { + return expirationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time a static file served by this handler should be cached
+     * by web proxies and browsers.
+     * 
+ * + * .google.protobuf.Duration expiration = 5; + */ + public Builder setExpiration(com.google.protobuf.Duration value) { + if (expirationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expiration_ = value; + onChanged(); + } else { + expirationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time a static file served by this handler should be cached
+     * by web proxies and browsers.
+     * 
+ * + * .google.protobuf.Duration expiration = 5; + */ + public Builder setExpiration(com.google.protobuf.Duration.Builder builderForValue) { + if (expirationBuilder_ == null) { + expiration_ = builderForValue.build(); + onChanged(); + } else { + expirationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time a static file served by this handler should be cached
+     * by web proxies and browsers.
+     * 
+ * + * .google.protobuf.Duration expiration = 5; + */ + public Builder mergeExpiration(com.google.protobuf.Duration value) { + if (expirationBuilder_ == null) { + if (expiration_ != null) { + expiration_ = + com.google.protobuf.Duration.newBuilder(expiration_).mergeFrom(value).buildPartial(); + } else { + expiration_ = value; + } + onChanged(); + } else { + expirationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time a static file served by this handler should be cached
+     * by web proxies and browsers.
+     * 
+ * + * .google.protobuf.Duration expiration = 5; + */ + public Builder clearExpiration() { + if (expirationBuilder_ == null) { + expiration_ = null; + onChanged(); + } else { + expiration_ = null; + expirationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time a static file served by this handler should be cached
+     * by web proxies and browsers.
+     * 
+ * + * .google.protobuf.Duration expiration = 5; + */ + public com.google.protobuf.Duration.Builder getExpirationBuilder() { + + onChanged(); + return getExpirationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time a static file served by this handler should be cached
+     * by web proxies and browsers.
+     * 
+ * + * .google.protobuf.Duration expiration = 5; + */ + public com.google.protobuf.DurationOrBuilder getExpirationOrBuilder() { + if (expirationBuilder_ != null) { + return expirationBuilder_.getMessageOrBuilder(); + } else { + return expiration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : expiration_; + } + } + /** + * + * + *
+     * Time a static file served by this handler should be cached
+     * by web proxies and browsers.
+     * 
+ * + * .google.protobuf.Duration expiration = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getExpirationFieldBuilder() { + if (expirationBuilder_ == null) { + expirationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getExpiration(), getParentForChildren(), isClean()); + expiration_ = null; + } + return expirationBuilder_; + } + + private boolean requireMatchingFile_; + /** + * + * + *
+     * Whether this handler should match the request if the file
+     * referenced by the handler does not exist.
+     * 
+ * + * bool require_matching_file = 6; + * + * @return The requireMatchingFile. + */ + @java.lang.Override + public boolean getRequireMatchingFile() { + return requireMatchingFile_; + } + /** + * + * + *
+     * Whether this handler should match the request if the file
+     * referenced by the handler does not exist.
+     * 
+ * + * bool require_matching_file = 6; + * + * @param value The requireMatchingFile to set. + * @return This builder for chaining. + */ + public Builder setRequireMatchingFile(boolean value) { + + requireMatchingFile_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether this handler should match the request if the file
+     * referenced by the handler does not exist.
+     * 
+ * + * bool require_matching_file = 6; + * + * @return This builder for chaining. + */ + public Builder clearRequireMatchingFile() { + + requireMatchingFile_ = false; + onChanged(); + return this; + } + + private boolean applicationReadable_; + /** + * + * + *
+     * Whether files should also be uploaded as code data. By default, files
+     * declared in static file handlers are uploaded as static
+     * data and are only served to end users; they cannot be read by the
+     * application. If enabled, uploads are charged against both your code and
+     * static data storage resource quotas.
+     * 
+ * + * bool application_readable = 7; + * + * @return The applicationReadable. + */ + @java.lang.Override + public boolean getApplicationReadable() { + return applicationReadable_; + } + /** + * + * + *
+     * Whether files should also be uploaded as code data. By default, files
+     * declared in static file handlers are uploaded as static
+     * data and are only served to end users; they cannot be read by the
+     * application. If enabled, uploads are charged against both your code and
+     * static data storage resource quotas.
+     * 
+ * + * bool application_readable = 7; + * + * @param value The applicationReadable to set. + * @return This builder for chaining. + */ + public Builder setApplicationReadable(boolean value) { + + applicationReadable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether files should also be uploaded as code data. By default, files
+     * declared in static file handlers are uploaded as static
+     * data and are only served to end users; they cannot be read by the
+     * application. If enabled, uploads are charged against both your code and
+     * static data storage resource quotas.
+     * 
+ * + * bool application_readable = 7; + * + * @return This builder for chaining. + */ + public Builder clearApplicationReadable() { + + applicationReadable_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.appengine.v1.StaticFilesHandler) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.StaticFilesHandler) + private static final com.google.appengine.v1.StaticFilesHandler DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.StaticFilesHandler(); + } + + public static com.google.appengine.v1.StaticFilesHandler getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StaticFilesHandler parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StaticFilesHandler(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.appengine.v1.StaticFilesHandler getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StaticFilesHandlerOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StaticFilesHandlerOrBuilder.java new file mode 100644 index 00000000..dc752c32 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/StaticFilesHandlerOrBuilder.java @@ -0,0 +1,233 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface StaticFilesHandlerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.StaticFilesHandler) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Path to the static files matched by the URL pattern, from the
+   * application root directory. The path can refer to text matched in groupings
+   * in the URL pattern.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * Path to the static files matched by the URL pattern, from the
+   * application root directory. The path can refer to text matched in groupings
+   * in the URL pattern.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * Regular expression that matches the file paths for all files that should be
+   * referenced by this handler.
+   * 
+ * + * string upload_path_regex = 2; + * + * @return The uploadPathRegex. + */ + java.lang.String getUploadPathRegex(); + /** + * + * + *
+   * Regular expression that matches the file paths for all files that should be
+   * referenced by this handler.
+   * 
+ * + * string upload_path_regex = 2; + * + * @return The bytes for uploadPathRegex. + */ + com.google.protobuf.ByteString getUploadPathRegexBytes(); + + /** + * + * + *
+   * HTTP headers to use for all responses from these URLs.
+   * 
+ * + * map<string, string> http_headers = 3; + */ + int getHttpHeadersCount(); + /** + * + * + *
+   * HTTP headers to use for all responses from these URLs.
+   * 
+ * + * map<string, string> http_headers = 3; + */ + boolean containsHttpHeaders(java.lang.String key); + /** Use {@link #getHttpHeadersMap()} instead. */ + @java.lang.Deprecated + java.util.Map getHttpHeaders(); + /** + * + * + *
+   * HTTP headers to use for all responses from these URLs.
+   * 
+ * + * map<string, string> http_headers = 3; + */ + java.util.Map getHttpHeadersMap(); + /** + * + * + *
+   * HTTP headers to use for all responses from these URLs.
+   * 
+ * + * map<string, string> http_headers = 3; + */ + java.lang.String getHttpHeadersOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * HTTP headers to use for all responses from these URLs.
+   * 
+ * + * map<string, string> http_headers = 3; + */ + java.lang.String getHttpHeadersOrThrow(java.lang.String key); + + /** + * + * + *
+   * MIME type used to serve all files served by this handler.
+   * Defaults to file-specific MIME types, which are derived from each file's
+   * filename extension.
+   * 
+ * + * string mime_type = 4; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * MIME type used to serve all files served by this handler.
+   * Defaults to file-specific MIME types, which are derived from each file's
+   * filename extension.
+   * 
+ * + * string mime_type = 4; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * Time a static file served by this handler should be cached
+   * by web proxies and browsers.
+   * 
+ * + * .google.protobuf.Duration expiration = 5; + * + * @return Whether the expiration field is set. + */ + boolean hasExpiration(); + /** + * + * + *
+   * Time a static file served by this handler should be cached
+   * by web proxies and browsers.
+   * 
+ * + * .google.protobuf.Duration expiration = 5; + * + * @return The expiration. + */ + com.google.protobuf.Duration getExpiration(); + /** + * + * + *
+   * Time a static file served by this handler should be cached
+   * by web proxies and browsers.
+   * 
+ * + * .google.protobuf.Duration expiration = 5; + */ + com.google.protobuf.DurationOrBuilder getExpirationOrBuilder(); + + /** + * + * + *
+   * Whether this handler should match the request if the file
+   * referenced by the handler does not exist.
+   * 
+ * + * bool require_matching_file = 6; + * + * @return The requireMatchingFile. + */ + boolean getRequireMatchingFile(); + + /** + * + * + *
+   * Whether files should also be uploaded as code data. By default, files
+   * declared in static file handlers are uploaded as static
+   * data and are only served to end users; they cannot be read by the
+   * application. If enabled, uploads are charged against both your code and
+   * static data storage resource quotas.
+   * 
+ * + * bool application_readable = 7; + * + * @return The applicationReadable. + */ + boolean getApplicationReadable(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/TrafficSplit.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/TrafficSplit.java new file mode 100644 index 00000000..cdc5dd07 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/TrafficSplit.java @@ -0,0 +1,1209 @@ +/* + * 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/appengine/v1/service.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Traffic routing configuration for versions within a single service. Traffic
+ * splits define how traffic directed to the service is assigned to versions.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.TrafficSplit} + */ +public final class TrafficSplit extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.TrafficSplit) + TrafficSplitOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrafficSplit.newBuilder() to construct. + private TrafficSplit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrafficSplit() { + shardBy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrafficSplit(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TrafficSplit( + 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(); + + shardBy_ = rawValue; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allocations_ = + com.google.protobuf.MapField.newMapField( + AllocationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry allocations__ = + input.readMessage( + AllocationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + allocations_.getMutableMap().put(allocations__.getKey(), allocations__.getValue()); + 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.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_TrafficSplit_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetAllocations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_TrafficSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.TrafficSplit.class, + com.google.appengine.v1.TrafficSplit.Builder.class); + } + + /** + * + * + *
+   * Available sharding mechanisms.
+   * 
+ * + * Protobuf enum {@code google.appengine.v1.TrafficSplit.ShardBy} + */ + public enum ShardBy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Diversion method unspecified.
+     * 
+ * + * UNSPECIFIED = 0; + */ + UNSPECIFIED(0), + /** + * + * + *
+     * Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
+     * must be set by the application itself or no diversion will occur.
+     * 
+ * + * COOKIE = 1; + */ + COOKIE(1), + /** + * + * + *
+     * Diversion based on applying the modulus operation to a fingerprint
+     * of the IP address.
+     * 
+ * + * IP = 2; + */ + IP(2), + /** + * + * + *
+     * Diversion based on weighted random assignment. An incoming request is
+     * randomly routed to a version in the traffic split, with probability
+     * proportional to the version's traffic share.
+     * 
+ * + * RANDOM = 3; + */ + RANDOM(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Diversion method unspecified.
+     * 
+ * + * UNSPECIFIED = 0; + */ + public static final int UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
+     * must be set by the application itself or no diversion will occur.
+     * 
+ * + * COOKIE = 1; + */ + public static final int COOKIE_VALUE = 1; + /** + * + * + *
+     * Diversion based on applying the modulus operation to a fingerprint
+     * of the IP address.
+     * 
+ * + * IP = 2; + */ + public static final int IP_VALUE = 2; + /** + * + * + *
+     * Diversion based on weighted random assignment. An incoming request is
+     * randomly routed to a version in the traffic split, with probability
+     * proportional to the version's traffic share.
+     * 
+ * + * RANDOM = 3; + */ + public static final int RANDOM_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 ShardBy 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 ShardBy forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED; + case 1: + return COOKIE; + case 2: + return IP; + case 3: + return RANDOM; + 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 ShardBy findValueByNumber(int number) { + return ShardBy.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.appengine.v1.TrafficSplit.getDescriptor().getEnumTypes().get(0); + } + + private static final ShardBy[] VALUES = values(); + + public static ShardBy 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 ShardBy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.TrafficSplit.ShardBy) + } + + public static final int SHARD_BY_FIELD_NUMBER = 1; + private int shardBy_; + /** + * + * + *
+   * Mechanism used to determine which version a request is sent to.
+   * The traffic selection algorithm will
+   * be stable for either type until allocations are changed.
+   * 
+ * + * .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1; + * + * @return The enum numeric value on the wire for shardBy. + */ + @java.lang.Override + public int getShardByValue() { + return shardBy_; + } + /** + * + * + *
+   * Mechanism used to determine which version a request is sent to.
+   * The traffic selection algorithm will
+   * be stable for either type until allocations are changed.
+   * 
+ * + * .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1; + * + * @return The shardBy. + */ + @java.lang.Override + public com.google.appengine.v1.TrafficSplit.ShardBy getShardBy() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.TrafficSplit.ShardBy result = + com.google.appengine.v1.TrafficSplit.ShardBy.valueOf(shardBy_); + return result == null ? com.google.appengine.v1.TrafficSplit.ShardBy.UNRECOGNIZED : result; + } + + public static final int ALLOCATIONS_FIELD_NUMBER = 2; + + private static final class AllocationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_TrafficSplit_AllocationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.DOUBLE, + 0D); + } + + private com.google.protobuf.MapField allocations_; + + private com.google.protobuf.MapField + internalGetAllocations() { + if (allocations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AllocationsDefaultEntryHolder.defaultEntry); + } + return allocations_; + } + + public int getAllocationsCount() { + return internalGetAllocations().getMap().size(); + } + /** + * + * + *
+   * Mapping from version IDs within the service to fractional
+   * (0.000, 1] allocations of traffic for that version. Each version can
+   * be specified only once, but some versions in the service may not
+   * have any traffic allocation. Services that have traffic allocated
+   * cannot be deleted until either the service is deleted or
+   * their traffic allocation is removed. Allocations must sum to 1.
+   * Up to two decimal place precision is supported for IP-based splits and
+   * up to three decimal places is supported for cookie-based splits.
+   * 
+ * + * map<string, double> allocations = 2; + */ + @java.lang.Override + public boolean containsAllocations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAllocations().getMap().containsKey(key); + } + /** Use {@link #getAllocationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAllocations() { + return getAllocationsMap(); + } + /** + * + * + *
+   * Mapping from version IDs within the service to fractional
+   * (0.000, 1] allocations of traffic for that version. Each version can
+   * be specified only once, but some versions in the service may not
+   * have any traffic allocation. Services that have traffic allocated
+   * cannot be deleted until either the service is deleted or
+   * their traffic allocation is removed. Allocations must sum to 1.
+   * Up to two decimal place precision is supported for IP-based splits and
+   * up to three decimal places is supported for cookie-based splits.
+   * 
+ * + * map<string, double> allocations = 2; + */ + @java.lang.Override + public java.util.Map getAllocationsMap() { + return internalGetAllocations().getMap(); + } + /** + * + * + *
+   * Mapping from version IDs within the service to fractional
+   * (0.000, 1] allocations of traffic for that version. Each version can
+   * be specified only once, but some versions in the service may not
+   * have any traffic allocation. Services that have traffic allocated
+   * cannot be deleted until either the service is deleted or
+   * their traffic allocation is removed. Allocations must sum to 1.
+   * Up to two decimal place precision is supported for IP-based splits and
+   * up to three decimal places is supported for cookie-based splits.
+   * 
+ * + * map<string, double> allocations = 2; + */ + @java.lang.Override + public double getAllocationsOrDefault(java.lang.String key, double defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAllocations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Mapping from version IDs within the service to fractional
+   * (0.000, 1] allocations of traffic for that version. Each version can
+   * be specified only once, but some versions in the service may not
+   * have any traffic allocation. Services that have traffic allocated
+   * cannot be deleted until either the service is deleted or
+   * their traffic allocation is removed. Allocations must sum to 1.
+   * Up to two decimal place precision is supported for IP-based splits and
+   * up to three decimal places is supported for cookie-based splits.
+   * 
+ * + * map<string, double> allocations = 2; + */ + @java.lang.Override + public double getAllocationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAllocations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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 (shardBy_ != com.google.appengine.v1.TrafficSplit.ShardBy.UNSPECIFIED.getNumber()) { + output.writeEnum(1, shardBy_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAllocations(), AllocationsDefaultEntryHolder.defaultEntry, 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (shardBy_ != com.google.appengine.v1.TrafficSplit.ShardBy.UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, shardBy_); + } + for (java.util.Map.Entry entry : + internalGetAllocations().getMap().entrySet()) { + com.google.protobuf.MapEntry allocations__ = + AllocationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, allocations__); + } + 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.appengine.v1.TrafficSplit)) { + return super.equals(obj); + } + com.google.appengine.v1.TrafficSplit other = (com.google.appengine.v1.TrafficSplit) obj; + + if (shardBy_ != other.shardBy_) return false; + if (!internalGetAllocations().equals(other.internalGetAllocations())) 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) + SHARD_BY_FIELD_NUMBER; + hash = (53 * hash) + shardBy_; + if (!internalGetAllocations().getMap().isEmpty()) { + hash = (37 * hash) + ALLOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAllocations().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.TrafficSplit parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.TrafficSplit parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.TrafficSplit parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.TrafficSplit 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.appengine.v1.TrafficSplit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.TrafficSplit parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.TrafficSplit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.TrafficSplit 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.appengine.v1.TrafficSplit parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.TrafficSplit 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.appengine.v1.TrafficSplit parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.TrafficSplit 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.appengine.v1.TrafficSplit 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; + } + /** + * + * + *
+   * Traffic routing configuration for versions within a single service. Traffic
+   * splits define how traffic directed to the service is assigned to versions.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.TrafficSplit} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.TrafficSplit) + com.google.appengine.v1.TrafficSplitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_TrafficSplit_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetAllocations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableAllocations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_TrafficSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.TrafficSplit.class, + com.google.appengine.v1.TrafficSplit.Builder.class); + } + + // Construct using com.google.appengine.v1.TrafficSplit.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(); + shardBy_ = 0; + + internalGetMutableAllocations().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.ServiceProto + .internal_static_google_appengine_v1_TrafficSplit_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.TrafficSplit getDefaultInstanceForType() { + return com.google.appengine.v1.TrafficSplit.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.TrafficSplit build() { + com.google.appengine.v1.TrafficSplit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.TrafficSplit buildPartial() { + com.google.appengine.v1.TrafficSplit result = new com.google.appengine.v1.TrafficSplit(this); + int from_bitField0_ = bitField0_; + result.shardBy_ = shardBy_; + result.allocations_ = internalGetAllocations(); + result.allocations_.makeImmutable(); + 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.appengine.v1.TrafficSplit) { + return mergeFrom((com.google.appengine.v1.TrafficSplit) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.TrafficSplit other) { + if (other == com.google.appengine.v1.TrafficSplit.getDefaultInstance()) return this; + if (other.shardBy_ != 0) { + setShardByValue(other.getShardByValue()); + } + internalGetMutableAllocations().mergeFrom(other.internalGetAllocations()); + 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.appengine.v1.TrafficSplit parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.TrafficSplit) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int shardBy_ = 0; + /** + * + * + *
+     * Mechanism used to determine which version a request is sent to.
+     * The traffic selection algorithm will
+     * be stable for either type until allocations are changed.
+     * 
+ * + * .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1; + * + * @return The enum numeric value on the wire for shardBy. + */ + @java.lang.Override + public int getShardByValue() { + return shardBy_; + } + /** + * + * + *
+     * Mechanism used to determine which version a request is sent to.
+     * The traffic selection algorithm will
+     * be stable for either type until allocations are changed.
+     * 
+ * + * .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1; + * + * @param value The enum numeric value on the wire for shardBy to set. + * @return This builder for chaining. + */ + public Builder setShardByValue(int value) { + + shardBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Mechanism used to determine which version a request is sent to.
+     * The traffic selection algorithm will
+     * be stable for either type until allocations are changed.
+     * 
+ * + * .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1; + * + * @return The shardBy. + */ + @java.lang.Override + public com.google.appengine.v1.TrafficSplit.ShardBy getShardBy() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.TrafficSplit.ShardBy result = + com.google.appengine.v1.TrafficSplit.ShardBy.valueOf(shardBy_); + return result == null ? com.google.appengine.v1.TrafficSplit.ShardBy.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Mechanism used to determine which version a request is sent to.
+     * The traffic selection algorithm will
+     * be stable for either type until allocations are changed.
+     * 
+ * + * .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1; + * + * @param value The shardBy to set. + * @return This builder for chaining. + */ + public Builder setShardBy(com.google.appengine.v1.TrafficSplit.ShardBy value) { + if (value == null) { + throw new NullPointerException(); + } + + shardBy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Mechanism used to determine which version a request is sent to.
+     * The traffic selection algorithm will
+     * be stable for either type until allocations are changed.
+     * 
+ * + * .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1; + * + * @return This builder for chaining. + */ + public Builder clearShardBy() { + + shardBy_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField allocations_; + + private com.google.protobuf.MapField + internalGetAllocations() { + if (allocations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AllocationsDefaultEntryHolder.defaultEntry); + } + return allocations_; + } + + private com.google.protobuf.MapField + internalGetMutableAllocations() { + onChanged(); + ; + if (allocations_ == null) { + allocations_ = + com.google.protobuf.MapField.newMapField(AllocationsDefaultEntryHolder.defaultEntry); + } + if (!allocations_.isMutable()) { + allocations_ = allocations_.copy(); + } + return allocations_; + } + + public int getAllocationsCount() { + return internalGetAllocations().getMap().size(); + } + /** + * + * + *
+     * Mapping from version IDs within the service to fractional
+     * (0.000, 1] allocations of traffic for that version. Each version can
+     * be specified only once, but some versions in the service may not
+     * have any traffic allocation. Services that have traffic allocated
+     * cannot be deleted until either the service is deleted or
+     * their traffic allocation is removed. Allocations must sum to 1.
+     * Up to two decimal place precision is supported for IP-based splits and
+     * up to three decimal places is supported for cookie-based splits.
+     * 
+ * + * map<string, double> allocations = 2; + */ + @java.lang.Override + public boolean containsAllocations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAllocations().getMap().containsKey(key); + } + /** Use {@link #getAllocationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAllocations() { + return getAllocationsMap(); + } + /** + * + * + *
+     * Mapping from version IDs within the service to fractional
+     * (0.000, 1] allocations of traffic for that version. Each version can
+     * be specified only once, but some versions in the service may not
+     * have any traffic allocation. Services that have traffic allocated
+     * cannot be deleted until either the service is deleted or
+     * their traffic allocation is removed. Allocations must sum to 1.
+     * Up to two decimal place precision is supported for IP-based splits and
+     * up to three decimal places is supported for cookie-based splits.
+     * 
+ * + * map<string, double> allocations = 2; + */ + @java.lang.Override + public java.util.Map getAllocationsMap() { + return internalGetAllocations().getMap(); + } + /** + * + * + *
+     * Mapping from version IDs within the service to fractional
+     * (0.000, 1] allocations of traffic for that version. Each version can
+     * be specified only once, but some versions in the service may not
+     * have any traffic allocation. Services that have traffic allocated
+     * cannot be deleted until either the service is deleted or
+     * their traffic allocation is removed. Allocations must sum to 1.
+     * Up to two decimal place precision is supported for IP-based splits and
+     * up to three decimal places is supported for cookie-based splits.
+     * 
+ * + * map<string, double> allocations = 2; + */ + @java.lang.Override + public double getAllocationsOrDefault(java.lang.String key, double defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAllocations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Mapping from version IDs within the service to fractional
+     * (0.000, 1] allocations of traffic for that version. Each version can
+     * be specified only once, but some versions in the service may not
+     * have any traffic allocation. Services that have traffic allocated
+     * cannot be deleted until either the service is deleted or
+     * their traffic allocation is removed. Allocations must sum to 1.
+     * Up to two decimal place precision is supported for IP-based splits and
+     * up to three decimal places is supported for cookie-based splits.
+     * 
+ * + * map<string, double> allocations = 2; + */ + @java.lang.Override + public double getAllocationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAllocations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAllocations() { + internalGetMutableAllocations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Mapping from version IDs within the service to fractional
+     * (0.000, 1] allocations of traffic for that version. Each version can
+     * be specified only once, but some versions in the service may not
+     * have any traffic allocation. Services that have traffic allocated
+     * cannot be deleted until either the service is deleted or
+     * their traffic allocation is removed. Allocations must sum to 1.
+     * Up to two decimal place precision is supported for IP-based splits and
+     * up to three decimal places is supported for cookie-based splits.
+     * 
+ * + * map<string, double> allocations = 2; + */ + public Builder removeAllocations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAllocations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAllocations() { + return internalGetMutableAllocations().getMutableMap(); + } + /** + * + * + *
+     * Mapping from version IDs within the service to fractional
+     * (0.000, 1] allocations of traffic for that version. Each version can
+     * be specified only once, but some versions in the service may not
+     * have any traffic allocation. Services that have traffic allocated
+     * cannot be deleted until either the service is deleted or
+     * their traffic allocation is removed. Allocations must sum to 1.
+     * Up to two decimal place precision is supported for IP-based splits and
+     * up to three decimal places is supported for cookie-based splits.
+     * 
+ * + * map<string, double> allocations = 2; + */ + public Builder putAllocations(java.lang.String key, double value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + + internalGetMutableAllocations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Mapping from version IDs within the service to fractional
+     * (0.000, 1] allocations of traffic for that version. Each version can
+     * be specified only once, but some versions in the service may not
+     * have any traffic allocation. Services that have traffic allocated
+     * cannot be deleted until either the service is deleted or
+     * their traffic allocation is removed. Allocations must sum to 1.
+     * Up to two decimal place precision is supported for IP-based splits and
+     * up to three decimal places is supported for cookie-based splits.
+     * 
+ * + * map<string, double> allocations = 2; + */ + public Builder putAllAllocations(java.util.Map values) { + internalGetMutableAllocations().getMutableMap().putAll(values); + 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.appengine.v1.TrafficSplit) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.TrafficSplit) + private static final com.google.appengine.v1.TrafficSplit DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.TrafficSplit(); + } + + public static com.google.appengine.v1.TrafficSplit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrafficSplit parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TrafficSplit(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.appengine.v1.TrafficSplit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/TrafficSplitOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/TrafficSplitOrBuilder.java new file mode 100644 index 00000000..aedf9399 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/TrafficSplitOrBuilder.java @@ -0,0 +1,143 @@ +/* + * 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/appengine/v1/service.proto + +package com.google.appengine.v1; + +public interface TrafficSplitOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.TrafficSplit) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Mechanism used to determine which version a request is sent to.
+   * The traffic selection algorithm will
+   * be stable for either type until allocations are changed.
+   * 
+ * + * .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1; + * + * @return The enum numeric value on the wire for shardBy. + */ + int getShardByValue(); + /** + * + * + *
+   * Mechanism used to determine which version a request is sent to.
+   * The traffic selection algorithm will
+   * be stable for either type until allocations are changed.
+   * 
+ * + * .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1; + * + * @return The shardBy. + */ + com.google.appengine.v1.TrafficSplit.ShardBy getShardBy(); + + /** + * + * + *
+   * Mapping from version IDs within the service to fractional
+   * (0.000, 1] allocations of traffic for that version. Each version can
+   * be specified only once, but some versions in the service may not
+   * have any traffic allocation. Services that have traffic allocated
+   * cannot be deleted until either the service is deleted or
+   * their traffic allocation is removed. Allocations must sum to 1.
+   * Up to two decimal place precision is supported for IP-based splits and
+   * up to three decimal places is supported for cookie-based splits.
+   * 
+ * + * map<string, double> allocations = 2; + */ + int getAllocationsCount(); + /** + * + * + *
+   * Mapping from version IDs within the service to fractional
+   * (0.000, 1] allocations of traffic for that version. Each version can
+   * be specified only once, but some versions in the service may not
+   * have any traffic allocation. Services that have traffic allocated
+   * cannot be deleted until either the service is deleted or
+   * their traffic allocation is removed. Allocations must sum to 1.
+   * Up to two decimal place precision is supported for IP-based splits and
+   * up to three decimal places is supported for cookie-based splits.
+   * 
+ * + * map<string, double> allocations = 2; + */ + boolean containsAllocations(java.lang.String key); + /** Use {@link #getAllocationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAllocations(); + /** + * + * + *
+   * Mapping from version IDs within the service to fractional
+   * (0.000, 1] allocations of traffic for that version. Each version can
+   * be specified only once, but some versions in the service may not
+   * have any traffic allocation. Services that have traffic allocated
+   * cannot be deleted until either the service is deleted or
+   * their traffic allocation is removed. Allocations must sum to 1.
+   * Up to two decimal place precision is supported for IP-based splits and
+   * up to three decimal places is supported for cookie-based splits.
+   * 
+ * + * map<string, double> allocations = 2; + */ + java.util.Map getAllocationsMap(); + /** + * + * + *
+   * Mapping from version IDs within the service to fractional
+   * (0.000, 1] allocations of traffic for that version. Each version can
+   * be specified only once, but some versions in the service may not
+   * have any traffic allocation. Services that have traffic allocated
+   * cannot be deleted until either the service is deleted or
+   * their traffic allocation is removed. Allocations must sum to 1.
+   * Up to two decimal place precision is supported for IP-based splits and
+   * up to three decimal places is supported for cookie-based splits.
+   * 
+ * + * map<string, double> allocations = 2; + */ + double getAllocationsOrDefault(java.lang.String key, double defaultValue); + /** + * + * + *
+   * Mapping from version IDs within the service to fractional
+   * (0.000, 1] allocations of traffic for that version. Each version can
+   * be specified only once, but some versions in the service may not
+   * have any traffic allocation. Services that have traffic allocated
+   * cannot be deleted until either the service is deleted or
+   * their traffic allocation is removed. Allocations must sum to 1.
+   * Up to two decimal place precision is supported for IP-based splits and
+   * up to three decimal places is supported for cookie-based splits.
+   * 
+ * + * map<string, double> allocations = 2; + */ + double getAllocationsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateApplicationRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateApplicationRequest.java new file mode 100644 index 00000000..62d875ee --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateApplicationRequest.java @@ -0,0 +1,1184 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Applications.UpdateApplication`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateApplicationRequest} + */ +public final class UpdateApplicationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.UpdateApplicationRequest) + UpdateApplicationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateApplicationRequest.newBuilder() to construct. + private UpdateApplicationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateApplicationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateApplicationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateApplicationRequest( + 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; + } + case 18: + { + com.google.appengine.v1.Application.Builder subBuilder = null; + if (application_ != null) { + subBuilder = application_.toBuilder(); + } + application_ = + input.readMessage( + com.google.appengine.v1.Application.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(application_); + application_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + 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; + } + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateApplicationRequest.class, + com.google.appengine.v1.UpdateApplicationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the Application resource to update. Example: `apps/myapp`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the Application resource to update. Example: `apps/myapp`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_FIELD_NUMBER = 2; + private com.google.appengine.v1.Application application_; + /** + * + * + *
+   * An Application containing the updated resource.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return Whether the application field is set. + */ + @java.lang.Override + public boolean hasApplication() { + return application_ != null; + } + /** + * + * + *
+   * An Application containing the updated resource.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return The application. + */ + @java.lang.Override + public com.google.appengine.v1.Application getApplication() { + return application_ == null + ? com.google.appengine.v1.Application.getDefaultInstance() + : application_; + } + /** + * + * + *
+   * An Application containing the updated resource.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + */ + @java.lang.Override + public com.google.appengine.v1.ApplicationOrBuilder getApplicationOrBuilder() { + return getApplication(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (application_ != null) { + output.writeMessage(2, getApplication()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + 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 (application_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getApplication()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + 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.appengine.v1.UpdateApplicationRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.UpdateApplicationRequest other = + (com.google.appengine.v1.UpdateApplicationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasApplication() != other.hasApplication()) return false; + if (hasApplication()) { + if (!getApplication().equals(other.getApplication())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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(); + if (hasApplication()) { + hash = (37 * hash) + APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getApplication().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.UpdateApplicationRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateApplicationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateApplicationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateApplicationRequest 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.appengine.v1.UpdateApplicationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateApplicationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateApplicationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateApplicationRequest 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.appengine.v1.UpdateApplicationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateApplicationRequest 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.appengine.v1.UpdateApplicationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateApplicationRequest 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.appengine.v1.UpdateApplicationRequest 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 message for `Applications.UpdateApplication`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateApplicationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.UpdateApplicationRequest) + com.google.appengine.v1.UpdateApplicationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateApplicationRequest.class, + com.google.appengine.v1.UpdateApplicationRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.UpdateApplicationRequest.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_ = ""; + + if (applicationBuilder_ == null) { + application_ = null; + } else { + application_ = null; + applicationBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateApplicationRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateApplicationRequest getDefaultInstanceForType() { + return com.google.appengine.v1.UpdateApplicationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.UpdateApplicationRequest build() { + com.google.appengine.v1.UpdateApplicationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateApplicationRequest buildPartial() { + com.google.appengine.v1.UpdateApplicationRequest result = + new com.google.appengine.v1.UpdateApplicationRequest(this); + result.name_ = name_; + if (applicationBuilder_ == null) { + result.application_ = application_; + } else { + result.application_ = applicationBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.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.appengine.v1.UpdateApplicationRequest) { + return mergeFrom((com.google.appengine.v1.UpdateApplicationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.UpdateApplicationRequest other) { + if (other == com.google.appengine.v1.UpdateApplicationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasApplication()) { + mergeApplication(other.getApplication()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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.appengine.v1.UpdateApplicationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.UpdateApplicationRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the Application resource to update. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the Application resource to update. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the Application resource to update. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Application resource to update. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Application resource to update. Example: `apps/myapp`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.Application application_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application, + com.google.appengine.v1.Application.Builder, + com.google.appengine.v1.ApplicationOrBuilder> + applicationBuilder_; + /** + * + * + *
+     * An Application containing the updated resource.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return Whether the application field is set. + */ + public boolean hasApplication() { + return applicationBuilder_ != null || application_ != null; + } + /** + * + * + *
+     * An Application containing the updated resource.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return The application. + */ + public com.google.appengine.v1.Application getApplication() { + if (applicationBuilder_ == null) { + return application_ == null + ? com.google.appengine.v1.Application.getDefaultInstance() + : application_; + } else { + return applicationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * An Application containing the updated resource.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public Builder setApplication(com.google.appengine.v1.Application value) { + if (applicationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + application_ = value; + onChanged(); + } else { + applicationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * An Application containing the updated resource.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public Builder setApplication(com.google.appengine.v1.Application.Builder builderForValue) { + if (applicationBuilder_ == null) { + application_ = builderForValue.build(); + onChanged(); + } else { + applicationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * An Application containing the updated resource.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public Builder mergeApplication(com.google.appengine.v1.Application value) { + if (applicationBuilder_ == null) { + if (application_ != null) { + application_ = + com.google.appengine.v1.Application.newBuilder(application_) + .mergeFrom(value) + .buildPartial(); + } else { + application_ = value; + } + onChanged(); + } else { + applicationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * An Application containing the updated resource.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public Builder clearApplication() { + if (applicationBuilder_ == null) { + application_ = null; + onChanged(); + } else { + application_ = null; + applicationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * An Application containing the updated resource.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public com.google.appengine.v1.Application.Builder getApplicationBuilder() { + + onChanged(); + return getApplicationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An Application containing the updated resource.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + public com.google.appengine.v1.ApplicationOrBuilder getApplicationOrBuilder() { + if (applicationBuilder_ != null) { + return applicationBuilder_.getMessageOrBuilder(); + } else { + return application_ == null + ? com.google.appengine.v1.Application.getDefaultInstance() + : application_; + } + } + /** + * + * + *
+     * An Application containing the updated resource.
+     * 
+ * + * .google.appengine.v1.Application application = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application, + com.google.appengine.v1.Application.Builder, + com.google.appengine.v1.ApplicationOrBuilder> + getApplicationFieldBuilder() { + if (applicationBuilder_ == null) { + applicationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Application, + com.google.appengine.v1.Application.Builder, + com.google.appengine.v1.ApplicationOrBuilder>( + getApplication(), getParentForChildren(), isClean()); + application_ = null; + } + return applicationBuilder_; + } + + 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_; + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @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(); + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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_; + } + + @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.appengine.v1.UpdateApplicationRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.UpdateApplicationRequest) + private static final com.google.appengine.v1.UpdateApplicationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.UpdateApplicationRequest(); + } + + public static com.google.appengine.v1.UpdateApplicationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateApplicationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateApplicationRequest(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.appengine.v1.UpdateApplicationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateApplicationRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateApplicationRequestOrBuilder.java new file mode 100644 index 00000000..b7f65984 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateApplicationRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface UpdateApplicationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.UpdateApplicationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Application resource to update. Example: `apps/myapp`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the Application resource to update. Example: `apps/myapp`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * An Application containing the updated resource.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return Whether the application field is set. + */ + boolean hasApplication(); + /** + * + * + *
+   * An Application containing the updated resource.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + * + * @return The application. + */ + com.google.appengine.v1.Application getApplication(); + /** + * + * + *
+   * An Application containing the updated resource.
+   * 
+ * + * .google.appengine.v1.Application application = 2; + */ + com.google.appengine.v1.ApplicationOrBuilder getApplicationOrBuilder(); + + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateAuthorizedCertificateRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateAuthorizedCertificateRequest.java new file mode 100644 index 00000000..61344c4f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateAuthorizedCertificateRequest.java @@ -0,0 +1,1219 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `AuthorizedCertificates.UpdateAuthorizedCertificate`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateAuthorizedCertificateRequest} + */ +public final class UpdateAuthorizedCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.UpdateAuthorizedCertificateRequest) + UpdateAuthorizedCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAuthorizedCertificateRequest.newBuilder() to construct. + private UpdateAuthorizedCertificateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAuthorizedCertificateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAuthorizedCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateAuthorizedCertificateRequest( + 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; + } + case 18: + { + com.google.appengine.v1.AuthorizedCertificate.Builder subBuilder = null; + if (certificate_ != null) { + subBuilder = certificate_.toBuilder(); + } + certificate_ = + input.readMessage( + com.google.appengine.v1.AuthorizedCertificate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificate_); + certificate_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + 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; + } + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateAuthorizedCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateAuthorizedCertificateRequest.class, + com.google.appengine.v1.UpdateAuthorizedCertificateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_FIELD_NUMBER = 2; + private com.google.appengine.v1.AuthorizedCertificate certificate_; + /** + * + * + *
+   * An `AuthorizedCertificate` containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return Whether the certificate field is set. + */ + @java.lang.Override + public boolean hasCertificate() { + return certificate_ != null; + } + /** + * + * + *
+   * An `AuthorizedCertificate` containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return The certificate. + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificate getCertificate() { + return certificate_ == null + ? com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance() + : certificate_; + } + /** + * + * + *
+   * An `AuthorizedCertificate` containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + @java.lang.Override + public com.google.appengine.v1.AuthorizedCertificateOrBuilder getCertificateOrBuilder() { + return getCertificate(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Standard field mask for the set of fields to be updated. Updates are only
+   * supported on the `certificate_raw_data` and `display_name` fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated. Updates are only
+   * supported on the `certificate_raw_data` and `display_name` fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated. Updates are only
+   * supported on the `certificate_raw_data` and `display_name` fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (certificate_ != null) { + output.writeMessage(2, getCertificate()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + 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 (certificate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCertificate()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + 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.appengine.v1.UpdateAuthorizedCertificateRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.UpdateAuthorizedCertificateRequest other = + (com.google.appengine.v1.UpdateAuthorizedCertificateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCertificate() != other.hasCertificate()) return false; + if (hasCertificate()) { + if (!getCertificate().equals(other.getCertificate())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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(); + if (hasCertificate()) { + hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getCertificate().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest 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.appengine.v1.UpdateAuthorizedCertificateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest 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.appengine.v1.UpdateAuthorizedCertificateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest 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.appengine.v1.UpdateAuthorizedCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest 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.appengine.v1.UpdateAuthorizedCertificateRequest 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 message for `AuthorizedCertificates.UpdateAuthorizedCertificate`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateAuthorizedCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.UpdateAuthorizedCertificateRequest) + com.google.appengine.v1.UpdateAuthorizedCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateAuthorizedCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateAuthorizedCertificateRequest.class, + com.google.appengine.v1.UpdateAuthorizedCertificateRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.UpdateAuthorizedCertificateRequest.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_ = ""; + + if (certificateBuilder_ == null) { + certificate_ = null; + } else { + certificate_ = null; + certificateBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateAuthorizedCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateAuthorizedCertificateRequest getDefaultInstanceForType() { + return com.google.appengine.v1.UpdateAuthorizedCertificateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.UpdateAuthorizedCertificateRequest build() { + com.google.appengine.v1.UpdateAuthorizedCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateAuthorizedCertificateRequest buildPartial() { + com.google.appengine.v1.UpdateAuthorizedCertificateRequest result = + new com.google.appengine.v1.UpdateAuthorizedCertificateRequest(this); + result.name_ = name_; + if (certificateBuilder_ == null) { + result.certificate_ = certificate_; + } else { + result.certificate_ = certificateBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.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.appengine.v1.UpdateAuthorizedCertificateRequest) { + return mergeFrom((com.google.appengine.v1.UpdateAuthorizedCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.UpdateAuthorizedCertificateRequest other) { + if (other == com.google.appengine.v1.UpdateAuthorizedCertificateRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCertificate()) { + mergeCertificate(other.getCertificate()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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.appengine.v1.UpdateAuthorizedCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.UpdateAuthorizedCertificateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/authorizedCertificates/12345`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.AuthorizedCertificate certificate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.AuthorizedCertificate, + com.google.appengine.v1.AuthorizedCertificate.Builder, + com.google.appengine.v1.AuthorizedCertificateOrBuilder> + certificateBuilder_; + /** + * + * + *
+     * An `AuthorizedCertificate` containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return Whether the certificate field is set. + */ + public boolean hasCertificate() { + return certificateBuilder_ != null || certificate_ != null; + } + /** + * + * + *
+     * An `AuthorizedCertificate` containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return The certificate. + */ + public com.google.appengine.v1.AuthorizedCertificate getCertificate() { + if (certificateBuilder_ == null) { + return certificate_ == null + ? com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance() + : certificate_; + } else { + return certificateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * An `AuthorizedCertificate` containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public Builder setCertificate(com.google.appengine.v1.AuthorizedCertificate value) { + if (certificateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificate_ = value; + onChanged(); + } else { + certificateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * An `AuthorizedCertificate` containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public Builder setCertificate( + com.google.appengine.v1.AuthorizedCertificate.Builder builderForValue) { + if (certificateBuilder_ == null) { + certificate_ = builderForValue.build(); + onChanged(); + } else { + certificateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * An `AuthorizedCertificate` containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public Builder mergeCertificate(com.google.appengine.v1.AuthorizedCertificate value) { + if (certificateBuilder_ == null) { + if (certificate_ != null) { + certificate_ = + com.google.appengine.v1.AuthorizedCertificate.newBuilder(certificate_) + .mergeFrom(value) + .buildPartial(); + } else { + certificate_ = value; + } + onChanged(); + } else { + certificateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * An `AuthorizedCertificate` containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public Builder clearCertificate() { + if (certificateBuilder_ == null) { + certificate_ = null; + onChanged(); + } else { + certificate_ = null; + certificateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * An `AuthorizedCertificate` containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public com.google.appengine.v1.AuthorizedCertificate.Builder getCertificateBuilder() { + + onChanged(); + return getCertificateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An `AuthorizedCertificate` containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + public com.google.appengine.v1.AuthorizedCertificateOrBuilder getCertificateOrBuilder() { + if (certificateBuilder_ != null) { + return certificateBuilder_.getMessageOrBuilder(); + } else { + return certificate_ == null + ? com.google.appengine.v1.AuthorizedCertificate.getDefaultInstance() + : certificate_; + } + } + /** + * + * + *
+     * An `AuthorizedCertificate` containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.AuthorizedCertificate, + com.google.appengine.v1.AuthorizedCertificate.Builder, + com.google.appengine.v1.AuthorizedCertificateOrBuilder> + getCertificateFieldBuilder() { + if (certificateBuilder_ == null) { + certificateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.AuthorizedCertificate, + com.google.appengine.v1.AuthorizedCertificate.Builder, + com.google.appengine.v1.AuthorizedCertificateOrBuilder>( + getCertificate(), getParentForChildren(), isClean()); + certificate_ = null; + } + return certificateBuilder_; + } + + 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_; + /** + * + * + *
+     * Standard field mask for the set of fields to be updated. Updates are only
+     * supported on the `certificate_raw_data` and `display_name` fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated. Updates are only
+     * supported on the `certificate_raw_data` and `display_name` fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @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(); + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated. Updates are only
+     * supported on the `certificate_raw_data` and `display_name` fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated. Updates are only
+     * supported on the `certificate_raw_data` and `display_name` fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated. Updates are only
+     * supported on the `certificate_raw_data` and `display_name` fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated. Updates are only
+     * supported on the `certificate_raw_data` and `display_name` fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated. Updates are only
+     * supported on the `certificate_raw_data` and `display_name` fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated. Updates are only
+     * supported on the `certificate_raw_data` and `display_name` fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated. Updates are only
+     * supported on the `certificate_raw_data` and `display_name` fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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_; + } + + @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.appengine.v1.UpdateAuthorizedCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.UpdateAuthorizedCertificateRequest) + private static final com.google.appengine.v1.UpdateAuthorizedCertificateRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.UpdateAuthorizedCertificateRequest(); + } + + public static com.google.appengine.v1.UpdateAuthorizedCertificateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAuthorizedCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateAuthorizedCertificateRequest(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.appengine.v1.UpdateAuthorizedCertificateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateAuthorizedCertificateRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateAuthorizedCertificateRequestOrBuilder.java new file mode 100644 index 00000000..70a3c74d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateAuthorizedCertificateRequestOrBuilder.java @@ -0,0 +1,128 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface UpdateAuthorizedCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.UpdateAuthorizedCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/authorizedCertificates/12345`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * An `AuthorizedCertificate` containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return Whether the certificate field is set. + */ + boolean hasCertificate(); + /** + * + * + *
+   * An `AuthorizedCertificate` containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + * + * @return The certificate. + */ + com.google.appengine.v1.AuthorizedCertificate getCertificate(); + /** + * + * + *
+   * An `AuthorizedCertificate` containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.AuthorizedCertificate certificate = 2; + */ + com.google.appengine.v1.AuthorizedCertificateOrBuilder getCertificateOrBuilder(); + + /** + * + * + *
+   * Standard field mask for the set of fields to be updated. Updates are only
+   * supported on the `certificate_raw_data` and `display_name` fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated. Updates are only
+   * supported on the `certificate_raw_data` and `display_name` fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated. Updates are only
+   * supported on the `certificate_raw_data` and `display_name` fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateDomainMappingRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateDomainMappingRequest.java new file mode 100644 index 00000000..538a303c --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateDomainMappingRequest.java @@ -0,0 +1,1204 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `DomainMappings.UpdateDomainMapping`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateDomainMappingRequest} + */ +public final class UpdateDomainMappingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.UpdateDomainMappingRequest) + UpdateDomainMappingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDomainMappingRequest.newBuilder() to construct. + private UpdateDomainMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDomainMappingRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDomainMappingRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateDomainMappingRequest( + 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; + } + case 18: + { + com.google.appengine.v1.DomainMapping.Builder subBuilder = null; + if (domainMapping_ != null) { + subBuilder = domainMapping_.toBuilder(); + } + domainMapping_ = + input.readMessage( + com.google.appengine.v1.DomainMapping.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(domainMapping_); + domainMapping_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + 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; + } + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateDomainMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateDomainMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateDomainMappingRequest.class, + com.google.appengine.v1.UpdateDomainMappingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOMAIN_MAPPING_FIELD_NUMBER = 2; + private com.google.appengine.v1.DomainMapping domainMapping_; + /** + * + * + *
+   * A domain mapping containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return Whether the domainMapping field is set. + */ + @java.lang.Override + public boolean hasDomainMapping() { + return domainMapping_ != null; + } + /** + * + * + *
+   * A domain mapping containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return The domainMapping. + */ + @java.lang.Override + public com.google.appengine.v1.DomainMapping getDomainMapping() { + return domainMapping_ == null + ? com.google.appengine.v1.DomainMapping.getDefaultInstance() + : domainMapping_; + } + /** + * + * + *
+   * A domain mapping containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + @java.lang.Override + public com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingOrBuilder() { + return getDomainMapping(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (domainMapping_ != null) { + output.writeMessage(2, getDomainMapping()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + 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 (domainMapping_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDomainMapping()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + 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.appengine.v1.UpdateDomainMappingRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.UpdateDomainMappingRequest other = + (com.google.appengine.v1.UpdateDomainMappingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasDomainMapping() != other.hasDomainMapping()) return false; + if (hasDomainMapping()) { + if (!getDomainMapping().equals(other.getDomainMapping())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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(); + if (hasDomainMapping()) { + hash = (37 * hash) + DOMAIN_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getDomainMapping().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest 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.appengine.v1.UpdateDomainMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest 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.appengine.v1.UpdateDomainMappingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest 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.appengine.v1.UpdateDomainMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest 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.appengine.v1.UpdateDomainMappingRequest 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 message for `DomainMappings.UpdateDomainMapping`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateDomainMappingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.UpdateDomainMappingRequest) + com.google.appengine.v1.UpdateDomainMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateDomainMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateDomainMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateDomainMappingRequest.class, + com.google.appengine.v1.UpdateDomainMappingRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.UpdateDomainMappingRequest.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_ = ""; + + if (domainMappingBuilder_ == null) { + domainMapping_ = null; + } else { + domainMapping_ = null; + domainMappingBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateDomainMappingRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateDomainMappingRequest getDefaultInstanceForType() { + return com.google.appengine.v1.UpdateDomainMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.UpdateDomainMappingRequest build() { + com.google.appengine.v1.UpdateDomainMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateDomainMappingRequest buildPartial() { + com.google.appengine.v1.UpdateDomainMappingRequest result = + new com.google.appengine.v1.UpdateDomainMappingRequest(this); + result.name_ = name_; + if (domainMappingBuilder_ == null) { + result.domainMapping_ = domainMapping_; + } else { + result.domainMapping_ = domainMappingBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.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.appengine.v1.UpdateDomainMappingRequest) { + return mergeFrom((com.google.appengine.v1.UpdateDomainMappingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.UpdateDomainMappingRequest other) { + if (other == com.google.appengine.v1.UpdateDomainMappingRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasDomainMapping()) { + mergeDomainMapping(other.getDomainMapping()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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.appengine.v1.UpdateDomainMappingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.appengine.v1.UpdateDomainMappingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/domainMappings/example.com`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.DomainMapping domainMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.DomainMapping, + com.google.appengine.v1.DomainMapping.Builder, + com.google.appengine.v1.DomainMappingOrBuilder> + domainMappingBuilder_; + /** + * + * + *
+     * A domain mapping containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return Whether the domainMapping field is set. + */ + public boolean hasDomainMapping() { + return domainMappingBuilder_ != null || domainMapping_ != null; + } + /** + * + * + *
+     * A domain mapping containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return The domainMapping. + */ + public com.google.appengine.v1.DomainMapping getDomainMapping() { + if (domainMappingBuilder_ == null) { + return domainMapping_ == null + ? com.google.appengine.v1.DomainMapping.getDefaultInstance() + : domainMapping_; + } else { + return domainMappingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A domain mapping containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public Builder setDomainMapping(com.google.appengine.v1.DomainMapping value) { + if (domainMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + domainMapping_ = value; + onChanged(); + } else { + domainMappingBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A domain mapping containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public Builder setDomainMapping(com.google.appengine.v1.DomainMapping.Builder builderForValue) { + if (domainMappingBuilder_ == null) { + domainMapping_ = builderForValue.build(); + onChanged(); + } else { + domainMappingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A domain mapping containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public Builder mergeDomainMapping(com.google.appengine.v1.DomainMapping value) { + if (domainMappingBuilder_ == null) { + if (domainMapping_ != null) { + domainMapping_ = + com.google.appengine.v1.DomainMapping.newBuilder(domainMapping_) + .mergeFrom(value) + .buildPartial(); + } else { + domainMapping_ = value; + } + onChanged(); + } else { + domainMappingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A domain mapping containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public Builder clearDomainMapping() { + if (domainMappingBuilder_ == null) { + domainMapping_ = null; + onChanged(); + } else { + domainMapping_ = null; + domainMappingBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A domain mapping containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public com.google.appengine.v1.DomainMapping.Builder getDomainMappingBuilder() { + + onChanged(); + return getDomainMappingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A domain mapping containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + public com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingOrBuilder() { + if (domainMappingBuilder_ != null) { + return domainMappingBuilder_.getMessageOrBuilder(); + } else { + return domainMapping_ == null + ? com.google.appengine.v1.DomainMapping.getDefaultInstance() + : domainMapping_; + } + } + /** + * + * + *
+     * A domain mapping containing the updated resource. Only fields set
+     * in the field mask will be updated.
+     * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.DomainMapping, + com.google.appengine.v1.DomainMapping.Builder, + com.google.appengine.v1.DomainMappingOrBuilder> + getDomainMappingFieldBuilder() { + if (domainMappingBuilder_ == null) { + domainMappingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.DomainMapping, + com.google.appengine.v1.DomainMapping.Builder, + com.google.appengine.v1.DomainMappingOrBuilder>( + getDomainMapping(), getParentForChildren(), isClean()); + domainMapping_ = null; + } + return domainMappingBuilder_; + } + + 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_; + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @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(); + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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_; + } + + @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.appengine.v1.UpdateDomainMappingRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.UpdateDomainMappingRequest) + private static final com.google.appengine.v1.UpdateDomainMappingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.UpdateDomainMappingRequest(); + } + + public static com.google.appengine.v1.UpdateDomainMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDomainMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateDomainMappingRequest(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.appengine.v1.UpdateDomainMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateDomainMappingRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateDomainMappingRequestOrBuilder.java new file mode 100644 index 00000000..e11ecbaa --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateDomainMappingRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface UpdateDomainMappingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.UpdateDomainMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/domainMappings/example.com`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A domain mapping containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return Whether the domainMapping field is set. + */ + boolean hasDomainMapping(); + /** + * + * + *
+   * A domain mapping containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + * + * @return The domainMapping. + */ + com.google.appengine.v1.DomainMapping getDomainMapping(); + /** + * + * + *
+   * A domain mapping containing the updated resource. Only fields set
+   * in the field mask will be updated.
+   * 
+ * + * .google.appengine.v1.DomainMapping domain_mapping = 2; + */ + com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingOrBuilder(); + + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateIngressRuleRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateIngressRuleRequest.java new file mode 100644 index 00000000..bc8b8973 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateIngressRuleRequest.java @@ -0,0 +1,1191 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Firewall.UpdateIngressRule`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateIngressRuleRequest} + */ +public final class UpdateIngressRuleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.UpdateIngressRuleRequest) + UpdateIngressRuleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateIngressRuleRequest.newBuilder() to construct. + private UpdateIngressRuleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateIngressRuleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateIngressRuleRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateIngressRuleRequest( + 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; + } + case 18: + { + com.google.appengine.v1.firewall.FirewallRule.Builder subBuilder = null; + if (rule_ != null) { + subBuilder = rule_.toBuilder(); + } + rule_ = + input.readMessage( + com.google.appengine.v1.firewall.FirewallRule.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rule_); + rule_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + 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; + } + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateIngressRuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateIngressRuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateIngressRuleRequest.class, + com.google.appengine.v1.UpdateIngressRuleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the Firewall resource to update.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the Firewall resource to update.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RULE_FIELD_NUMBER = 2; + private com.google.appengine.v1.firewall.FirewallRule rule_; + /** + * + * + *
+   * A FirewallRule containing the updated resource
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return Whether the rule field is set. + */ + @java.lang.Override + public boolean hasRule() { + return rule_ != null; + } + /** + * + * + *
+   * A FirewallRule containing the updated resource
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return The rule. + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule getRule() { + return rule_ == null + ? com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance() + : rule_; + } + /** + * + * + *
+   * A FirewallRule containing the updated resource
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getRuleOrBuilder() { + return getRule(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (rule_ != null) { + output.writeMessage(2, getRule()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + 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 (rule_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRule()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + 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.appengine.v1.UpdateIngressRuleRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.UpdateIngressRuleRequest other = + (com.google.appengine.v1.UpdateIngressRuleRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasRule() != other.hasRule()) return false; + if (hasRule()) { + if (!getRule().equals(other.getRule())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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(); + if (hasRule()) { + hash = (37 * hash) + RULE_FIELD_NUMBER; + hash = (53 * hash) + getRule().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest 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.appengine.v1.UpdateIngressRuleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest 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.appengine.v1.UpdateIngressRuleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest 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.appengine.v1.UpdateIngressRuleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest 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.appengine.v1.UpdateIngressRuleRequest 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 message for `Firewall.UpdateIngressRule`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateIngressRuleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.UpdateIngressRuleRequest) + com.google.appengine.v1.UpdateIngressRuleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateIngressRuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateIngressRuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateIngressRuleRequest.class, + com.google.appengine.v1.UpdateIngressRuleRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.UpdateIngressRuleRequest.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_ = ""; + + if (ruleBuilder_ == null) { + rule_ = null; + } else { + rule_ = null; + ruleBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateIngressRuleRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateIngressRuleRequest getDefaultInstanceForType() { + return com.google.appengine.v1.UpdateIngressRuleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.UpdateIngressRuleRequest build() { + com.google.appengine.v1.UpdateIngressRuleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateIngressRuleRequest buildPartial() { + com.google.appengine.v1.UpdateIngressRuleRequest result = + new com.google.appengine.v1.UpdateIngressRuleRequest(this); + result.name_ = name_; + if (ruleBuilder_ == null) { + result.rule_ = rule_; + } else { + result.rule_ = ruleBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.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.appengine.v1.UpdateIngressRuleRequest) { + return mergeFrom((com.google.appengine.v1.UpdateIngressRuleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.UpdateIngressRuleRequest other) { + if (other == com.google.appengine.v1.UpdateIngressRuleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasRule()) { + mergeRule(other.getRule()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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.appengine.v1.UpdateIngressRuleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.UpdateIngressRuleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the Firewall resource to update.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the Firewall resource to update.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the Firewall resource to update.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Firewall resource to update.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Firewall resource to update.
+     * Example: `apps/myapp/firewall/ingressRules/100`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.firewall.FirewallRule rule_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + ruleBuilder_; + /** + * + * + *
+     * A FirewallRule containing the updated resource
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return Whether the rule field is set. + */ + public boolean hasRule() { + return ruleBuilder_ != null || rule_ != null; + } + /** + * + * + *
+     * A FirewallRule containing the updated resource
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return The rule. + */ + public com.google.appengine.v1.firewall.FirewallRule getRule() { + if (ruleBuilder_ == null) { + return rule_ == null + ? com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance() + : rule_; + } else { + return ruleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A FirewallRule containing the updated resource
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public Builder setRule(com.google.appengine.v1.firewall.FirewallRule value) { + if (ruleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rule_ = value; + onChanged(); + } else { + ruleBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A FirewallRule containing the updated resource
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public Builder setRule(com.google.appengine.v1.firewall.FirewallRule.Builder builderForValue) { + if (ruleBuilder_ == null) { + rule_ = builderForValue.build(); + onChanged(); + } else { + ruleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A FirewallRule containing the updated resource
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public Builder mergeRule(com.google.appengine.v1.firewall.FirewallRule value) { + if (ruleBuilder_ == null) { + if (rule_ != null) { + rule_ = + com.google.appengine.v1.firewall.FirewallRule.newBuilder(rule_) + .mergeFrom(value) + .buildPartial(); + } else { + rule_ = value; + } + onChanged(); + } else { + ruleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A FirewallRule containing the updated resource
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public Builder clearRule() { + if (ruleBuilder_ == null) { + rule_ = null; + onChanged(); + } else { + rule_ = null; + ruleBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A FirewallRule containing the updated resource
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public com.google.appengine.v1.firewall.FirewallRule.Builder getRuleBuilder() { + + onChanged(); + return getRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A FirewallRule containing the updated resource
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + public com.google.appengine.v1.firewall.FirewallRuleOrBuilder getRuleOrBuilder() { + if (ruleBuilder_ != null) { + return ruleBuilder_.getMessageOrBuilder(); + } else { + return rule_ == null + ? com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance() + : rule_; + } + } + /** + * + * + *
+     * A FirewallRule containing the updated resource
+     * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder> + getRuleFieldBuilder() { + if (ruleBuilder_ == null) { + ruleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.firewall.FirewallRule, + com.google.appengine.v1.firewall.FirewallRule.Builder, + com.google.appengine.v1.firewall.FirewallRuleOrBuilder>( + getRule(), getParentForChildren(), isClean()); + rule_ = null; + } + return ruleBuilder_; + } + + 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_; + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @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(); + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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_; + } + + @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.appengine.v1.UpdateIngressRuleRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.UpdateIngressRuleRequest) + private static final com.google.appengine.v1.UpdateIngressRuleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.UpdateIngressRuleRequest(); + } + + public static com.google.appengine.v1.UpdateIngressRuleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateIngressRuleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateIngressRuleRequest(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.appengine.v1.UpdateIngressRuleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateIngressRuleRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateIngressRuleRequestOrBuilder.java new file mode 100644 index 00000000..12a62985 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateIngressRuleRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface UpdateIngressRuleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.UpdateIngressRuleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Firewall resource to update.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the Firewall resource to update.
+   * Example: `apps/myapp/firewall/ingressRules/100`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A FirewallRule containing the updated resource
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return Whether the rule field is set. + */ + boolean hasRule(); + /** + * + * + *
+   * A FirewallRule containing the updated resource
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + * + * @return The rule. + */ + com.google.appengine.v1.firewall.FirewallRule getRule(); + /** + * + * + *
+   * A FirewallRule containing the updated resource
+   * 
+ * + * .google.appengine.v1.FirewallRule rule = 2; + */ + com.google.appengine.v1.firewall.FirewallRuleOrBuilder getRuleOrBuilder(); + + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceMethod.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceMethod.java new file mode 100644 index 00000000..9c333795 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceMethod.java @@ -0,0 +1,732 @@ +/* + * 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/appengine/v1/audit_data.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Detailed information about UpdateService call.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateServiceMethod} + */ +public final class UpdateServiceMethod extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.UpdateServiceMethod) + UpdateServiceMethodOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateServiceMethod.newBuilder() to construct. + private UpdateServiceMethod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateServiceMethod() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateServiceMethod(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateServiceMethod( + 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.appengine.v1.UpdateServiceRequest.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = + input.readMessage( + com.google.appengine.v1.UpdateServiceRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = 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.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_UpdateServiceMethod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_UpdateServiceMethod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateServiceMethod.class, + com.google.appengine.v1.UpdateServiceMethod.Builder.class); + } + + public static final int REQUEST_FIELD_NUMBER = 1; + private com.google.appengine.v1.UpdateServiceRequest request_; + /** + * + * + *
+   * Update service request.
+   * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + * + * @return Whether the request field is set. + */ + @java.lang.Override + public boolean hasRequest() { + return request_ != null; + } + /** + * + * + *
+   * Update service request.
+   * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + * + * @return The request. + */ + @java.lang.Override + public com.google.appengine.v1.UpdateServiceRequest getRequest() { + return request_ == null + ? com.google.appengine.v1.UpdateServiceRequest.getDefaultInstance() + : request_; + } + /** + * + * + *
+   * Update service request.
+   * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + */ + @java.lang.Override + public com.google.appengine.v1.UpdateServiceRequestOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + 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 (request_ != null) { + output.writeMessage(1, getRequest()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRequest()); + } + 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.appengine.v1.UpdateServiceMethod)) { + return super.equals(obj); + } + com.google.appengine.v1.UpdateServiceMethod other = + (com.google.appengine.v1.UpdateServiceMethod) obj; + + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest().equals(other.getRequest())) 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 (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.UpdateServiceMethod parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateServiceMethod parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateServiceMethod parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateServiceMethod 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.appengine.v1.UpdateServiceMethod parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateServiceMethod parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateServiceMethod parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateServiceMethod 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.appengine.v1.UpdateServiceMethod parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateServiceMethod 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.appengine.v1.UpdateServiceMethod parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateServiceMethod 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.appengine.v1.UpdateServiceMethod 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; + } + /** + * + * + *
+   * Detailed information about UpdateService call.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateServiceMethod} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.UpdateServiceMethod) + com.google.appengine.v1.UpdateServiceMethodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_UpdateServiceMethod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_UpdateServiceMethod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateServiceMethod.class, + com.google.appengine.v1.UpdateServiceMethod.Builder.class); + } + + // Construct using com.google.appengine.v1.UpdateServiceMethod.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 (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AuditDataProto + .internal_static_google_appengine_v1_UpdateServiceMethod_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateServiceMethod getDefaultInstanceForType() { + return com.google.appengine.v1.UpdateServiceMethod.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.UpdateServiceMethod build() { + com.google.appengine.v1.UpdateServiceMethod result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateServiceMethod buildPartial() { + com.google.appengine.v1.UpdateServiceMethod result = + new com.google.appengine.v1.UpdateServiceMethod(this); + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.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.appengine.v1.UpdateServiceMethod) { + return mergeFrom((com.google.appengine.v1.UpdateServiceMethod) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.UpdateServiceMethod other) { + if (other == com.google.appengine.v1.UpdateServiceMethod.getDefaultInstance()) return this; + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + 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.appengine.v1.UpdateServiceMethod parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.UpdateServiceMethod) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.appengine.v1.UpdateServiceRequest request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.UpdateServiceRequest, + com.google.appengine.v1.UpdateServiceRequest.Builder, + com.google.appengine.v1.UpdateServiceRequestOrBuilder> + requestBuilder_; + /** + * + * + *
+     * Update service request.
+     * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + * + * @return Whether the request field is set. + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + * + * + *
+     * Update service request.
+     * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + * + * @return The request. + */ + public com.google.appengine.v1.UpdateServiceRequest getRequest() { + if (requestBuilder_ == null) { + return request_ == null + ? com.google.appengine.v1.UpdateServiceRequest.getDefaultInstance() + : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Update service request.
+     * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + */ + public Builder setRequest(com.google.appengine.v1.UpdateServiceRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Update service request.
+     * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + */ + public Builder setRequest( + com.google.appengine.v1.UpdateServiceRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Update service request.
+     * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + */ + public Builder mergeRequest(com.google.appengine.v1.UpdateServiceRequest value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.appengine.v1.UpdateServiceRequest.newBuilder(request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Update service request.
+     * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Update service request.
+     * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + */ + public com.google.appengine.v1.UpdateServiceRequest.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Update service request.
+     * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + */ + public com.google.appengine.v1.UpdateServiceRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null + ? com.google.appengine.v1.UpdateServiceRequest.getDefaultInstance() + : request_; + } + } + /** + * + * + *
+     * Update service request.
+     * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.UpdateServiceRequest, + com.google.appengine.v1.UpdateServiceRequest.Builder, + com.google.appengine.v1.UpdateServiceRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.UpdateServiceRequest, + com.google.appengine.v1.UpdateServiceRequest.Builder, + com.google.appengine.v1.UpdateServiceRequestOrBuilder>( + getRequest(), getParentForChildren(), isClean()); + request_ = null; + } + return requestBuilder_; + } + + @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.appengine.v1.UpdateServiceMethod) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.UpdateServiceMethod) + private static final com.google.appengine.v1.UpdateServiceMethod DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.UpdateServiceMethod(); + } + + public static com.google.appengine.v1.UpdateServiceMethod getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateServiceMethod parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateServiceMethod(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.appengine.v1.UpdateServiceMethod getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceMethodOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceMethodOrBuilder.java new file mode 100644 index 00000000..5b9d1183 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceMethodOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/appengine/v1/audit_data.proto + +package com.google.appengine.v1; + +public interface UpdateServiceMethodOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.UpdateServiceMethod) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Update service request.
+   * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + * + * @return Whether the request field is set. + */ + boolean hasRequest(); + /** + * + * + *
+   * Update service request.
+   * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + * + * @return The request. + */ + com.google.appengine.v1.UpdateServiceRequest getRequest(); + /** + * + * + *
+   * Update service request.
+   * 
+ * + * .google.appengine.v1.UpdateServiceRequest request = 1; + */ + com.google.appengine.v1.UpdateServiceRequestOrBuilder getRequestOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceRequest.java new file mode 100644 index 00000000..d796042c --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceRequest.java @@ -0,0 +1,1320 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Services.UpdateService`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateServiceRequest} + */ +public final class UpdateServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.UpdateServiceRequest) + UpdateServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateServiceRequest.newBuilder() to construct. + private UpdateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateServiceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateServiceRequest( + 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; + } + case 18: + { + com.google.appengine.v1.Service.Builder subBuilder = null; + if (service_ != null) { + subBuilder = service_.toBuilder(); + } + service_ = + input.readMessage(com.google.appengine.v1.Service.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(service_); + service_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + 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 32: + { + migrateTraffic_ = input.readBool(); + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateServiceRequest.class, + com.google.appengine.v1.UpdateServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource to update. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource to update. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 2; + private com.google.appengine.v1.Service service_; + /** + * + * + *
+   * A Service resource containing the updated service. Only fields set in the
+   * field mask will be updated.
+   * 
+ * + * .google.appengine.v1.Service service = 2; + * + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return service_ != null; + } + /** + * + * + *
+   * A Service resource containing the updated service. Only fields set in the
+   * field mask will be updated.
+   * 
+ * + * .google.appengine.v1.Service service = 2; + * + * @return The service. + */ + @java.lang.Override + public com.google.appengine.v1.Service getService() { + return service_ == null ? com.google.appengine.v1.Service.getDefaultInstance() : service_; + } + /** + * + * + *
+   * A Service resource containing the updated service. Only fields set in the
+   * field mask will be updated.
+   * 
+ * + * .google.appengine.v1.Service service = 2; + */ + @java.lang.Override + public com.google.appengine.v1.ServiceOrBuilder getServiceOrBuilder() { + return getService(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int MIGRATE_TRAFFIC_FIELD_NUMBER = 4; + private boolean migrateTraffic_; + /** + * + * + *
+   * Set to `true` to gradually shift traffic to one or more versions that you
+   * specify. By default, traffic is shifted immediately.
+   * For gradual traffic migration, the target versions
+   * must be located within instances that are configured for both
+   * [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType)
+   * and
+   * [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling).
+   * You must specify the
+   * [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy)
+   * field in the Service resource. Gradual traffic migration is not
+   * supported in the App Engine flexible environment. For examples, see
+   * [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
+   * 
+ * + * bool migrate_traffic = 4; + * + * @return The migrateTraffic. + */ + @java.lang.Override + public boolean getMigrateTraffic() { + return migrateTraffic_; + } + + 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 (service_ != null) { + output.writeMessage(2, getService()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + if (migrateTraffic_ != false) { + output.writeBool(4, migrateTraffic_); + } + 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 (service_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getService()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + if (migrateTraffic_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, migrateTraffic_); + } + 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.appengine.v1.UpdateServiceRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.UpdateServiceRequest other = + (com.google.appengine.v1.UpdateServiceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService().equals(other.getService())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (getMigrateTraffic() != other.getMigrateTraffic()) 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(); + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + MIGRATE_TRAFFIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMigrateTraffic()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.UpdateServiceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateServiceRequest 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.appengine.v1.UpdateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateServiceRequest 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.appengine.v1.UpdateServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateServiceRequest 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.appengine.v1.UpdateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateServiceRequest 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.appengine.v1.UpdateServiceRequest 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 message for `Services.UpdateService`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.UpdateServiceRequest) + com.google.appengine.v1.UpdateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateServiceRequest.class, + com.google.appengine.v1.UpdateServiceRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.UpdateServiceRequest.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_ = ""; + + if (serviceBuilder_ == null) { + service_ = null; + } else { + service_ = null; + serviceBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + migrateTraffic_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateServiceRequest getDefaultInstanceForType() { + return com.google.appengine.v1.UpdateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.UpdateServiceRequest build() { + com.google.appengine.v1.UpdateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateServiceRequest buildPartial() { + com.google.appengine.v1.UpdateServiceRequest result = + new com.google.appengine.v1.UpdateServiceRequest(this); + result.name_ = name_; + if (serviceBuilder_ == null) { + result.service_ = service_; + } else { + result.service_ = serviceBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.migrateTraffic_ = migrateTraffic_; + 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.appengine.v1.UpdateServiceRequest) { + return mergeFrom((com.google.appengine.v1.UpdateServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.UpdateServiceRequest other) { + if (other == com.google.appengine.v1.UpdateServiceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasService()) { + mergeService(other.getService()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.getMigrateTraffic() != false) { + setMigrateTraffic(other.getMigrateTraffic()); + } + 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.appengine.v1.UpdateServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.UpdateServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource to update. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource to update. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource to update. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to update. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to update. Example: `apps/myapp/services/default`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.Service service_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Service, + com.google.appengine.v1.Service.Builder, + com.google.appengine.v1.ServiceOrBuilder> + serviceBuilder_; + /** + * + * + *
+     * A Service resource containing the updated service. Only fields set in the
+     * field mask will be updated.
+     * 
+ * + * .google.appengine.v1.Service service = 2; + * + * @return Whether the service field is set. + */ + public boolean hasService() { + return serviceBuilder_ != null || service_ != null; + } + /** + * + * + *
+     * A Service resource containing the updated service. Only fields set in the
+     * field mask will be updated.
+     * 
+ * + * .google.appengine.v1.Service service = 2; + * + * @return The service. + */ + public com.google.appengine.v1.Service getService() { + if (serviceBuilder_ == null) { + return service_ == null ? com.google.appengine.v1.Service.getDefaultInstance() : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A Service resource containing the updated service. Only fields set in the
+     * field mask will be updated.
+     * 
+ * + * .google.appengine.v1.Service service = 2; + */ + public Builder setService(com.google.appengine.v1.Service value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + onChanged(); + } else { + serviceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A Service resource containing the updated service. Only fields set in the
+     * field mask will be updated.
+     * 
+ * + * .google.appengine.v1.Service service = 2; + */ + public Builder setService(com.google.appengine.v1.Service.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + onChanged(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A Service resource containing the updated service. Only fields set in the
+     * field mask will be updated.
+     * 
+ * + * .google.appengine.v1.Service service = 2; + */ + public Builder mergeService(com.google.appengine.v1.Service value) { + if (serviceBuilder_ == null) { + if (service_ != null) { + service_ = + com.google.appengine.v1.Service.newBuilder(service_).mergeFrom(value).buildPartial(); + } else { + service_ = value; + } + onChanged(); + } else { + serviceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A Service resource containing the updated service. Only fields set in the
+     * field mask will be updated.
+     * 
+ * + * .google.appengine.v1.Service service = 2; + */ + public Builder clearService() { + if (serviceBuilder_ == null) { + service_ = null; + onChanged(); + } else { + service_ = null; + serviceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A Service resource containing the updated service. Only fields set in the
+     * field mask will be updated.
+     * 
+ * + * .google.appengine.v1.Service service = 2; + */ + public com.google.appengine.v1.Service.Builder getServiceBuilder() { + + onChanged(); + return getServiceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A Service resource containing the updated service. Only fields set in the
+     * field mask will be updated.
+     * 
+ * + * .google.appengine.v1.Service service = 2; + */ + public com.google.appengine.v1.ServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null ? com.google.appengine.v1.Service.getDefaultInstance() : service_; + } + } + /** + * + * + *
+     * A Service resource containing the updated service. Only fields set in the
+     * field mask will be updated.
+     * 
+ * + * .google.appengine.v1.Service service = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Service, + com.google.appengine.v1.Service.Builder, + com.google.appengine.v1.ServiceOrBuilder> + getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Service, + com.google.appengine.v1.Service.Builder, + com.google.appengine.v1.ServiceOrBuilder>( + getService(), getParentForChildren(), isClean()); + service_ = null; + } + return serviceBuilder_; + } + + 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_; + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @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(); + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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 boolean migrateTraffic_; + /** + * + * + *
+     * Set to `true` to gradually shift traffic to one or more versions that you
+     * specify. By default, traffic is shifted immediately.
+     * For gradual traffic migration, the target versions
+     * must be located within instances that are configured for both
+     * [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType)
+     * and
+     * [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling).
+     * You must specify the
+     * [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy)
+     * field in the Service resource. Gradual traffic migration is not
+     * supported in the App Engine flexible environment. For examples, see
+     * [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
+     * 
+ * + * bool migrate_traffic = 4; + * + * @return The migrateTraffic. + */ + @java.lang.Override + public boolean getMigrateTraffic() { + return migrateTraffic_; + } + /** + * + * + *
+     * Set to `true` to gradually shift traffic to one or more versions that you
+     * specify. By default, traffic is shifted immediately.
+     * For gradual traffic migration, the target versions
+     * must be located within instances that are configured for both
+     * [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType)
+     * and
+     * [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling).
+     * You must specify the
+     * [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy)
+     * field in the Service resource. Gradual traffic migration is not
+     * supported in the App Engine flexible environment. For examples, see
+     * [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
+     * 
+ * + * bool migrate_traffic = 4; + * + * @param value The migrateTraffic to set. + * @return This builder for chaining. + */ + public Builder setMigrateTraffic(boolean value) { + + migrateTraffic_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Set to `true` to gradually shift traffic to one or more versions that you
+     * specify. By default, traffic is shifted immediately.
+     * For gradual traffic migration, the target versions
+     * must be located within instances that are configured for both
+     * [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType)
+     * and
+     * [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling).
+     * You must specify the
+     * [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy)
+     * field in the Service resource. Gradual traffic migration is not
+     * supported in the App Engine flexible environment. For examples, see
+     * [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
+     * 
+ * + * bool migrate_traffic = 4; + * + * @return This builder for chaining. + */ + public Builder clearMigrateTraffic() { + + migrateTraffic_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.appengine.v1.UpdateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.UpdateServiceRequest) + private static final com.google.appengine.v1.UpdateServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.UpdateServiceRequest(); + } + + public static com.google.appengine.v1.UpdateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateServiceRequest(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.appengine.v1.UpdateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceRequestOrBuilder.java new file mode 100644 index 00000000..5d68aed7 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateServiceRequestOrBuilder.java @@ -0,0 +1,147 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface UpdateServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.UpdateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource to update. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource to update. Example: `apps/myapp/services/default`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A Service resource containing the updated service. Only fields set in the
+   * field mask will be updated.
+   * 
+ * + * .google.appengine.v1.Service service = 2; + * + * @return Whether the service field is set. + */ + boolean hasService(); + /** + * + * + *
+   * A Service resource containing the updated service. Only fields set in the
+   * field mask will be updated.
+   * 
+ * + * .google.appengine.v1.Service service = 2; + * + * @return The service. + */ + com.google.appengine.v1.Service getService(); + /** + * + * + *
+   * A Service resource containing the updated service. Only fields set in the
+   * field mask will be updated.
+   * 
+ * + * .google.appengine.v1.Service service = 2; + */ + com.google.appengine.v1.ServiceOrBuilder getServiceOrBuilder(); + + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Set to `true` to gradually shift traffic to one or more versions that you
+   * specify. By default, traffic is shifted immediately.
+   * For gradual traffic migration, the target versions
+   * must be located within instances that are configured for both
+   * [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType)
+   * and
+   * [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling).
+   * You must specify the
+   * [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy)
+   * field in the Service resource. Gradual traffic migration is not
+   * supported in the App Engine flexible environment. For examples, see
+   * [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
+   * 
+ * + * bool migrate_traffic = 4; + * + * @return The migrateTraffic. + */ + boolean getMigrateTraffic(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateVersionRequest.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateVersionRequest.java new file mode 100644 index 00000000..3f04eb8d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateVersionRequest.java @@ -0,0 +1,1193 @@ +/* + * 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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Request message for `Versions.UpdateVersion`.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateVersionRequest} + */ +public final class UpdateVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.UpdateVersionRequest) + UpdateVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateVersionRequest.newBuilder() to construct. + private UpdateVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateVersionRequest( + 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; + } + case 18: + { + com.google.appengine.v1.Version.Builder subBuilder = null; + if (version_ != null) { + subBuilder = version_.toBuilder(); + } + version_ = + input.readMessage(com.google.appengine.v1.Version.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(version_); + version_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + 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; + } + 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.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateVersionRequest.class, + com.google.appengine.v1.UpdateVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/services/default/versions/1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/services/default/versions/1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private com.google.appengine.v1.Version version_; + /** + * + * + *
+   * A Version containing the updated resource. Only fields set in the field
+   * mask will be updated.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + * + * + *
+   * A Version containing the updated resource. Only fields set in the field
+   * mask will be updated.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return The version. + */ + @java.lang.Override + public com.google.appengine.v1.Version getVersion() { + return version_ == null ? com.google.appengine.v1.Version.getDefaultInstance() : version_; + } + /** + * + * + *
+   * A Version containing the updated resource. Only fields set in the field
+   * mask will be updated.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + */ + @java.lang.Override + public com.google.appengine.v1.VersionOrBuilder getVersionOrBuilder() { + return getVersion(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (version_ != null) { + output.writeMessage(2, getVersion()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + 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 (version_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVersion()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + 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.appengine.v1.UpdateVersionRequest)) { + return super.equals(obj); + } + com.google.appengine.v1.UpdateVersionRequest other = + (com.google.appengine.v1.UpdateVersionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion().equals(other.getVersion())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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(); + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.UpdateVersionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateVersionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateVersionRequest 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.appengine.v1.UpdateVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UpdateVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UpdateVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateVersionRequest 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.appengine.v1.UpdateVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateVersionRequest 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.appengine.v1.UpdateVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UpdateVersionRequest 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.appengine.v1.UpdateVersionRequest 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 message for `Versions.UpdateVersion`.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.UpdateVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.UpdateVersionRequest) + com.google.appengine.v1.UpdateVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UpdateVersionRequest.class, + com.google.appengine.v1.UpdateVersionRequest.Builder.class); + } + + // Construct using com.google.appengine.v1.UpdateVersionRequest.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_ = ""; + + if (versionBuilder_ == null) { + version_ = null; + } else { + version_ = null; + versionBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppengineProto + .internal_static_google_appengine_v1_UpdateVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateVersionRequest getDefaultInstanceForType() { + return com.google.appengine.v1.UpdateVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.UpdateVersionRequest build() { + com.google.appengine.v1.UpdateVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.UpdateVersionRequest buildPartial() { + com.google.appengine.v1.UpdateVersionRequest result = + new com.google.appengine.v1.UpdateVersionRequest(this); + result.name_ = name_; + if (versionBuilder_ == null) { + result.version_ = version_; + } else { + result.version_ = versionBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.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.appengine.v1.UpdateVersionRequest) { + return mergeFrom((com.google.appengine.v1.UpdateVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.UpdateVersionRequest other) { + if (other == com.google.appengine.v1.UpdateVersionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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.appengine.v1.UpdateVersionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.UpdateVersionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/services/default/versions/1`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/services/default/versions/1`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/services/default/versions/1`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/services/default/versions/1`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource to update. Example:
+     * `apps/myapp/services/default/versions/1`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Version, + com.google.appengine.v1.Version.Builder, + com.google.appengine.v1.VersionOrBuilder> + versionBuilder_; + /** + * + * + *
+     * A Version containing the updated resource. Only fields set in the field
+     * mask will be updated.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return versionBuilder_ != null || version_ != null; + } + /** + * + * + *
+     * A Version containing the updated resource. Only fields set in the field
+     * mask will be updated.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return The version. + */ + public com.google.appengine.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? com.google.appengine.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A Version containing the updated resource. Only fields set in the field
+     * mask will be updated.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public Builder setVersion(com.google.appengine.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + onChanged(); + } else { + versionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A Version containing the updated resource. Only fields set in the field
+     * mask will be updated.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public Builder setVersion(com.google.appengine.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + onChanged(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A Version containing the updated resource. Only fields set in the field
+     * mask will be updated.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public Builder mergeVersion(com.google.appengine.v1.Version value) { + if (versionBuilder_ == null) { + if (version_ != null) { + version_ = + com.google.appengine.v1.Version.newBuilder(version_).mergeFrom(value).buildPartial(); + } else { + version_ = value; + } + onChanged(); + } else { + versionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A Version containing the updated resource. Only fields set in the field
+     * mask will be updated.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public Builder clearVersion() { + if (versionBuilder_ == null) { + version_ = null; + onChanged(); + } else { + version_ = null; + versionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A Version containing the updated resource. Only fields set in the field
+     * mask will be updated.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public com.google.appengine.v1.Version.Builder getVersionBuilder() { + + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A Version containing the updated resource. Only fields set in the field
+     * mask will be updated.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + public com.google.appengine.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? com.google.appengine.v1.Version.getDefaultInstance() : version_; + } + } + /** + * + * + *
+     * A Version containing the updated resource. Only fields set in the field
+     * mask will be updated.
+     * 
+ * + * .google.appengine.v1.Version version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Version, + com.google.appengine.v1.Version.Builder, + com.google.appengine.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Version, + com.google.appengine.v1.Version.Builder, + com.google.appengine.v1.VersionOrBuilder>( + getVersion(), getParentForChildren(), isClean()); + version_ = null; + } + return versionBuilder_; + } + + 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_; + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @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(); + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Standard field mask for the set of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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_; + } + + @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.appengine.v1.UpdateVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.UpdateVersionRequest) + private static final com.google.appengine.v1.UpdateVersionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.UpdateVersionRequest(); + } + + public static com.google.appengine.v1.UpdateVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateVersionRequest(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.appengine.v1.UpdateVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateVersionRequestOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateVersionRequestOrBuilder.java new file mode 100644 index 00000000..081fbdb8 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UpdateVersionRequestOrBuilder.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/appengine/v1/appengine.proto + +package com.google.appengine.v1; + +public interface UpdateVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.UpdateVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/services/default/versions/1`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource to update. Example:
+   * `apps/myapp/services/default/versions/1`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A Version containing the updated resource. Only fields set in the field
+   * mask will be updated.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + * + * + *
+   * A Version containing the updated resource. Only fields set in the field
+   * mask will be updated.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + * + * @return The version. + */ + com.google.appengine.v1.Version getVersion(); + /** + * + * + *
+   * A Version containing the updated resource. Only fields set in the field
+   * mask will be updated.
+   * 
+ * + * .google.appengine.v1.Version version = 2; + */ + com.google.appengine.v1.VersionOrBuilder getVersionOrBuilder(); + + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Standard field mask for the set of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlDispatchRule.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlDispatchRule.java new file mode 100644 index 00000000..c8746961 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlDispatchRule.java @@ -0,0 +1,1040 @@ +/* + * 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/appengine/v1/application.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Rules to match an HTTP request and dispatch that request to a service.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.UrlDispatchRule} + */ +public final class UrlDispatchRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.UrlDispatchRule) + UrlDispatchRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use UrlDispatchRule.newBuilder() to construct. + private UrlDispatchRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UrlDispatchRule() { + domain_ = ""; + path_ = ""; + service_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UrlDispatchRule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UrlDispatchRule( + 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(); + + domain_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + service_ = 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.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_UrlDispatchRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_UrlDispatchRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UrlDispatchRule.class, + com.google.appengine.v1.UrlDispatchRule.Builder.class); + } + + public static final int DOMAIN_FIELD_NUMBER = 1; + private volatile java.lang.Object domain_; + /** + * + * + *
+   * Domain name to match against. The wildcard "`*`" is supported if
+   * specified before a period: "`*.`".
+   * Defaults to matching all domains: "`*`".
+   * 
+ * + * string domain = 1; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } + } + /** + * + * + *
+   * Domain name to match against. The wildcard "`*`" is supported if
+   * specified before a period: "`*.`".
+   * Defaults to matching all domains: "`*`".
+   * 
+ * + * string domain = 1; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object path_; + /** + * + * + *
+   * Pathname within the host. Must start with a "`/`". A
+   * single "`*`" can be included at the end of the path.
+   * The sum of the lengths of the domain and path may not
+   * exceed 100 characters.
+   * 
+ * + * string path = 2; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * Pathname within the host. Must start with a "`/`". A
+   * single "`*`" can be included at the end of the path.
+   * The sum of the lengths of the domain and path may not
+   * exceed 100 characters.
+   * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 3; + private volatile java.lang.Object service_; + /** + * + * + *
+   * Resource ID of a service in this application that should
+   * serve the matched request. The service must already
+   * exist. Example: `default`.
+   * 
+ * + * string service = 3; + * + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + * + * + *
+   * Resource ID of a service in this application that should
+   * serve the matched request. The service must already
+   * exist. Example: `default`.
+   * 
+ * + * string service = 3; + * + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = 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 (!getDomainBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domain_); + } + if (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_); + } + if (!getServiceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, service_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDomainBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, domain_); + } + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_); + } + if (!getServiceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, service_); + } + 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.appengine.v1.UrlDispatchRule)) { + return super.equals(obj); + } + com.google.appengine.v1.UrlDispatchRule other = (com.google.appengine.v1.UrlDispatchRule) obj; + + if (!getDomain().equals(other.getDomain())) return false; + if (!getPath().equals(other.getPath())) return false; + if (!getService().equals(other.getService())) 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) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.UrlDispatchRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UrlDispatchRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UrlDispatchRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UrlDispatchRule 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.appengine.v1.UrlDispatchRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UrlDispatchRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UrlDispatchRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UrlDispatchRule 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.appengine.v1.UrlDispatchRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UrlDispatchRule 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.appengine.v1.UrlDispatchRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UrlDispatchRule 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.appengine.v1.UrlDispatchRule 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; + } + /** + * + * + *
+   * Rules to match an HTTP request and dispatch that request to a service.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.UrlDispatchRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.UrlDispatchRule) + com.google.appengine.v1.UrlDispatchRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_UrlDispatchRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_UrlDispatchRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UrlDispatchRule.class, + com.google.appengine.v1.UrlDispatchRule.Builder.class); + } + + // Construct using com.google.appengine.v1.UrlDispatchRule.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(); + domain_ = ""; + + path_ = ""; + + service_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.ApplicationProto + .internal_static_google_appengine_v1_UrlDispatchRule_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.UrlDispatchRule getDefaultInstanceForType() { + return com.google.appengine.v1.UrlDispatchRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.UrlDispatchRule build() { + com.google.appengine.v1.UrlDispatchRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.UrlDispatchRule buildPartial() { + com.google.appengine.v1.UrlDispatchRule result = + new com.google.appengine.v1.UrlDispatchRule(this); + result.domain_ = domain_; + result.path_ = path_; + result.service_ = service_; + 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.appengine.v1.UrlDispatchRule) { + return mergeFrom((com.google.appengine.v1.UrlDispatchRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.UrlDispatchRule other) { + if (other == com.google.appengine.v1.UrlDispatchRule.getDefaultInstance()) return this; + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + if (!other.getService().isEmpty()) { + service_ = other.service_; + 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.appengine.v1.UrlDispatchRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.UrlDispatchRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object domain_ = ""; + /** + * + * + *
+     * Domain name to match against. The wildcard "`*`" is supported if
+     * specified before a period: "`*.`".
+     * Defaults to matching all domains: "`*`".
+     * 
+ * + * string domain = 1; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Domain name to match against. The wildcard "`*`" is supported if
+     * specified before a period: "`*.`".
+     * Defaults to matching all domains: "`*`".
+     * 
+ * + * string domain = 1; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Domain name to match against. The wildcard "`*`" is supported if
+     * specified before a period: "`*.`".
+     * Defaults to matching all domains: "`*`".
+     * 
+ * + * string domain = 1; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + domain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Domain name to match against. The wildcard "`*`" is supported if
+     * specified before a period: "`*.`".
+     * Defaults to matching all domains: "`*`".
+     * 
+ * + * string domain = 1; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + + domain_ = getDefaultInstance().getDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * Domain name to match against. The wildcard "`*`" is supported if
+     * specified before a period: "`*.`".
+     * Defaults to matching all domains: "`*`".
+     * 
+ * + * string domain = 1; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + domain_ = value; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * Pathname within the host. Must start with a "`/`". A
+     * single "`*`" can be included at the end of the path.
+     * The sum of the lengths of the domain and path may not
+     * exceed 100 characters.
+     * 
+ * + * string path = 2; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Pathname within the host. Must start with a "`/`". A
+     * single "`*`" can be included at the end of the path.
+     * The sum of the lengths of the domain and path may not
+     * exceed 100 characters.
+     * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Pathname within the host. Must start with a "`/`". A
+     * single "`*`" can be included at the end of the path.
+     * The sum of the lengths of the domain and path may not
+     * exceed 100 characters.
+     * 
+ * + * string path = 2; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Pathname within the host. Must start with a "`/`". A
+     * single "`*`" can be included at the end of the path.
+     * The sum of the lengths of the domain and path may not
+     * exceed 100 characters.
+     * 
+ * + * string path = 2; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Pathname within the host. Must start with a "`/`". A
+     * single "`*`" can be included at the end of the path.
+     * The sum of the lengths of the domain and path may not
+     * exceed 100 characters.
+     * 
+ * + * string path = 2; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + + private java.lang.Object service_ = ""; + /** + * + * + *
+     * Resource ID of a service in this application that should
+     * serve the matched request. The service must already
+     * exist. Example: `default`.
+     * 
+ * + * string service = 3; + * + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource ID of a service in this application that should
+     * serve the matched request. The service must already
+     * exist. Example: `default`.
+     * 
+ * + * string service = 3; + * + * @return The bytes for service. + */ + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource ID of a service in this application that should
+     * serve the matched request. The service must already
+     * exist. Example: `default`.
+     * 
+ * + * string service = 3; + * + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + service_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource ID of a service in this application that should
+     * serve the matched request. The service must already
+     * exist. Example: `default`.
+     * 
+ * + * string service = 3; + * + * @return This builder for chaining. + */ + public Builder clearService() { + + service_ = getDefaultInstance().getService(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource ID of a service in this application that should
+     * serve the matched request. The service must already
+     * exist. Example: `default`.
+     * 
+ * + * string service = 3; + * + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + service_ = 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.appengine.v1.UrlDispatchRule) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.UrlDispatchRule) + private static final com.google.appengine.v1.UrlDispatchRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.UrlDispatchRule(); + } + + public static com.google.appengine.v1.UrlDispatchRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UrlDispatchRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UrlDispatchRule(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.appengine.v1.UrlDispatchRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlDispatchRuleOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlDispatchRuleOrBuilder.java new file mode 100644 index 00000000..13177433 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlDispatchRuleOrBuilder.java @@ -0,0 +1,114 @@ +/* + * 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/appengine/v1/application.proto + +package com.google.appengine.v1; + +public interface UrlDispatchRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.UrlDispatchRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Domain name to match against. The wildcard "`*`" is supported if
+   * specified before a period: "`*.`".
+   * Defaults to matching all domains: "`*`".
+   * 
+ * + * string domain = 1; + * + * @return The domain. + */ + java.lang.String getDomain(); + /** + * + * + *
+   * Domain name to match against. The wildcard "`*`" is supported if
+   * specified before a period: "`*.`".
+   * Defaults to matching all domains: "`*`".
+   * 
+ * + * string domain = 1; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); + + /** + * + * + *
+   * Pathname within the host. Must start with a "`/`". A
+   * single "`*`" can be included at the end of the path.
+   * The sum of the lengths of the domain and path may not
+   * exceed 100 characters.
+   * 
+ * + * string path = 2; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * Pathname within the host. Must start with a "`/`". A
+   * single "`*`" can be included at the end of the path.
+   * The sum of the lengths of the domain and path may not
+   * exceed 100 characters.
+   * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * Resource ID of a service in this application that should
+   * serve the matched request. The service must already
+   * exist. Example: `default`.
+   * 
+ * + * string service = 3; + * + * @return The service. + */ + java.lang.String getService(); + /** + * + * + *
+   * Resource ID of a service in this application that should
+   * serve the matched request. The service must already
+   * exist. Example: `default`.
+   * 
+ * + * string service = 3; + * + * @return The bytes for service. + */ + com.google.protobuf.ByteString getServiceBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlMap.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlMap.java new file mode 100644 index 00000000..4081836a --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlMap.java @@ -0,0 +1,2516 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * URL pattern and description of how the URL should be handled. App Engine can
+ * handle URLs by executing application code or by serving static files
+ * uploaded with the version, such as images, CSS, or JavaScript.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.UrlMap} + */ +public final class UrlMap extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.UrlMap) + UrlMapOrBuilder { + private static final long serialVersionUID = 0L; + // Use UrlMap.newBuilder() to construct. + private UrlMap(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UrlMap() { + urlRegex_ = ""; + securityLevel_ = 0; + login_ = 0; + authFailAction_ = 0; + redirectHttpResponseCode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UrlMap(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UrlMap( + 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(); + + urlRegex_ = s; + break; + } + case 18: + { + com.google.appengine.v1.StaticFilesHandler.Builder subBuilder = null; + if (handlerTypeCase_ == 2) { + subBuilder = + ((com.google.appengine.v1.StaticFilesHandler) handlerType_).toBuilder(); + } + handlerType_ = + input.readMessage( + com.google.appengine.v1.StaticFilesHandler.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.appengine.v1.StaticFilesHandler) handlerType_); + handlerType_ = subBuilder.buildPartial(); + } + handlerTypeCase_ = 2; + break; + } + case 26: + { + com.google.appengine.v1.ScriptHandler.Builder subBuilder = null; + if (handlerTypeCase_ == 3) { + subBuilder = ((com.google.appengine.v1.ScriptHandler) handlerType_).toBuilder(); + } + handlerType_ = + input.readMessage( + com.google.appengine.v1.ScriptHandler.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.appengine.v1.ScriptHandler) handlerType_); + handlerType_ = subBuilder.buildPartial(); + } + handlerTypeCase_ = 3; + break; + } + case 34: + { + com.google.appengine.v1.ApiEndpointHandler.Builder subBuilder = null; + if (handlerTypeCase_ == 4) { + subBuilder = + ((com.google.appengine.v1.ApiEndpointHandler) handlerType_).toBuilder(); + } + handlerType_ = + input.readMessage( + com.google.appengine.v1.ApiEndpointHandler.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.appengine.v1.ApiEndpointHandler) handlerType_); + handlerType_ = subBuilder.buildPartial(); + } + handlerTypeCase_ = 4; + break; + } + case 40: + { + int rawValue = input.readEnum(); + + securityLevel_ = rawValue; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + login_ = rawValue; + break; + } + case 56: + { + int rawValue = input.readEnum(); + + authFailAction_ = rawValue; + break; + } + case 64: + { + int rawValue = input.readEnum(); + + redirectHttpResponseCode_ = 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.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_UrlMap_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_UrlMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UrlMap.class, com.google.appengine.v1.UrlMap.Builder.class); + } + + /** + * + * + *
+   * Redirect codes.
+   * 
+ * + * Protobuf enum {@code google.appengine.v1.UrlMap.RedirectHttpResponseCode} + */ + public enum RedirectHttpResponseCode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified. `302` is assumed.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED = 0; + */ + REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED(0), + /** + * + * + *
+     * `301 Moved Permanently` code.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_301 = 1; + */ + REDIRECT_HTTP_RESPONSE_CODE_301(1), + /** + * + * + *
+     * `302 Moved Temporarily` code.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_302 = 2; + */ + REDIRECT_HTTP_RESPONSE_CODE_302(2), + /** + * + * + *
+     * `303 See Other` code.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_303 = 3; + */ + REDIRECT_HTTP_RESPONSE_CODE_303(3), + /** + * + * + *
+     * `307 Temporary Redirect` code.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_307 = 4; + */ + REDIRECT_HTTP_RESPONSE_CODE_307(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified. `302` is assumed.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED = 0; + */ + public static final int REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * `301 Moved Permanently` code.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_301 = 1; + */ + public static final int REDIRECT_HTTP_RESPONSE_CODE_301_VALUE = 1; + /** + * + * + *
+     * `302 Moved Temporarily` code.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_302 = 2; + */ + public static final int REDIRECT_HTTP_RESPONSE_CODE_302_VALUE = 2; + /** + * + * + *
+     * `303 See Other` code.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_303 = 3; + */ + public static final int REDIRECT_HTTP_RESPONSE_CODE_303_VALUE = 3; + /** + * + * + *
+     * `307 Temporary Redirect` code.
+     * 
+ * + * REDIRECT_HTTP_RESPONSE_CODE_307 = 4; + */ + public static final int REDIRECT_HTTP_RESPONSE_CODE_307_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 RedirectHttpResponseCode 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 RedirectHttpResponseCode forNumber(int value) { + switch (value) { + case 0: + return REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED; + case 1: + return REDIRECT_HTTP_RESPONSE_CODE_301; + case 2: + return REDIRECT_HTTP_RESPONSE_CODE_302; + case 3: + return REDIRECT_HTTP_RESPONSE_CODE_303; + case 4: + return REDIRECT_HTTP_RESPONSE_CODE_307; + 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 RedirectHttpResponseCode findValueByNumber(int number) { + return RedirectHttpResponseCode.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.appengine.v1.UrlMap.getDescriptor().getEnumTypes().get(0); + } + + private static final RedirectHttpResponseCode[] VALUES = values(); + + public static RedirectHttpResponseCode 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 RedirectHttpResponseCode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.UrlMap.RedirectHttpResponseCode) + } + + private int handlerTypeCase_ = 0; + private java.lang.Object handlerType_; + + public enum HandlerTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STATIC_FILES(2), + SCRIPT(3), + API_ENDPOINT(4), + HANDLERTYPE_NOT_SET(0); + private final int value; + + private HandlerTypeCase(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 HandlerTypeCase valueOf(int value) { + return forNumber(value); + } + + public static HandlerTypeCase forNumber(int value) { + switch (value) { + case 2: + return STATIC_FILES; + case 3: + return SCRIPT; + case 4: + return API_ENDPOINT; + case 0: + return HANDLERTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public HandlerTypeCase getHandlerTypeCase() { + return HandlerTypeCase.forNumber(handlerTypeCase_); + } + + public static final int URL_REGEX_FIELD_NUMBER = 1; + private volatile java.lang.Object urlRegex_; + /** + * + * + *
+   * URL prefix. Uses regular expression syntax, which means regexp
+   * special characters must be escaped, but should not contain groupings.
+   * All URLs that begin with this prefix are handled by this handler, using the
+   * portion of the URL after the prefix as part of the file path.
+   * 
+ * + * string url_regex = 1; + * + * @return The urlRegex. + */ + @java.lang.Override + public java.lang.String getUrlRegex() { + java.lang.Object ref = urlRegex_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + urlRegex_ = s; + return s; + } + } + /** + * + * + *
+   * URL prefix. Uses regular expression syntax, which means regexp
+   * special characters must be escaped, but should not contain groupings.
+   * All URLs that begin with this prefix are handled by this handler, using the
+   * portion of the URL after the prefix as part of the file path.
+   * 
+ * + * string url_regex = 1; + * + * @return The bytes for urlRegex. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUrlRegexBytes() { + java.lang.Object ref = urlRegex_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + urlRegex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATIC_FILES_FIELD_NUMBER = 2; + /** + * + * + *
+   * Returns the contents of a file, such as an image, as the response.
+   * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + * + * @return Whether the staticFiles field is set. + */ + @java.lang.Override + public boolean hasStaticFiles() { + return handlerTypeCase_ == 2; + } + /** + * + * + *
+   * Returns the contents of a file, such as an image, as the response.
+   * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + * + * @return The staticFiles. + */ + @java.lang.Override + public com.google.appengine.v1.StaticFilesHandler getStaticFiles() { + if (handlerTypeCase_ == 2) { + return (com.google.appengine.v1.StaticFilesHandler) handlerType_; + } + return com.google.appengine.v1.StaticFilesHandler.getDefaultInstance(); + } + /** + * + * + *
+   * Returns the contents of a file, such as an image, as the response.
+   * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + */ + @java.lang.Override + public com.google.appengine.v1.StaticFilesHandlerOrBuilder getStaticFilesOrBuilder() { + if (handlerTypeCase_ == 2) { + return (com.google.appengine.v1.StaticFilesHandler) handlerType_; + } + return com.google.appengine.v1.StaticFilesHandler.getDefaultInstance(); + } + + public static final int SCRIPT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Executes a script to handle the requests that match this URL
+   * pattern. Only the `auto` value is supported for Node.js in the
+   * App Engine standard environment, for example `"script": "auto"`.
+   * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + * + * @return Whether the script field is set. + */ + @java.lang.Override + public boolean hasScript() { + return handlerTypeCase_ == 3; + } + /** + * + * + *
+   * Executes a script to handle the requests that match this URL
+   * pattern. Only the `auto` value is supported for Node.js in the
+   * App Engine standard environment, for example `"script": "auto"`.
+   * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + * + * @return The script. + */ + @java.lang.Override + public com.google.appengine.v1.ScriptHandler getScript() { + if (handlerTypeCase_ == 3) { + return (com.google.appengine.v1.ScriptHandler) handlerType_; + } + return com.google.appengine.v1.ScriptHandler.getDefaultInstance(); + } + /** + * + * + *
+   * Executes a script to handle the requests that match this URL
+   * pattern. Only the `auto` value is supported for Node.js in the
+   * App Engine standard environment, for example `"script": "auto"`.
+   * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + */ + @java.lang.Override + public com.google.appengine.v1.ScriptHandlerOrBuilder getScriptOrBuilder() { + if (handlerTypeCase_ == 3) { + return (com.google.appengine.v1.ScriptHandler) handlerType_; + } + return com.google.appengine.v1.ScriptHandler.getDefaultInstance(); + } + + public static final int API_ENDPOINT_FIELD_NUMBER = 4; + /** + * + * + *
+   * Uses API Endpoints to handle requests.
+   * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + * + * @return Whether the apiEndpoint field is set. + */ + @java.lang.Override + public boolean hasApiEndpoint() { + return handlerTypeCase_ == 4; + } + /** + * + * + *
+   * Uses API Endpoints to handle requests.
+   * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + * + * @return The apiEndpoint. + */ + @java.lang.Override + public com.google.appengine.v1.ApiEndpointHandler getApiEndpoint() { + if (handlerTypeCase_ == 4) { + return (com.google.appengine.v1.ApiEndpointHandler) handlerType_; + } + return com.google.appengine.v1.ApiEndpointHandler.getDefaultInstance(); + } + /** + * + * + *
+   * Uses API Endpoints to handle requests.
+   * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + */ + @java.lang.Override + public com.google.appengine.v1.ApiEndpointHandlerOrBuilder getApiEndpointOrBuilder() { + if (handlerTypeCase_ == 4) { + return (com.google.appengine.v1.ApiEndpointHandler) handlerType_; + } + return com.google.appengine.v1.ApiEndpointHandler.getDefaultInstance(); + } + + public static final int SECURITY_LEVEL_FIELD_NUMBER = 5; + private int securityLevel_; + /** + * + * + *
+   * Security (HTTPS) enforcement for this URL.
+   * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 5; + * + * @return The enum numeric value on the wire for securityLevel. + */ + @java.lang.Override + public int getSecurityLevelValue() { + return securityLevel_; + } + /** + * + * + *
+   * Security (HTTPS) enforcement for this URL.
+   * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 5; + * + * @return The securityLevel. + */ + @java.lang.Override + public com.google.appengine.v1.SecurityLevel getSecurityLevel() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.SecurityLevel result = + com.google.appengine.v1.SecurityLevel.valueOf(securityLevel_); + return result == null ? com.google.appengine.v1.SecurityLevel.UNRECOGNIZED : result; + } + + public static final int LOGIN_FIELD_NUMBER = 6; + private int login_; + /** + * + * + *
+   * Level of login required to access this resource. Not supported for Node.js
+   * in the App Engine standard environment.
+   * 
+ * + * .google.appengine.v1.LoginRequirement login = 6; + * + * @return The enum numeric value on the wire for login. + */ + @java.lang.Override + public int getLoginValue() { + return login_; + } + /** + * + * + *
+   * Level of login required to access this resource. Not supported for Node.js
+   * in the App Engine standard environment.
+   * 
+ * + * .google.appengine.v1.LoginRequirement login = 6; + * + * @return The login. + */ + @java.lang.Override + public com.google.appengine.v1.LoginRequirement getLogin() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.LoginRequirement result = + com.google.appengine.v1.LoginRequirement.valueOf(login_); + return result == null ? com.google.appengine.v1.LoginRequirement.UNRECOGNIZED : result; + } + + public static final int AUTH_FAIL_ACTION_FIELD_NUMBER = 7; + private int authFailAction_; + /** + * + * + *
+   * Action to take when users access resources that require
+   * authentication. Defaults to `redirect`.
+   * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 7; + * + * @return The enum numeric value on the wire for authFailAction. + */ + @java.lang.Override + public int getAuthFailActionValue() { + return authFailAction_; + } + /** + * + * + *
+   * Action to take when users access resources that require
+   * authentication. Defaults to `redirect`.
+   * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 7; + * + * @return The authFailAction. + */ + @java.lang.Override + public com.google.appengine.v1.AuthFailAction getAuthFailAction() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.AuthFailAction result = + com.google.appengine.v1.AuthFailAction.valueOf(authFailAction_); + return result == null ? com.google.appengine.v1.AuthFailAction.UNRECOGNIZED : result; + } + + public static final int REDIRECT_HTTP_RESPONSE_CODE_FIELD_NUMBER = 8; + private int redirectHttpResponseCode_; + /** + * + * + *
+   * `30x` code to use when performing redirects for the `secure` field.
+   * Defaults to `302`.
+   * 
+ * + * .google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8; + * + * + * @return The enum numeric value on the wire for redirectHttpResponseCode. + */ + @java.lang.Override + public int getRedirectHttpResponseCodeValue() { + return redirectHttpResponseCode_; + } + /** + * + * + *
+   * `30x` code to use when performing redirects for the `secure` field.
+   * Defaults to `302`.
+   * 
+ * + * .google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8; + * + * + * @return The redirectHttpResponseCode. + */ + @java.lang.Override + public com.google.appengine.v1.UrlMap.RedirectHttpResponseCode getRedirectHttpResponseCode() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.UrlMap.RedirectHttpResponseCode result = + com.google.appengine.v1.UrlMap.RedirectHttpResponseCode.valueOf(redirectHttpResponseCode_); + return result == null + ? com.google.appengine.v1.UrlMap.RedirectHttpResponseCode.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 (!getUrlRegexBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, urlRegex_); + } + if (handlerTypeCase_ == 2) { + output.writeMessage(2, (com.google.appengine.v1.StaticFilesHandler) handlerType_); + } + if (handlerTypeCase_ == 3) { + output.writeMessage(3, (com.google.appengine.v1.ScriptHandler) handlerType_); + } + if (handlerTypeCase_ == 4) { + output.writeMessage(4, (com.google.appengine.v1.ApiEndpointHandler) handlerType_); + } + if (securityLevel_ != com.google.appengine.v1.SecurityLevel.SECURE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, securityLevel_); + } + if (login_ != com.google.appengine.v1.LoginRequirement.LOGIN_UNSPECIFIED.getNumber()) { + output.writeEnum(6, login_); + } + if (authFailAction_ + != com.google.appengine.v1.AuthFailAction.AUTH_FAIL_ACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(7, authFailAction_); + } + if (redirectHttpResponseCode_ + != com.google.appengine.v1.UrlMap.RedirectHttpResponseCode + .REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, redirectHttpResponseCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUrlRegexBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, urlRegex_); + } + if (handlerTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.appengine.v1.StaticFilesHandler) handlerType_); + } + if (handlerTypeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.appengine.v1.ScriptHandler) handlerType_); + } + if (handlerTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.appengine.v1.ApiEndpointHandler) handlerType_); + } + if (securityLevel_ != com.google.appengine.v1.SecurityLevel.SECURE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, securityLevel_); + } + if (login_ != com.google.appengine.v1.LoginRequirement.LOGIN_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, login_); + } + if (authFailAction_ + != com.google.appengine.v1.AuthFailAction.AUTH_FAIL_ACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, authFailAction_); + } + if (redirectHttpResponseCode_ + != com.google.appengine.v1.UrlMap.RedirectHttpResponseCode + .REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, redirectHttpResponseCode_); + } + 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.appengine.v1.UrlMap)) { + return super.equals(obj); + } + com.google.appengine.v1.UrlMap other = (com.google.appengine.v1.UrlMap) obj; + + if (!getUrlRegex().equals(other.getUrlRegex())) return false; + if (securityLevel_ != other.securityLevel_) return false; + if (login_ != other.login_) return false; + if (authFailAction_ != other.authFailAction_) return false; + if (redirectHttpResponseCode_ != other.redirectHttpResponseCode_) return false; + if (!getHandlerTypeCase().equals(other.getHandlerTypeCase())) return false; + switch (handlerTypeCase_) { + case 2: + if (!getStaticFiles().equals(other.getStaticFiles())) return false; + break; + case 3: + if (!getScript().equals(other.getScript())) return false; + break; + case 4: + if (!getApiEndpoint().equals(other.getApiEndpoint())) 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) + URL_REGEX_FIELD_NUMBER; + hash = (53 * hash) + getUrlRegex().hashCode(); + hash = (37 * hash) + SECURITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + securityLevel_; + hash = (37 * hash) + LOGIN_FIELD_NUMBER; + hash = (53 * hash) + login_; + hash = (37 * hash) + AUTH_FAIL_ACTION_FIELD_NUMBER; + hash = (53 * hash) + authFailAction_; + hash = (37 * hash) + REDIRECT_HTTP_RESPONSE_CODE_FIELD_NUMBER; + hash = (53 * hash) + redirectHttpResponseCode_; + switch (handlerTypeCase_) { + case 2: + hash = (37 * hash) + STATIC_FILES_FIELD_NUMBER; + hash = (53 * hash) + getStaticFiles().hashCode(); + break; + case 3: + hash = (37 * hash) + SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getScript().hashCode(); + break; + case 4: + hash = (37 * hash) + API_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getApiEndpoint().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.UrlMap parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UrlMap parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UrlMap parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UrlMap 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.appengine.v1.UrlMap parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.UrlMap parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.UrlMap parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UrlMap 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.appengine.v1.UrlMap parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UrlMap 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.appengine.v1.UrlMap parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.UrlMap 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.appengine.v1.UrlMap 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; + } + /** + * + * + *
+   * URL pattern and description of how the URL should be handled. App Engine can
+   * handle URLs by executing application code or by serving static files
+   * uploaded with the version, such as images, CSS, or JavaScript.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.UrlMap} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.UrlMap) + com.google.appengine.v1.UrlMapOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_UrlMap_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_UrlMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.UrlMap.class, com.google.appengine.v1.UrlMap.Builder.class); + } + + // Construct using com.google.appengine.v1.UrlMap.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(); + urlRegex_ = ""; + + securityLevel_ = 0; + + login_ = 0; + + authFailAction_ = 0; + + redirectHttpResponseCode_ = 0; + + handlerTypeCase_ = 0; + handlerType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.AppYamlProto + .internal_static_google_appengine_v1_UrlMap_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.UrlMap getDefaultInstanceForType() { + return com.google.appengine.v1.UrlMap.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.UrlMap build() { + com.google.appengine.v1.UrlMap result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.UrlMap buildPartial() { + com.google.appengine.v1.UrlMap result = new com.google.appengine.v1.UrlMap(this); + result.urlRegex_ = urlRegex_; + if (handlerTypeCase_ == 2) { + if (staticFilesBuilder_ == null) { + result.handlerType_ = handlerType_; + } else { + result.handlerType_ = staticFilesBuilder_.build(); + } + } + if (handlerTypeCase_ == 3) { + if (scriptBuilder_ == null) { + result.handlerType_ = handlerType_; + } else { + result.handlerType_ = scriptBuilder_.build(); + } + } + if (handlerTypeCase_ == 4) { + if (apiEndpointBuilder_ == null) { + result.handlerType_ = handlerType_; + } else { + result.handlerType_ = apiEndpointBuilder_.build(); + } + } + result.securityLevel_ = securityLevel_; + result.login_ = login_; + result.authFailAction_ = authFailAction_; + result.redirectHttpResponseCode_ = redirectHttpResponseCode_; + result.handlerTypeCase_ = handlerTypeCase_; + 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.appengine.v1.UrlMap) { + return mergeFrom((com.google.appengine.v1.UrlMap) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.UrlMap other) { + if (other == com.google.appengine.v1.UrlMap.getDefaultInstance()) return this; + if (!other.getUrlRegex().isEmpty()) { + urlRegex_ = other.urlRegex_; + onChanged(); + } + if (other.securityLevel_ != 0) { + setSecurityLevelValue(other.getSecurityLevelValue()); + } + if (other.login_ != 0) { + setLoginValue(other.getLoginValue()); + } + if (other.authFailAction_ != 0) { + setAuthFailActionValue(other.getAuthFailActionValue()); + } + if (other.redirectHttpResponseCode_ != 0) { + setRedirectHttpResponseCodeValue(other.getRedirectHttpResponseCodeValue()); + } + switch (other.getHandlerTypeCase()) { + case STATIC_FILES: + { + mergeStaticFiles(other.getStaticFiles()); + break; + } + case SCRIPT: + { + mergeScript(other.getScript()); + break; + } + case API_ENDPOINT: + { + mergeApiEndpoint(other.getApiEndpoint()); + break; + } + case HANDLERTYPE_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.appengine.v1.UrlMap parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.UrlMap) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int handlerTypeCase_ = 0; + private java.lang.Object handlerType_; + + public HandlerTypeCase getHandlerTypeCase() { + return HandlerTypeCase.forNumber(handlerTypeCase_); + } + + public Builder clearHandlerType() { + handlerTypeCase_ = 0; + handlerType_ = null; + onChanged(); + return this; + } + + private java.lang.Object urlRegex_ = ""; + /** + * + * + *
+     * URL prefix. Uses regular expression syntax, which means regexp
+     * special characters must be escaped, but should not contain groupings.
+     * All URLs that begin with this prefix are handled by this handler, using the
+     * portion of the URL after the prefix as part of the file path.
+     * 
+ * + * string url_regex = 1; + * + * @return The urlRegex. + */ + public java.lang.String getUrlRegex() { + java.lang.Object ref = urlRegex_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + urlRegex_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URL prefix. Uses regular expression syntax, which means regexp
+     * special characters must be escaped, but should not contain groupings.
+     * All URLs that begin with this prefix are handled by this handler, using the
+     * portion of the URL after the prefix as part of the file path.
+     * 
+ * + * string url_regex = 1; + * + * @return The bytes for urlRegex. + */ + public com.google.protobuf.ByteString getUrlRegexBytes() { + java.lang.Object ref = urlRegex_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + urlRegex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URL prefix. Uses regular expression syntax, which means regexp
+     * special characters must be escaped, but should not contain groupings.
+     * All URLs that begin with this prefix are handled by this handler, using the
+     * portion of the URL after the prefix as part of the file path.
+     * 
+ * + * string url_regex = 1; + * + * @param value The urlRegex to set. + * @return This builder for chaining. + */ + public Builder setUrlRegex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + urlRegex_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URL prefix. Uses regular expression syntax, which means regexp
+     * special characters must be escaped, but should not contain groupings.
+     * All URLs that begin with this prefix are handled by this handler, using the
+     * portion of the URL after the prefix as part of the file path.
+     * 
+ * + * string url_regex = 1; + * + * @return This builder for chaining. + */ + public Builder clearUrlRegex() { + + urlRegex_ = getDefaultInstance().getUrlRegex(); + onChanged(); + return this; + } + /** + * + * + *
+     * URL prefix. Uses regular expression syntax, which means regexp
+     * special characters must be escaped, but should not contain groupings.
+     * All URLs that begin with this prefix are handled by this handler, using the
+     * portion of the URL after the prefix as part of the file path.
+     * 
+ * + * string url_regex = 1; + * + * @param value The bytes for urlRegex to set. + * @return This builder for chaining. + */ + public Builder setUrlRegexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + urlRegex_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.StaticFilesHandler, + com.google.appengine.v1.StaticFilesHandler.Builder, + com.google.appengine.v1.StaticFilesHandlerOrBuilder> + staticFilesBuilder_; + /** + * + * + *
+     * Returns the contents of a file, such as an image, as the response.
+     * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + * + * @return Whether the staticFiles field is set. + */ + @java.lang.Override + public boolean hasStaticFiles() { + return handlerTypeCase_ == 2; + } + /** + * + * + *
+     * Returns the contents of a file, such as an image, as the response.
+     * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + * + * @return The staticFiles. + */ + @java.lang.Override + public com.google.appengine.v1.StaticFilesHandler getStaticFiles() { + if (staticFilesBuilder_ == null) { + if (handlerTypeCase_ == 2) { + return (com.google.appengine.v1.StaticFilesHandler) handlerType_; + } + return com.google.appengine.v1.StaticFilesHandler.getDefaultInstance(); + } else { + if (handlerTypeCase_ == 2) { + return staticFilesBuilder_.getMessage(); + } + return com.google.appengine.v1.StaticFilesHandler.getDefaultInstance(); + } + } + /** + * + * + *
+     * Returns the contents of a file, such as an image, as the response.
+     * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + */ + public Builder setStaticFiles(com.google.appengine.v1.StaticFilesHandler value) { + if (staticFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + handlerType_ = value; + onChanged(); + } else { + staticFilesBuilder_.setMessage(value); + } + handlerTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Returns the contents of a file, such as an image, as the response.
+     * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + */ + public Builder setStaticFiles( + com.google.appengine.v1.StaticFilesHandler.Builder builderForValue) { + if (staticFilesBuilder_ == null) { + handlerType_ = builderForValue.build(); + onChanged(); + } else { + staticFilesBuilder_.setMessage(builderForValue.build()); + } + handlerTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Returns the contents of a file, such as an image, as the response.
+     * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + */ + public Builder mergeStaticFiles(com.google.appengine.v1.StaticFilesHandler value) { + if (staticFilesBuilder_ == null) { + if (handlerTypeCase_ == 2 + && handlerType_ != com.google.appengine.v1.StaticFilesHandler.getDefaultInstance()) { + handlerType_ = + com.google.appengine.v1.StaticFilesHandler.newBuilder( + (com.google.appengine.v1.StaticFilesHandler) handlerType_) + .mergeFrom(value) + .buildPartial(); + } else { + handlerType_ = value; + } + onChanged(); + } else { + if (handlerTypeCase_ == 2) { + staticFilesBuilder_.mergeFrom(value); + } + staticFilesBuilder_.setMessage(value); + } + handlerTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Returns the contents of a file, such as an image, as the response.
+     * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + */ + public Builder clearStaticFiles() { + if (staticFilesBuilder_ == null) { + if (handlerTypeCase_ == 2) { + handlerTypeCase_ = 0; + handlerType_ = null; + onChanged(); + } + } else { + if (handlerTypeCase_ == 2) { + handlerTypeCase_ = 0; + handlerType_ = null; + } + staticFilesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Returns the contents of a file, such as an image, as the response.
+     * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + */ + public com.google.appengine.v1.StaticFilesHandler.Builder getStaticFilesBuilder() { + return getStaticFilesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Returns the contents of a file, such as an image, as the response.
+     * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + */ + @java.lang.Override + public com.google.appengine.v1.StaticFilesHandlerOrBuilder getStaticFilesOrBuilder() { + if ((handlerTypeCase_ == 2) && (staticFilesBuilder_ != null)) { + return staticFilesBuilder_.getMessageOrBuilder(); + } else { + if (handlerTypeCase_ == 2) { + return (com.google.appengine.v1.StaticFilesHandler) handlerType_; + } + return com.google.appengine.v1.StaticFilesHandler.getDefaultInstance(); + } + } + /** + * + * + *
+     * Returns the contents of a file, such as an image, as the response.
+     * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.StaticFilesHandler, + com.google.appengine.v1.StaticFilesHandler.Builder, + com.google.appengine.v1.StaticFilesHandlerOrBuilder> + getStaticFilesFieldBuilder() { + if (staticFilesBuilder_ == null) { + if (!(handlerTypeCase_ == 2)) { + handlerType_ = com.google.appengine.v1.StaticFilesHandler.getDefaultInstance(); + } + staticFilesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.StaticFilesHandler, + com.google.appengine.v1.StaticFilesHandler.Builder, + com.google.appengine.v1.StaticFilesHandlerOrBuilder>( + (com.google.appengine.v1.StaticFilesHandler) handlerType_, + getParentForChildren(), + isClean()); + handlerType_ = null; + } + handlerTypeCase_ = 2; + onChanged(); + ; + return staticFilesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ScriptHandler, + com.google.appengine.v1.ScriptHandler.Builder, + com.google.appengine.v1.ScriptHandlerOrBuilder> + scriptBuilder_; + /** + * + * + *
+     * Executes a script to handle the requests that match this URL
+     * pattern. Only the `auto` value is supported for Node.js in the
+     * App Engine standard environment, for example `"script": "auto"`.
+     * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + * + * @return Whether the script field is set. + */ + @java.lang.Override + public boolean hasScript() { + return handlerTypeCase_ == 3; + } + /** + * + * + *
+     * Executes a script to handle the requests that match this URL
+     * pattern. Only the `auto` value is supported for Node.js in the
+     * App Engine standard environment, for example `"script": "auto"`.
+     * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + * + * @return The script. + */ + @java.lang.Override + public com.google.appengine.v1.ScriptHandler getScript() { + if (scriptBuilder_ == null) { + if (handlerTypeCase_ == 3) { + return (com.google.appengine.v1.ScriptHandler) handlerType_; + } + return com.google.appengine.v1.ScriptHandler.getDefaultInstance(); + } else { + if (handlerTypeCase_ == 3) { + return scriptBuilder_.getMessage(); + } + return com.google.appengine.v1.ScriptHandler.getDefaultInstance(); + } + } + /** + * + * + *
+     * Executes a script to handle the requests that match this URL
+     * pattern. Only the `auto` value is supported for Node.js in the
+     * App Engine standard environment, for example `"script": "auto"`.
+     * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + */ + public Builder setScript(com.google.appengine.v1.ScriptHandler value) { + if (scriptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + handlerType_ = value; + onChanged(); + } else { + scriptBuilder_.setMessage(value); + } + handlerTypeCase_ = 3; + return this; + } + /** + * + * + *
+     * Executes a script to handle the requests that match this URL
+     * pattern. Only the `auto` value is supported for Node.js in the
+     * App Engine standard environment, for example `"script": "auto"`.
+     * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + */ + public Builder setScript(com.google.appengine.v1.ScriptHandler.Builder builderForValue) { + if (scriptBuilder_ == null) { + handlerType_ = builderForValue.build(); + onChanged(); + } else { + scriptBuilder_.setMessage(builderForValue.build()); + } + handlerTypeCase_ = 3; + return this; + } + /** + * + * + *
+     * Executes a script to handle the requests that match this URL
+     * pattern. Only the `auto` value is supported for Node.js in the
+     * App Engine standard environment, for example `"script": "auto"`.
+     * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + */ + public Builder mergeScript(com.google.appengine.v1.ScriptHandler value) { + if (scriptBuilder_ == null) { + if (handlerTypeCase_ == 3 + && handlerType_ != com.google.appengine.v1.ScriptHandler.getDefaultInstance()) { + handlerType_ = + com.google.appengine.v1.ScriptHandler.newBuilder( + (com.google.appengine.v1.ScriptHandler) handlerType_) + .mergeFrom(value) + .buildPartial(); + } else { + handlerType_ = value; + } + onChanged(); + } else { + if (handlerTypeCase_ == 3) { + scriptBuilder_.mergeFrom(value); + } + scriptBuilder_.setMessage(value); + } + handlerTypeCase_ = 3; + return this; + } + /** + * + * + *
+     * Executes a script to handle the requests that match this URL
+     * pattern. Only the `auto` value is supported for Node.js in the
+     * App Engine standard environment, for example `"script": "auto"`.
+     * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + */ + public Builder clearScript() { + if (scriptBuilder_ == null) { + if (handlerTypeCase_ == 3) { + handlerTypeCase_ = 0; + handlerType_ = null; + onChanged(); + } + } else { + if (handlerTypeCase_ == 3) { + handlerTypeCase_ = 0; + handlerType_ = null; + } + scriptBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Executes a script to handle the requests that match this URL
+     * pattern. Only the `auto` value is supported for Node.js in the
+     * App Engine standard environment, for example `"script": "auto"`.
+     * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + */ + public com.google.appengine.v1.ScriptHandler.Builder getScriptBuilder() { + return getScriptFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Executes a script to handle the requests that match this URL
+     * pattern. Only the `auto` value is supported for Node.js in the
+     * App Engine standard environment, for example `"script": "auto"`.
+     * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + */ + @java.lang.Override + public com.google.appengine.v1.ScriptHandlerOrBuilder getScriptOrBuilder() { + if ((handlerTypeCase_ == 3) && (scriptBuilder_ != null)) { + return scriptBuilder_.getMessageOrBuilder(); + } else { + if (handlerTypeCase_ == 3) { + return (com.google.appengine.v1.ScriptHandler) handlerType_; + } + return com.google.appengine.v1.ScriptHandler.getDefaultInstance(); + } + } + /** + * + * + *
+     * Executes a script to handle the requests that match this URL
+     * pattern. Only the `auto` value is supported for Node.js in the
+     * App Engine standard environment, for example `"script": "auto"`.
+     * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ScriptHandler, + com.google.appengine.v1.ScriptHandler.Builder, + com.google.appengine.v1.ScriptHandlerOrBuilder> + getScriptFieldBuilder() { + if (scriptBuilder_ == null) { + if (!(handlerTypeCase_ == 3)) { + handlerType_ = com.google.appengine.v1.ScriptHandler.getDefaultInstance(); + } + scriptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ScriptHandler, + com.google.appengine.v1.ScriptHandler.Builder, + com.google.appengine.v1.ScriptHandlerOrBuilder>( + (com.google.appengine.v1.ScriptHandler) handlerType_, + getParentForChildren(), + isClean()); + handlerType_ = null; + } + handlerTypeCase_ = 3; + onChanged(); + ; + return scriptBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ApiEndpointHandler, + com.google.appengine.v1.ApiEndpointHandler.Builder, + com.google.appengine.v1.ApiEndpointHandlerOrBuilder> + apiEndpointBuilder_; + /** + * + * + *
+     * Uses API Endpoints to handle requests.
+     * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + * + * @return Whether the apiEndpoint field is set. + */ + @java.lang.Override + public boolean hasApiEndpoint() { + return handlerTypeCase_ == 4; + } + /** + * + * + *
+     * Uses API Endpoints to handle requests.
+     * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + * + * @return The apiEndpoint. + */ + @java.lang.Override + public com.google.appengine.v1.ApiEndpointHandler getApiEndpoint() { + if (apiEndpointBuilder_ == null) { + if (handlerTypeCase_ == 4) { + return (com.google.appengine.v1.ApiEndpointHandler) handlerType_; + } + return com.google.appengine.v1.ApiEndpointHandler.getDefaultInstance(); + } else { + if (handlerTypeCase_ == 4) { + return apiEndpointBuilder_.getMessage(); + } + return com.google.appengine.v1.ApiEndpointHandler.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uses API Endpoints to handle requests.
+     * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + */ + public Builder setApiEndpoint(com.google.appengine.v1.ApiEndpointHandler value) { + if (apiEndpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + handlerType_ = value; + onChanged(); + } else { + apiEndpointBuilder_.setMessage(value); + } + handlerTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Uses API Endpoints to handle requests.
+     * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + */ + public Builder setApiEndpoint( + com.google.appengine.v1.ApiEndpointHandler.Builder builderForValue) { + if (apiEndpointBuilder_ == null) { + handlerType_ = builderForValue.build(); + onChanged(); + } else { + apiEndpointBuilder_.setMessage(builderForValue.build()); + } + handlerTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Uses API Endpoints to handle requests.
+     * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + */ + public Builder mergeApiEndpoint(com.google.appengine.v1.ApiEndpointHandler value) { + if (apiEndpointBuilder_ == null) { + if (handlerTypeCase_ == 4 + && handlerType_ != com.google.appengine.v1.ApiEndpointHandler.getDefaultInstance()) { + handlerType_ = + com.google.appengine.v1.ApiEndpointHandler.newBuilder( + (com.google.appengine.v1.ApiEndpointHandler) handlerType_) + .mergeFrom(value) + .buildPartial(); + } else { + handlerType_ = value; + } + onChanged(); + } else { + if (handlerTypeCase_ == 4) { + apiEndpointBuilder_.mergeFrom(value); + } + apiEndpointBuilder_.setMessage(value); + } + handlerTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Uses API Endpoints to handle requests.
+     * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + */ + public Builder clearApiEndpoint() { + if (apiEndpointBuilder_ == null) { + if (handlerTypeCase_ == 4) { + handlerTypeCase_ = 0; + handlerType_ = null; + onChanged(); + } + } else { + if (handlerTypeCase_ == 4) { + handlerTypeCase_ = 0; + handlerType_ = null; + } + apiEndpointBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Uses API Endpoints to handle requests.
+     * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + */ + public com.google.appengine.v1.ApiEndpointHandler.Builder getApiEndpointBuilder() { + return getApiEndpointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uses API Endpoints to handle requests.
+     * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + */ + @java.lang.Override + public com.google.appengine.v1.ApiEndpointHandlerOrBuilder getApiEndpointOrBuilder() { + if ((handlerTypeCase_ == 4) && (apiEndpointBuilder_ != null)) { + return apiEndpointBuilder_.getMessageOrBuilder(); + } else { + if (handlerTypeCase_ == 4) { + return (com.google.appengine.v1.ApiEndpointHandler) handlerType_; + } + return com.google.appengine.v1.ApiEndpointHandler.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uses API Endpoints to handle requests.
+     * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ApiEndpointHandler, + com.google.appengine.v1.ApiEndpointHandler.Builder, + com.google.appengine.v1.ApiEndpointHandlerOrBuilder> + getApiEndpointFieldBuilder() { + if (apiEndpointBuilder_ == null) { + if (!(handlerTypeCase_ == 4)) { + handlerType_ = com.google.appengine.v1.ApiEndpointHandler.getDefaultInstance(); + } + apiEndpointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ApiEndpointHandler, + com.google.appengine.v1.ApiEndpointHandler.Builder, + com.google.appengine.v1.ApiEndpointHandlerOrBuilder>( + (com.google.appengine.v1.ApiEndpointHandler) handlerType_, + getParentForChildren(), + isClean()); + handlerType_ = null; + } + handlerTypeCase_ = 4; + onChanged(); + ; + return apiEndpointBuilder_; + } + + private int securityLevel_ = 0; + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 5; + * + * @return The enum numeric value on the wire for securityLevel. + */ + @java.lang.Override + public int getSecurityLevelValue() { + return securityLevel_; + } + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 5; + * + * @param value The enum numeric value on the wire for securityLevel to set. + * @return This builder for chaining. + */ + public Builder setSecurityLevelValue(int value) { + + securityLevel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 5; + * + * @return The securityLevel. + */ + @java.lang.Override + public com.google.appengine.v1.SecurityLevel getSecurityLevel() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.SecurityLevel result = + com.google.appengine.v1.SecurityLevel.valueOf(securityLevel_); + return result == null ? com.google.appengine.v1.SecurityLevel.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 5; + * + * @param value The securityLevel to set. + * @return This builder for chaining. + */ + public Builder setSecurityLevel(com.google.appengine.v1.SecurityLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + securityLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Security (HTTPS) enforcement for this URL.
+     * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 5; + * + * @return This builder for chaining. + */ + public Builder clearSecurityLevel() { + + securityLevel_ = 0; + onChanged(); + return this; + } + + private int login_ = 0; + /** + * + * + *
+     * Level of login required to access this resource. Not supported for Node.js
+     * in the App Engine standard environment.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 6; + * + * @return The enum numeric value on the wire for login. + */ + @java.lang.Override + public int getLoginValue() { + return login_; + } + /** + * + * + *
+     * Level of login required to access this resource. Not supported for Node.js
+     * in the App Engine standard environment.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 6; + * + * @param value The enum numeric value on the wire for login to set. + * @return This builder for chaining. + */ + public Builder setLoginValue(int value) { + + login_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Level of login required to access this resource. Not supported for Node.js
+     * in the App Engine standard environment.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 6; + * + * @return The login. + */ + @java.lang.Override + public com.google.appengine.v1.LoginRequirement getLogin() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.LoginRequirement result = + com.google.appengine.v1.LoginRequirement.valueOf(login_); + return result == null ? com.google.appengine.v1.LoginRequirement.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Level of login required to access this resource. Not supported for Node.js
+     * in the App Engine standard environment.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 6; + * + * @param value The login to set. + * @return This builder for chaining. + */ + public Builder setLogin(com.google.appengine.v1.LoginRequirement value) { + if (value == null) { + throw new NullPointerException(); + } + + login_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Level of login required to access this resource. Not supported for Node.js
+     * in the App Engine standard environment.
+     * 
+ * + * .google.appengine.v1.LoginRequirement login = 6; + * + * @return This builder for chaining. + */ + public Builder clearLogin() { + + login_ = 0; + onChanged(); + return this; + } + + private int authFailAction_ = 0; + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 7; + * + * @return The enum numeric value on the wire for authFailAction. + */ + @java.lang.Override + public int getAuthFailActionValue() { + return authFailAction_; + } + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 7; + * + * @param value The enum numeric value on the wire for authFailAction to set. + * @return This builder for chaining. + */ + public Builder setAuthFailActionValue(int value) { + + authFailAction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 7; + * + * @return The authFailAction. + */ + @java.lang.Override + public com.google.appengine.v1.AuthFailAction getAuthFailAction() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.AuthFailAction result = + com.google.appengine.v1.AuthFailAction.valueOf(authFailAction_); + return result == null ? com.google.appengine.v1.AuthFailAction.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 7; + * + * @param value The authFailAction to set. + * @return This builder for chaining. + */ + public Builder setAuthFailAction(com.google.appengine.v1.AuthFailAction value) { + if (value == null) { + throw new NullPointerException(); + } + + authFailAction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Action to take when users access resources that require
+     * authentication. Defaults to `redirect`.
+     * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 7; + * + * @return This builder for chaining. + */ + public Builder clearAuthFailAction() { + + authFailAction_ = 0; + onChanged(); + return this; + } + + private int redirectHttpResponseCode_ = 0; + /** + * + * + *
+     * `30x` code to use when performing redirects for the `secure` field.
+     * Defaults to `302`.
+     * 
+ * + * .google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8; + * + * + * @return The enum numeric value on the wire for redirectHttpResponseCode. + */ + @java.lang.Override + public int getRedirectHttpResponseCodeValue() { + return redirectHttpResponseCode_; + } + /** + * + * + *
+     * `30x` code to use when performing redirects for the `secure` field.
+     * Defaults to `302`.
+     * 
+ * + * .google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8; + * + * + * @param value The enum numeric value on the wire for redirectHttpResponseCode to set. + * @return This builder for chaining. + */ + public Builder setRedirectHttpResponseCodeValue(int value) { + + redirectHttpResponseCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * `30x` code to use when performing redirects for the `secure` field.
+     * Defaults to `302`.
+     * 
+ * + * .google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8; + * + * + * @return The redirectHttpResponseCode. + */ + @java.lang.Override + public com.google.appengine.v1.UrlMap.RedirectHttpResponseCode getRedirectHttpResponseCode() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.UrlMap.RedirectHttpResponseCode result = + com.google.appengine.v1.UrlMap.RedirectHttpResponseCode.valueOf( + redirectHttpResponseCode_); + return result == null + ? com.google.appengine.v1.UrlMap.RedirectHttpResponseCode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * `30x` code to use when performing redirects for the `secure` field.
+     * Defaults to `302`.
+     * 
+ * + * .google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8; + * + * + * @param value The redirectHttpResponseCode to set. + * @return This builder for chaining. + */ + public Builder setRedirectHttpResponseCode( + com.google.appengine.v1.UrlMap.RedirectHttpResponseCode value) { + if (value == null) { + throw new NullPointerException(); + } + + redirectHttpResponseCode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * `30x` code to use when performing redirects for the `secure` field.
+     * Defaults to `302`.
+     * 
+ * + * .google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8; + * + * + * @return This builder for chaining. + */ + public Builder clearRedirectHttpResponseCode() { + + redirectHttpResponseCode_ = 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.appengine.v1.UrlMap) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.UrlMap) + private static final com.google.appengine.v1.UrlMap DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.UrlMap(); + } + + public static com.google.appengine.v1.UrlMap getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UrlMap parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UrlMap(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.appengine.v1.UrlMap getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlMapOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlMapOrBuilder.java new file mode 100644 index 00000000..33225ba4 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/UrlMapOrBuilder.java @@ -0,0 +1,277 @@ +/* + * 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/appengine/v1/app_yaml.proto + +package com.google.appengine.v1; + +public interface UrlMapOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.UrlMap) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URL prefix. Uses regular expression syntax, which means regexp
+   * special characters must be escaped, but should not contain groupings.
+   * All URLs that begin with this prefix are handled by this handler, using the
+   * portion of the URL after the prefix as part of the file path.
+   * 
+ * + * string url_regex = 1; + * + * @return The urlRegex. + */ + java.lang.String getUrlRegex(); + /** + * + * + *
+   * URL prefix. Uses regular expression syntax, which means regexp
+   * special characters must be escaped, but should not contain groupings.
+   * All URLs that begin with this prefix are handled by this handler, using the
+   * portion of the URL after the prefix as part of the file path.
+   * 
+ * + * string url_regex = 1; + * + * @return The bytes for urlRegex. + */ + com.google.protobuf.ByteString getUrlRegexBytes(); + + /** + * + * + *
+   * Returns the contents of a file, such as an image, as the response.
+   * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + * + * @return Whether the staticFiles field is set. + */ + boolean hasStaticFiles(); + /** + * + * + *
+   * Returns the contents of a file, such as an image, as the response.
+   * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + * + * @return The staticFiles. + */ + com.google.appengine.v1.StaticFilesHandler getStaticFiles(); + /** + * + * + *
+   * Returns the contents of a file, such as an image, as the response.
+   * 
+ * + * .google.appengine.v1.StaticFilesHandler static_files = 2; + */ + com.google.appengine.v1.StaticFilesHandlerOrBuilder getStaticFilesOrBuilder(); + + /** + * + * + *
+   * Executes a script to handle the requests that match this URL
+   * pattern. Only the `auto` value is supported for Node.js in the
+   * App Engine standard environment, for example `"script": "auto"`.
+   * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + * + * @return Whether the script field is set. + */ + boolean hasScript(); + /** + * + * + *
+   * Executes a script to handle the requests that match this URL
+   * pattern. Only the `auto` value is supported for Node.js in the
+   * App Engine standard environment, for example `"script": "auto"`.
+   * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + * + * @return The script. + */ + com.google.appengine.v1.ScriptHandler getScript(); + /** + * + * + *
+   * Executes a script to handle the requests that match this URL
+   * pattern. Only the `auto` value is supported for Node.js in the
+   * App Engine standard environment, for example `"script": "auto"`.
+   * 
+ * + * .google.appengine.v1.ScriptHandler script = 3; + */ + com.google.appengine.v1.ScriptHandlerOrBuilder getScriptOrBuilder(); + + /** + * + * + *
+   * Uses API Endpoints to handle requests.
+   * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + * + * @return Whether the apiEndpoint field is set. + */ + boolean hasApiEndpoint(); + /** + * + * + *
+   * Uses API Endpoints to handle requests.
+   * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + * + * @return The apiEndpoint. + */ + com.google.appengine.v1.ApiEndpointHandler getApiEndpoint(); + /** + * + * + *
+   * Uses API Endpoints to handle requests.
+   * 
+ * + * .google.appengine.v1.ApiEndpointHandler api_endpoint = 4; + */ + com.google.appengine.v1.ApiEndpointHandlerOrBuilder getApiEndpointOrBuilder(); + + /** + * + * + *
+   * Security (HTTPS) enforcement for this URL.
+   * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 5; + * + * @return The enum numeric value on the wire for securityLevel. + */ + int getSecurityLevelValue(); + /** + * + * + *
+   * Security (HTTPS) enforcement for this URL.
+   * 
+ * + * .google.appengine.v1.SecurityLevel security_level = 5; + * + * @return The securityLevel. + */ + com.google.appengine.v1.SecurityLevel getSecurityLevel(); + + /** + * + * + *
+   * Level of login required to access this resource. Not supported for Node.js
+   * in the App Engine standard environment.
+   * 
+ * + * .google.appengine.v1.LoginRequirement login = 6; + * + * @return The enum numeric value on the wire for login. + */ + int getLoginValue(); + /** + * + * + *
+   * Level of login required to access this resource. Not supported for Node.js
+   * in the App Engine standard environment.
+   * 
+ * + * .google.appengine.v1.LoginRequirement login = 6; + * + * @return The login. + */ + com.google.appengine.v1.LoginRequirement getLogin(); + + /** + * + * + *
+   * Action to take when users access resources that require
+   * authentication. Defaults to `redirect`.
+   * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 7; + * + * @return The enum numeric value on the wire for authFailAction. + */ + int getAuthFailActionValue(); + /** + * + * + *
+   * Action to take when users access resources that require
+   * authentication. Defaults to `redirect`.
+   * 
+ * + * .google.appengine.v1.AuthFailAction auth_fail_action = 7; + * + * @return The authFailAction. + */ + com.google.appengine.v1.AuthFailAction getAuthFailAction(); + + /** + * + * + *
+   * `30x` code to use when performing redirects for the `secure` field.
+   * Defaults to `302`.
+   * 
+ * + * .google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8; + * + * + * @return The enum numeric value on the wire for redirectHttpResponseCode. + */ + int getRedirectHttpResponseCodeValue(); + /** + * + * + *
+   * `30x` code to use when performing redirects for the `secure` field.
+   * Defaults to `302`.
+   * 
+ * + * .google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8; + * + * + * @return The redirectHttpResponseCode. + */ + com.google.appengine.v1.UrlMap.RedirectHttpResponseCode getRedirectHttpResponseCode(); + + public com.google.appengine.v1.UrlMap.HandlerTypeCase getHandlerTypeCase(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Version.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Version.java new file mode 100644 index 00000000..9af3e25d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Version.java @@ -0,0 +1,11061 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * A Version resource is a specific set of source code and configuration files
+ * that are deployed into a service.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.Version} + */ +public final class Version extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Version) + VersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Version.newBuilder() to construct. + private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Version() { + name_ = ""; + id_ = ""; + inboundServices_ = java.util.Collections.emptyList(); + instanceClass_ = ""; + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + runtime_ = ""; + runtimeChannel_ = ""; + env_ = ""; + servingStatus_ = 0; + createdBy_ = ""; + runtimeApiVersion_ = ""; + runtimeMainExecutablePath_ = ""; + serviceAccount_ = ""; + handlers_ = java.util.Collections.emptyList(); + errorHandlers_ = java.util.Collections.emptyList(); + libraries_ = java.util.Collections.emptyList(); + nobuildFilesRegex_ = ""; + versionUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Version(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Version( + 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(); + + id_ = s; + break; + } + case 26: + { + com.google.appengine.v1.AutomaticScaling.Builder subBuilder = null; + if (scalingCase_ == 3) { + subBuilder = ((com.google.appengine.v1.AutomaticScaling) scaling_).toBuilder(); + } + scaling_ = + input.readMessage( + com.google.appengine.v1.AutomaticScaling.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.appengine.v1.AutomaticScaling) scaling_); + scaling_ = subBuilder.buildPartial(); + } + scalingCase_ = 3; + break; + } + case 34: + { + com.google.appengine.v1.BasicScaling.Builder subBuilder = null; + if (scalingCase_ == 4) { + subBuilder = ((com.google.appengine.v1.BasicScaling) scaling_).toBuilder(); + } + scaling_ = + input.readMessage( + com.google.appengine.v1.BasicScaling.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.appengine.v1.BasicScaling) scaling_); + scaling_ = subBuilder.buildPartial(); + } + scalingCase_ = 4; + break; + } + case 42: + { + com.google.appengine.v1.ManualScaling.Builder subBuilder = null; + if (scalingCase_ == 5) { + subBuilder = ((com.google.appengine.v1.ManualScaling) scaling_).toBuilder(); + } + scaling_ = + input.readMessage( + com.google.appengine.v1.ManualScaling.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.appengine.v1.ManualScaling) scaling_); + scaling_ = subBuilder.buildPartial(); + } + scalingCase_ = 5; + break; + } + case 48: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inboundServices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + inboundServices_.add(rawValue); + break; + } + case 50: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inboundServices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + inboundServices_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + instanceClass_ = s; + break; + } + case 66: + { + com.google.appengine.v1.Network.Builder subBuilder = null; + if (network_ != null) { + subBuilder = network_.toBuilder(); + } + network_ = + input.readMessage(com.google.appengine.v1.Network.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(network_); + network_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.appengine.v1.Resources.Builder subBuilder = null; + if (resources_ != null) { + subBuilder = resources_.toBuilder(); + } + resources_ = + input.readMessage(com.google.appengine.v1.Resources.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resources_); + resources_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + runtime_ = s; + break; + } + case 88: + { + threadsafe_ = input.readBool(); + break; + } + case 96: + { + vm_ = input.readBool(); + break; + } + case 106: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + betaSettings_ = + com.google.protobuf.MapField.newMapField( + BetaSettingsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry betaSettings__ = + input.readMessage( + BetaSettingsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + betaSettings_.getMutableMap().put(betaSettings__.getKey(), betaSettings__.getValue()); + break; + } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + + env_ = s; + break; + } + case 120: + { + int rawValue = input.readEnum(); + + servingStatus_ = rawValue; + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + createdBy_ = s; + break; + } + case 138: + { + 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 144: + { + diskUsageBytes_ = input.readInt64(); + break; + } + case 170: + { + java.lang.String s = input.readStringRequireUtf8(); + + runtimeApiVersion_ = s; + break; + } + case 178: + { + java.lang.String s = input.readStringRequireUtf8(); + + runtimeMainExecutablePath_ = s; + break; + } + case 802: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + handlers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + handlers_.add( + input.readMessage(com.google.appengine.v1.UrlMap.parser(), extensionRegistry)); + break; + } + case 810: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + errorHandlers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + errorHandlers_.add( + input.readMessage( + com.google.appengine.v1.ErrorHandler.parser(), extensionRegistry)); + break; + } + case 818: + { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + libraries_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + libraries_.add( + input.readMessage(com.google.appengine.v1.Library.parser(), extensionRegistry)); + break; + } + case 826: + { + com.google.appengine.v1.ApiConfigHandler.Builder subBuilder = null; + if (apiConfig_ != null) { + subBuilder = apiConfig_.toBuilder(); + } + apiConfig_ = + input.readMessage( + com.google.appengine.v1.ApiConfigHandler.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(apiConfig_); + apiConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 834: + { + if (!((mutable_bitField0_ & 0x00000040) != 0)) { + envVariables_ = + com.google.protobuf.MapField.newMapField( + EnvVariablesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000040; + } + com.google.protobuf.MapEntry envVariables__ = + input.readMessage( + EnvVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + envVariables_.getMutableMap().put(envVariables__.getKey(), envVariables__.getValue()); + break; + } + case 842: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (defaultExpiration_ != null) { + subBuilder = defaultExpiration_.toBuilder(); + } + defaultExpiration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(defaultExpiration_); + defaultExpiration_ = subBuilder.buildPartial(); + } + + break; + } + case 850: + { + com.google.appengine.v1.HealthCheck.Builder subBuilder = null; + if (healthCheck_ != null) { + subBuilder = healthCheck_.toBuilder(); + } + healthCheck_ = + input.readMessage( + com.google.appengine.v1.HealthCheck.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(healthCheck_); + healthCheck_ = subBuilder.buildPartial(); + } + + break; + } + case 858: + { + java.lang.String s = input.readStringRequireUtf8(); + + nobuildFilesRegex_ = s; + break; + } + case 866: + { + com.google.appengine.v1.Deployment.Builder subBuilder = null; + if (deployment_ != null) { + subBuilder = deployment_.toBuilder(); + } + deployment_ = + input.readMessage(com.google.appengine.v1.Deployment.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deployment_); + deployment_ = subBuilder.buildPartial(); + } + + break; + } + case 874: + { + java.lang.String s = input.readStringRequireUtf8(); + + versionUrl_ = s; + break; + } + case 882: + { + com.google.appengine.v1.EndpointsApiService.Builder subBuilder = null; + if (endpointsApiService_ != null) { + subBuilder = endpointsApiService_.toBuilder(); + } + endpointsApiService_ = + input.readMessage( + com.google.appengine.v1.EndpointsApiService.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endpointsApiService_); + endpointsApiService_ = subBuilder.buildPartial(); + } + + break; + } + case 898: + { + com.google.appengine.v1.ReadinessCheck.Builder subBuilder = null; + if (readinessCheck_ != null) { + subBuilder = readinessCheck_.toBuilder(); + } + readinessCheck_ = + input.readMessage( + com.google.appengine.v1.ReadinessCheck.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readinessCheck_); + readinessCheck_ = subBuilder.buildPartial(); + } + + break; + } + case 906: + { + com.google.appengine.v1.LivenessCheck.Builder subBuilder = null; + if (livenessCheck_ != null) { + subBuilder = livenessCheck_.toBuilder(); + } + livenessCheck_ = + input.readMessage( + com.google.appengine.v1.LivenessCheck.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(livenessCheck_); + livenessCheck_ = subBuilder.buildPartial(); + } + + break; + } + case 938: + { + java.lang.String s = input.readStringRequireUtf8(); + + runtimeChannel_ = s; + break; + } + case 946: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + zones_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + zones_.add(s); + break; + } + case 970: + { + com.google.appengine.v1.VpcAccessConnector.Builder subBuilder = null; + if (vpcAccessConnector_ != null) { + subBuilder = vpcAccessConnector_.toBuilder(); + } + vpcAccessConnector_ = + input.readMessage( + com.google.appengine.v1.VpcAccessConnector.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(vpcAccessConnector_); + vpcAccessConnector_ = subBuilder.buildPartial(); + } + + break; + } + case 978: + { + com.google.appengine.v1.Entrypoint.Builder subBuilder = null; + if (entrypoint_ != null) { + subBuilder = entrypoint_.toBuilder(); + } + entrypoint_ = + input.readMessage(com.google.appengine.v1.Entrypoint.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entrypoint_); + entrypoint_ = subBuilder.buildPartial(); + } + + break; + } + case 1002: + { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { + buildEnvVariables_ = + com.google.protobuf.MapField.newMapField( + BuildEnvVariablesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000080; + } + com.google.protobuf.MapEntry buildEnvVariables__ = + input.readMessage( + BuildEnvVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + buildEnvVariables_ + .getMutableMap() + .put(buildEnvVariables__.getKey(), buildEnvVariables__.getValue()); + break; + } + case 1018: + { + 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)) { + inboundServices_ = java.util.Collections.unmodifiableList(inboundServices_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + handlers_ = java.util.Collections.unmodifiableList(handlers_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + errorHandlers_ = java.util.Collections.unmodifiableList(errorHandlers_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + libraries_ = java.util.Collections.unmodifiableList(libraries_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + zones_ = zones_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Version_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 13: + return internalGetBetaSettings(); + case 104: + return internalGetEnvVariables(); + case 125: + return internalGetBuildEnvVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Version.class, com.google.appengine.v1.Version.Builder.class); + } + + private int scalingCase_ = 0; + private java.lang.Object scaling_; + + public enum ScalingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AUTOMATIC_SCALING(3), + BASIC_SCALING(4), + MANUAL_SCALING(5), + SCALING_NOT_SET(0); + private final int value; + + private ScalingCase(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 ScalingCase valueOf(int value) { + return forNumber(value); + } + + public static ScalingCase forNumber(int value) { + switch (value) { + case 3: + return AUTOMATIC_SCALING; + case 4: + return BASIC_SCALING; + case 5: + return MANUAL_SCALING; + case 0: + return SCALING_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ScalingCase getScalingCase() { + return ScalingCase.forNumber(scalingCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Full path to the Version resource in the API.  Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Full path to the Version resource in the API.  Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Relative name of the version within the service.  Example: `v1`.
+   * Version names can contain only lowercase letters, numbers, or hyphens.
+   * Reserved names: "default", "latest", and any name with the prefix "ah-".
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Relative name of the version within the service.  Example: `v1`.
+   * Version names can contain only lowercase letters, numbers, or hyphens.
+   * Reserved names: "default", "latest", and any name with the prefix "ah-".
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTOMATIC_SCALING_FIELD_NUMBER = 3; + /** + * + * + *
+   * Automatic scaling is based on request rate, response latencies, and other
+   * application metrics. Instances are dynamically created and destroyed as
+   * needed in order to handle traffic.
+   * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + * + * @return Whether the automaticScaling field is set. + */ + @java.lang.Override + public boolean hasAutomaticScaling() { + return scalingCase_ == 3; + } + /** + * + * + *
+   * Automatic scaling is based on request rate, response latencies, and other
+   * application metrics. Instances are dynamically created and destroyed as
+   * needed in order to handle traffic.
+   * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + * + * @return The automaticScaling. + */ + @java.lang.Override + public com.google.appengine.v1.AutomaticScaling getAutomaticScaling() { + if (scalingCase_ == 3) { + return (com.google.appengine.v1.AutomaticScaling) scaling_; + } + return com.google.appengine.v1.AutomaticScaling.getDefaultInstance(); + } + /** + * + * + *
+   * Automatic scaling is based on request rate, response latencies, and other
+   * application metrics. Instances are dynamically created and destroyed as
+   * needed in order to handle traffic.
+   * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + */ + @java.lang.Override + public com.google.appengine.v1.AutomaticScalingOrBuilder getAutomaticScalingOrBuilder() { + if (scalingCase_ == 3) { + return (com.google.appengine.v1.AutomaticScaling) scaling_; + } + return com.google.appengine.v1.AutomaticScaling.getDefaultInstance(); + } + + public static final int BASIC_SCALING_FIELD_NUMBER = 4; + /** + * + * + *
+   * A service with basic scaling will create an instance when the application
+   * receives a request. The instance will be turned down when the app becomes
+   * idle. Basic scaling is ideal for work that is intermittent or driven by
+   * user activity.
+   * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + * + * @return Whether the basicScaling field is set. + */ + @java.lang.Override + public boolean hasBasicScaling() { + return scalingCase_ == 4; + } + /** + * + * + *
+   * A service with basic scaling will create an instance when the application
+   * receives a request. The instance will be turned down when the app becomes
+   * idle. Basic scaling is ideal for work that is intermittent or driven by
+   * user activity.
+   * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + * + * @return The basicScaling. + */ + @java.lang.Override + public com.google.appengine.v1.BasicScaling getBasicScaling() { + if (scalingCase_ == 4) { + return (com.google.appengine.v1.BasicScaling) scaling_; + } + return com.google.appengine.v1.BasicScaling.getDefaultInstance(); + } + /** + * + * + *
+   * A service with basic scaling will create an instance when the application
+   * receives a request. The instance will be turned down when the app becomes
+   * idle. Basic scaling is ideal for work that is intermittent or driven by
+   * user activity.
+   * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + */ + @java.lang.Override + public com.google.appengine.v1.BasicScalingOrBuilder getBasicScalingOrBuilder() { + if (scalingCase_ == 4) { + return (com.google.appengine.v1.BasicScaling) scaling_; + } + return com.google.appengine.v1.BasicScaling.getDefaultInstance(); + } + + public static final int MANUAL_SCALING_FIELD_NUMBER = 5; + /** + * + * + *
+   * A service with manual scaling runs continuously, allowing you to perform
+   * complex initialization and rely on the state of its memory over time.
+   * Manually scaled versions are sometimes referred to as "backends".
+   * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + * + * @return Whether the manualScaling field is set. + */ + @java.lang.Override + public boolean hasManualScaling() { + return scalingCase_ == 5; + } + /** + * + * + *
+   * A service with manual scaling runs continuously, allowing you to perform
+   * complex initialization and rely on the state of its memory over time.
+   * Manually scaled versions are sometimes referred to as "backends".
+   * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + * + * @return The manualScaling. + */ + @java.lang.Override + public com.google.appengine.v1.ManualScaling getManualScaling() { + if (scalingCase_ == 5) { + return (com.google.appengine.v1.ManualScaling) scaling_; + } + return com.google.appengine.v1.ManualScaling.getDefaultInstance(); + } + /** + * + * + *
+   * A service with manual scaling runs continuously, allowing you to perform
+   * complex initialization and rely on the state of its memory over time.
+   * Manually scaled versions are sometimes referred to as "backends".
+   * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + */ + @java.lang.Override + public com.google.appengine.v1.ManualScalingOrBuilder getManualScalingOrBuilder() { + if (scalingCase_ == 5) { + return (com.google.appengine.v1.ManualScaling) scaling_; + } + return com.google.appengine.v1.ManualScaling.getDefaultInstance(); + } + + public static final int INBOUND_SERVICES_FIELD_NUMBER = 6; + private java.util.List inboundServices_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.appengine.v1.InboundServiceType> + inboundServices_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.appengine.v1.InboundServiceType>() { + public com.google.appengine.v1.InboundServiceType convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.appengine.v1.InboundServiceType result = + com.google.appengine.v1.InboundServiceType.valueOf(from); + return result == null + ? com.google.appengine.v1.InboundServiceType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return A list containing the inboundServices. + */ + @java.lang.Override + public java.util.List getInboundServicesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.appengine.v1.InboundServiceType>( + inboundServices_, inboundServices_converter_); + } + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return The count of inboundServices. + */ + @java.lang.Override + public int getInboundServicesCount() { + return inboundServices_.size(); + } + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param index The index of the element to return. + * @return The inboundServices at the given index. + */ + @java.lang.Override + public com.google.appengine.v1.InboundServiceType getInboundServices(int index) { + return inboundServices_converter_.convert(inboundServices_.get(index)); + } + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return A list containing the enum numeric values on the wire for inboundServices. + */ + @java.lang.Override + public java.util.List getInboundServicesValueList() { + return inboundServices_; + } + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of inboundServices at the given index. + */ + @java.lang.Override + public int getInboundServicesValue(int index) { + return inboundServices_.get(index); + } + + private int inboundServicesMemoizedSerializedSize; + + public static final int INSTANCE_CLASS_FIELD_NUMBER = 7; + private volatile java.lang.Object instanceClass_; + /** + * + * + *
+   * Instance class that is used to run this version. Valid values are:
+   * * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+   * * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+   * Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+   * BasicScaling.
+   * 
+ * + * string instance_class = 7; + * + * @return The instanceClass. + */ + @java.lang.Override + public java.lang.String getInstanceClass() { + java.lang.Object ref = instanceClass_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceClass_ = s; + return s; + } + } + /** + * + * + *
+   * Instance class that is used to run this version. Valid values are:
+   * * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+   * * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+   * Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+   * BasicScaling.
+   * 
+ * + * string instance_class = 7; + * + * @return The bytes for instanceClass. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceClassBytes() { + java.lang.Object ref = instanceClass_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceClass_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 8; + private com.google.appengine.v1.Network network_; + /** + * + * + *
+   * Extra network settings.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Network network = 8; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return network_ != null; + } + /** + * + * + *
+   * Extra network settings.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Network network = 8; + * + * @return The network. + */ + @java.lang.Override + public com.google.appengine.v1.Network getNetwork() { + return network_ == null ? com.google.appengine.v1.Network.getDefaultInstance() : network_; + } + /** + * + * + *
+   * Extra network settings.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Network network = 8; + */ + @java.lang.Override + public com.google.appengine.v1.NetworkOrBuilder getNetworkOrBuilder() { + return getNetwork(); + } + + public static final int ZONES_FIELD_NUMBER = 118; + private com.google.protobuf.LazyStringList zones_; + /** + * + * + *
+   * The Google Compute Engine zones that are supported by this version in the
+   * App Engine flexible environment. Deprecated.
+   * 
+ * + * repeated string zones = 118; + * + * @return A list containing the zones. + */ + public com.google.protobuf.ProtocolStringList getZonesList() { + return zones_; + } + /** + * + * + *
+   * The Google Compute Engine zones that are supported by this version in the
+   * App Engine flexible environment. Deprecated.
+   * 
+ * + * repeated string zones = 118; + * + * @return The count of zones. + */ + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+   * The Google Compute Engine zones that are supported by this version in the
+   * App Engine flexible environment. Deprecated.
+   * 
+ * + * repeated string zones = 118; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + public java.lang.String getZones(int index) { + return zones_.get(index); + } + /** + * + * + *
+   * The Google Compute Engine zones that are supported by this version in the
+   * App Engine flexible environment. Deprecated.
+   * 
+ * + * repeated string zones = 118; + * + * @param index The index of the value to return. + * @return The bytes of the zones at the given index. + */ + public com.google.protobuf.ByteString getZonesBytes(int index) { + return zones_.getByteString(index); + } + + public static final int RESOURCES_FIELD_NUMBER = 9; + private com.google.appengine.v1.Resources resources_; + /** + * + * + *
+   * Machine resources for this version.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Resources resources = 9; + * + * @return Whether the resources field is set. + */ + @java.lang.Override + public boolean hasResources() { + return resources_ != null; + } + /** + * + * + *
+   * Machine resources for this version.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Resources resources = 9; + * + * @return The resources. + */ + @java.lang.Override + public com.google.appengine.v1.Resources getResources() { + return resources_ == null ? com.google.appengine.v1.Resources.getDefaultInstance() : resources_; + } + /** + * + * + *
+   * Machine resources for this version.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Resources resources = 9; + */ + @java.lang.Override + public com.google.appengine.v1.ResourcesOrBuilder getResourcesOrBuilder() { + return getResources(); + } + + public static final int RUNTIME_FIELD_NUMBER = 10; + private volatile java.lang.Object runtime_; + /** + * + * + *
+   * Desired runtime. Example: `python27`.
+   * 
+ * + * string runtime = 10; + * + * @return The runtime. + */ + @java.lang.Override + public java.lang.String getRuntime() { + java.lang.Object ref = runtime_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtime_ = s; + return s; + } + } + /** + * + * + *
+   * Desired runtime. Example: `python27`.
+   * 
+ * + * string runtime = 10; + * + * @return The bytes for runtime. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeBytes() { + java.lang.Object ref = runtime_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtime_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_CHANNEL_FIELD_NUMBER = 117; + private volatile java.lang.Object runtimeChannel_; + /** + * + * + *
+   * The channel of the runtime to use. Only available for some
+   * runtimes. Defaults to the `default` channel.
+   * 
+ * + * string runtime_channel = 117; + * + * @return The runtimeChannel. + */ + @java.lang.Override + public java.lang.String getRuntimeChannel() { + java.lang.Object ref = runtimeChannel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeChannel_ = s; + return s; + } + } + /** + * + * + *
+   * The channel of the runtime to use. Only available for some
+   * runtimes. Defaults to the `default` channel.
+   * 
+ * + * string runtime_channel = 117; + * + * @return The bytes for runtimeChannel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeChannelBytes() { + java.lang.Object ref = runtimeChannel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeChannel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THREADSAFE_FIELD_NUMBER = 11; + private boolean threadsafe_; + /** + * + * + *
+   * Whether multiple requests can be dispatched to this version at once.
+   * 
+ * + * bool threadsafe = 11; + * + * @return The threadsafe. + */ + @java.lang.Override + public boolean getThreadsafe() { + return threadsafe_; + } + + public static final int VM_FIELD_NUMBER = 12; + private boolean vm_; + /** + * + * + *
+   * Whether to deploy this version in a container on a virtual machine.
+   * 
+ * + * bool vm = 12; + * + * @return The vm. + */ + @java.lang.Override + public boolean getVm() { + return vm_; + } + + public static final int BETA_SETTINGS_FIELD_NUMBER = 13; + + private static final class BetaSettingsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Version_BetaSettingsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField betaSettings_; + + private com.google.protobuf.MapField + internalGetBetaSettings() { + if (betaSettings_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BetaSettingsDefaultEntryHolder.defaultEntry); + } + return betaSettings_; + } + + public int getBetaSettingsCount() { + return internalGetBetaSettings().getMap().size(); + } + /** + * + * + *
+   * Metadata settings that are supplied to this version to enable
+   * beta runtime features.
+   * 
+ * + * map<string, string> beta_settings = 13; + */ + @java.lang.Override + public boolean containsBetaSettings(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetBetaSettings().getMap().containsKey(key); + } + /** Use {@link #getBetaSettingsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBetaSettings() { + return getBetaSettingsMap(); + } + /** + * + * + *
+   * Metadata settings that are supplied to this version to enable
+   * beta runtime features.
+   * 
+ * + * map<string, string> beta_settings = 13; + */ + @java.lang.Override + public java.util.Map getBetaSettingsMap() { + return internalGetBetaSettings().getMap(); + } + /** + * + * + *
+   * Metadata settings that are supplied to this version to enable
+   * beta runtime features.
+   * 
+ * + * map<string, string> beta_settings = 13; + */ + @java.lang.Override + public java.lang.String getBetaSettingsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetBetaSettings().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Metadata settings that are supplied to this version to enable
+   * beta runtime features.
+   * 
+ * + * map<string, string> beta_settings = 13; + */ + @java.lang.Override + public java.lang.String getBetaSettingsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetBetaSettings().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENV_FIELD_NUMBER = 14; + private volatile java.lang.Object env_; + /** + * + * + *
+   * App Engine execution environment for this version.
+   * Defaults to `standard`.
+   * 
+ * + * string env = 14; + * + * @return The env. + */ + @java.lang.Override + public java.lang.String getEnv() { + java.lang.Object ref = env_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + env_ = s; + return s; + } + } + /** + * + * + *
+   * App Engine execution environment for this version.
+   * Defaults to `standard`.
+   * 
+ * + * string env = 14; + * + * @return The bytes for env. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvBytes() { + java.lang.Object ref = env_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + env_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVING_STATUS_FIELD_NUMBER = 15; + private int servingStatus_; + /** + * + * + *
+   * Current serving status of this version. Only the versions with a
+   * `SERVING` status create instances and can be billed.
+   * `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+   * 
+ * + * .google.appengine.v1.ServingStatus serving_status = 15; + * + * @return The enum numeric value on the wire for servingStatus. + */ + @java.lang.Override + public int getServingStatusValue() { + return servingStatus_; + } + /** + * + * + *
+   * Current serving status of this version. Only the versions with a
+   * `SERVING` status create instances and can be billed.
+   * `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+   * 
+ * + * .google.appengine.v1.ServingStatus serving_status = 15; + * + * @return The servingStatus. + */ + @java.lang.Override + public com.google.appengine.v1.ServingStatus getServingStatus() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.ServingStatus result = + com.google.appengine.v1.ServingStatus.valueOf(servingStatus_); + return result == null ? com.google.appengine.v1.ServingStatus.UNRECOGNIZED : result; + } + + public static final int CREATED_BY_FIELD_NUMBER = 16; + private volatile java.lang.Object createdBy_; + /** + * + * + *
+   * Email address of the user who created this version.
+   * @OutputOnly
+   * 
+ * + * string created_by = 16; + * + * @return The createdBy. + */ + @java.lang.Override + public java.lang.String getCreatedBy() { + java.lang.Object ref = createdBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + createdBy_ = s; + return s; + } + } + /** + * + * + *
+   * Email address of the user who created this version.
+   * @OutputOnly
+   * 
+ * + * string created_by = 16; + * + * @return The bytes for createdBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCreatedByBytes() { + java.lang.Object ref = createdBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + createdBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 17; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Time that this version was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Time that this version was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Time that this version was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int DISK_USAGE_BYTES_FIELD_NUMBER = 18; + private long diskUsageBytes_; + /** + * + * + *
+   * Total size in bytes of all the files that are included in this version
+   * and currently hosted on the App Engine disk.
+   * @OutputOnly
+   * 
+ * + * int64 disk_usage_bytes = 18; + * + * @return The diskUsageBytes. + */ + @java.lang.Override + public long getDiskUsageBytes() { + return diskUsageBytes_; + } + + public static final int RUNTIME_API_VERSION_FIELD_NUMBER = 21; + private volatile java.lang.Object runtimeApiVersion_; + /** + * + * + *
+   * The version of the API in the given runtime environment. Please see the
+   * app.yaml reference for valid values at
+   * https://cloud.google.com/appengine/docs/standard/<language>/config/appref
+   * 
+ * + * string runtime_api_version = 21; + * + * @return The runtimeApiVersion. + */ + @java.lang.Override + public java.lang.String getRuntimeApiVersion() { + java.lang.Object ref = runtimeApiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeApiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * The version of the API in the given runtime environment. Please see the
+   * app.yaml reference for valid values at
+   * https://cloud.google.com/appengine/docs/standard/<language>/config/appref
+   * 
+ * + * string runtime_api_version = 21; + * + * @return The bytes for runtimeApiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeApiVersionBytes() { + java.lang.Object ref = runtimeApiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeApiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_MAIN_EXECUTABLE_PATH_FIELD_NUMBER = 22; + private volatile java.lang.Object runtimeMainExecutablePath_; + /** + * + * + *
+   * The path or name of the app's main executable.
+   * 
+ * + * string runtime_main_executable_path = 22; + * + * @return The runtimeMainExecutablePath. + */ + @java.lang.Override + public java.lang.String getRuntimeMainExecutablePath() { + java.lang.Object ref = runtimeMainExecutablePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeMainExecutablePath_ = s; + return s; + } + } + /** + * + * + *
+   * The path or name of the app's main executable.
+   * 
+ * + * string runtime_main_executable_path = 22; + * + * @return The bytes for runtimeMainExecutablePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeMainExecutablePathBytes() { + java.lang.Object ref = runtimeMainExecutablePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeMainExecutablePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 127; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * The identity that the deployed version will run as.
+   * Admin API will use the App Engine Appspot service account as default if
+   * this field is neither provided in app.yaml file nor through CLI flag.
+   * 
+ * + * string service_account = 127; + * + * @return The serviceAccount. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * The identity that the deployed version will run as.
+   * Admin API will use the App Engine Appspot service account as default if
+   * this field is neither provided in app.yaml file nor through CLI flag.
+   * 
+ * + * string service_account = 127; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + 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; + } + } + + public static final int HANDLERS_FIELD_NUMBER = 100; + private java.util.List handlers_; + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + @java.lang.Override + public java.util.List getHandlersList() { + return handlers_; + } + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + @java.lang.Override + public java.util.List + getHandlersOrBuilderList() { + return handlers_; + } + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + @java.lang.Override + public int getHandlersCount() { + return handlers_.size(); + } + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + @java.lang.Override + public com.google.appengine.v1.UrlMap getHandlers(int index) { + return handlers_.get(index); + } + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + @java.lang.Override + public com.google.appengine.v1.UrlMapOrBuilder getHandlersOrBuilder(int index) { + return handlers_.get(index); + } + + public static final int ERROR_HANDLERS_FIELD_NUMBER = 101; + private java.util.List errorHandlers_; + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + @java.lang.Override + public java.util.List getErrorHandlersList() { + return errorHandlers_; + } + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + @java.lang.Override + public java.util.List + getErrorHandlersOrBuilderList() { + return errorHandlers_; + } + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + @java.lang.Override + public int getErrorHandlersCount() { + return errorHandlers_.size(); + } + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + @java.lang.Override + public com.google.appengine.v1.ErrorHandler getErrorHandlers(int index) { + return errorHandlers_.get(index); + } + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + @java.lang.Override + public com.google.appengine.v1.ErrorHandlerOrBuilder getErrorHandlersOrBuilder(int index) { + return errorHandlers_.get(index); + } + + public static final int LIBRARIES_FIELD_NUMBER = 102; + private java.util.List libraries_; + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + @java.lang.Override + public java.util.List getLibrariesList() { + return libraries_; + } + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + @java.lang.Override + public java.util.List + getLibrariesOrBuilderList() { + return libraries_; + } + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + @java.lang.Override + public int getLibrariesCount() { + return libraries_.size(); + } + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + @java.lang.Override + public com.google.appengine.v1.Library getLibraries(int index) { + return libraries_.get(index); + } + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + @java.lang.Override + public com.google.appengine.v1.LibraryOrBuilder getLibrariesOrBuilder(int index) { + return libraries_.get(index); + } + + public static final int API_CONFIG_FIELD_NUMBER = 103; + private com.google.appengine.v1.ApiConfigHandler apiConfig_; + /** + * + * + *
+   * Serving configuration for
+   * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + * + * @return Whether the apiConfig field is set. + */ + @java.lang.Override + public boolean hasApiConfig() { + return apiConfig_ != null; + } + /** + * + * + *
+   * Serving configuration for
+   * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + * + * @return The apiConfig. + */ + @java.lang.Override + public com.google.appengine.v1.ApiConfigHandler getApiConfig() { + return apiConfig_ == null + ? com.google.appengine.v1.ApiConfigHandler.getDefaultInstance() + : apiConfig_; + } + /** + * + * + *
+   * Serving configuration for
+   * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + */ + @java.lang.Override + public com.google.appengine.v1.ApiConfigHandlerOrBuilder getApiConfigOrBuilder() { + return getApiConfig(); + } + + public static final int ENV_VARIABLES_FIELD_NUMBER = 104; + + private static final class EnvVariablesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Version_EnvVariablesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField envVariables_; + + private com.google.protobuf.MapField + internalGetEnvVariables() { + if (envVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvVariablesDefaultEntryHolder.defaultEntry); + } + return envVariables_; + } + + public int getEnvVariablesCount() { + return internalGetEnvVariables().getMap().size(); + } + /** + * + * + *
+   * Environment variables available to the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> env_variables = 104; + */ + @java.lang.Override + public boolean containsEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvVariables().getMap().containsKey(key); + } + /** Use {@link #getEnvVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvVariables() { + return getEnvVariablesMap(); + } + /** + * + * + *
+   * Environment variables available to the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> env_variables = 104; + */ + @java.lang.Override + public java.util.Map getEnvVariablesMap() { + return internalGetEnvVariables().getMap(); + } + /** + * + * + *
+   * Environment variables available to the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> env_variables = 104; + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Environment variables available to the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> env_variables = 104; + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int BUILD_ENV_VARIABLES_FIELD_NUMBER = 125; + + private static final class BuildEnvVariablesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Version_BuildEnvVariablesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField buildEnvVariables_; + + private com.google.protobuf.MapField + internalGetBuildEnvVariables() { + if (buildEnvVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuildEnvVariablesDefaultEntryHolder.defaultEntry); + } + return buildEnvVariables_; + } + + public int getBuildEnvVariablesCount() { + return internalGetBuildEnvVariables().getMap().size(); + } + /** + * + * + *
+   * Environment variables available to the build environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> build_env_variables = 125; + */ + @java.lang.Override + public boolean containsBuildEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetBuildEnvVariables().getMap().containsKey(key); + } + /** Use {@link #getBuildEnvVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuildEnvVariables() { + return getBuildEnvVariablesMap(); + } + /** + * + * + *
+   * Environment variables available to the build environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> build_env_variables = 125; + */ + @java.lang.Override + public java.util.Map getBuildEnvVariablesMap() { + return internalGetBuildEnvVariables().getMap(); + } + /** + * + * + *
+   * Environment variables available to the build environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> build_env_variables = 125; + */ + @java.lang.Override + public java.lang.String getBuildEnvVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetBuildEnvVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Environment variables available to the build environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> build_env_variables = 125; + */ + @java.lang.Override + public java.lang.String getBuildEnvVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetBuildEnvVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DEFAULT_EXPIRATION_FIELD_NUMBER = 105; + private com.google.protobuf.Duration defaultExpiration_; + /** + * + * + *
+   * Duration that static files should be cached by web proxies and browsers.
+   * Only applicable if the corresponding
+   * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+   * does not specify its own expiration time.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.protobuf.Duration default_expiration = 105; + * + * @return Whether the defaultExpiration field is set. + */ + @java.lang.Override + public boolean hasDefaultExpiration() { + return defaultExpiration_ != null; + } + /** + * + * + *
+   * Duration that static files should be cached by web proxies and browsers.
+   * Only applicable if the corresponding
+   * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+   * does not specify its own expiration time.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.protobuf.Duration default_expiration = 105; + * + * @return The defaultExpiration. + */ + @java.lang.Override + public com.google.protobuf.Duration getDefaultExpiration() { + return defaultExpiration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : defaultExpiration_; + } + /** + * + * + *
+   * Duration that static files should be cached by web proxies and browsers.
+   * Only applicable if the corresponding
+   * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+   * does not specify its own expiration time.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.protobuf.Duration default_expiration = 105; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDefaultExpirationOrBuilder() { + return getDefaultExpiration(); + } + + public static final int HEALTH_CHECK_FIELD_NUMBER = 106; + private com.google.appengine.v1.HealthCheck healthCheck_; + /** + * + * + *
+   * Configures health checking for instances. Unhealthy instances are
+   * stopped and replaced with new instances.
+   * Only applicable in the App Engine flexible environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + * + * @return Whether the healthCheck field is set. + */ + @java.lang.Override + public boolean hasHealthCheck() { + return healthCheck_ != null; + } + /** + * + * + *
+   * Configures health checking for instances. Unhealthy instances are
+   * stopped and replaced with new instances.
+   * Only applicable in the App Engine flexible environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + * + * @return The healthCheck. + */ + @java.lang.Override + public com.google.appengine.v1.HealthCheck getHealthCheck() { + return healthCheck_ == null + ? com.google.appengine.v1.HealthCheck.getDefaultInstance() + : healthCheck_; + } + /** + * + * + *
+   * Configures health checking for instances. Unhealthy instances are
+   * stopped and replaced with new instances.
+   * Only applicable in the App Engine flexible environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + */ + @java.lang.Override + public com.google.appengine.v1.HealthCheckOrBuilder getHealthCheckOrBuilder() { + return getHealthCheck(); + } + + public static final int READINESS_CHECK_FIELD_NUMBER = 112; + private com.google.appengine.v1.ReadinessCheck readinessCheck_; + /** + * + * + *
+   * Configures readiness health checking for instances.
+   * Unhealthy instances are not put into the backend traffic rotation.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + * + * @return Whether the readinessCheck field is set. + */ + @java.lang.Override + public boolean hasReadinessCheck() { + return readinessCheck_ != null; + } + /** + * + * + *
+   * Configures readiness health checking for instances.
+   * Unhealthy instances are not put into the backend traffic rotation.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + * + * @return The readinessCheck. + */ + @java.lang.Override + public com.google.appengine.v1.ReadinessCheck getReadinessCheck() { + return readinessCheck_ == null + ? com.google.appengine.v1.ReadinessCheck.getDefaultInstance() + : readinessCheck_; + } + /** + * + * + *
+   * Configures readiness health checking for instances.
+   * Unhealthy instances are not put into the backend traffic rotation.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + */ + @java.lang.Override + public com.google.appengine.v1.ReadinessCheckOrBuilder getReadinessCheckOrBuilder() { + return getReadinessCheck(); + } + + public static final int LIVENESS_CHECK_FIELD_NUMBER = 113; + private com.google.appengine.v1.LivenessCheck livenessCheck_; + /** + * + * + *
+   * Configures liveness health checking for instances.
+   * Unhealthy instances are stopped and replaced with new instances
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + * + * @return Whether the livenessCheck field is set. + */ + @java.lang.Override + public boolean hasLivenessCheck() { + return livenessCheck_ != null; + } + /** + * + * + *
+   * Configures liveness health checking for instances.
+   * Unhealthy instances are stopped and replaced with new instances
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + * + * @return The livenessCheck. + */ + @java.lang.Override + public com.google.appengine.v1.LivenessCheck getLivenessCheck() { + return livenessCheck_ == null + ? com.google.appengine.v1.LivenessCheck.getDefaultInstance() + : livenessCheck_; + } + /** + * + * + *
+   * Configures liveness health checking for instances.
+   * Unhealthy instances are stopped and replaced with new instances
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + */ + @java.lang.Override + public com.google.appengine.v1.LivenessCheckOrBuilder getLivenessCheckOrBuilder() { + return getLivenessCheck(); + } + + public static final int NOBUILD_FILES_REGEX_FIELD_NUMBER = 107; + private volatile java.lang.Object nobuildFilesRegex_; + /** + * + * + *
+   * Files that match this pattern will not be built into this version.
+   * Only applicable for Go runtimes.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * string nobuild_files_regex = 107; + * + * @return The nobuildFilesRegex. + */ + @java.lang.Override + public java.lang.String getNobuildFilesRegex() { + java.lang.Object ref = nobuildFilesRegex_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nobuildFilesRegex_ = s; + return s; + } + } + /** + * + * + *
+   * Files that match this pattern will not be built into this version.
+   * Only applicable for Go runtimes.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * string nobuild_files_regex = 107; + * + * @return The bytes for nobuildFilesRegex. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNobuildFilesRegexBytes() { + java.lang.Object ref = nobuildFilesRegex_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nobuildFilesRegex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYMENT_FIELD_NUMBER = 108; + private com.google.appengine.v1.Deployment deployment_; + /** + * + * + *
+   * Code and application artifacts that make up this version.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + * + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return deployment_ != null; + } + /** + * + * + *
+   * Code and application artifacts that make up this version.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + * + * @return The deployment. + */ + @java.lang.Override + public com.google.appengine.v1.Deployment getDeployment() { + return deployment_ == null + ? com.google.appengine.v1.Deployment.getDefaultInstance() + : deployment_; + } + /** + * + * + *
+   * Code and application artifacts that make up this version.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + */ + @java.lang.Override + public com.google.appengine.v1.DeploymentOrBuilder getDeploymentOrBuilder() { + return getDeployment(); + } + + public static final int VERSION_URL_FIELD_NUMBER = 109; + private volatile java.lang.Object versionUrl_; + /** + * + * + *
+   * Serving URL for this version. Example:
+   * "https://myversion-dot-myservice-dot-myapp.appspot.com"
+   * @OutputOnly
+   * 
+ * + * string version_url = 109; + * + * @return The versionUrl. + */ + @java.lang.Override + public java.lang.String getVersionUrl() { + java.lang.Object ref = versionUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionUrl_ = s; + return s; + } + } + /** + * + * + *
+   * Serving URL for this version. Example:
+   * "https://myversion-dot-myservice-dot-myapp.appspot.com"
+   * @OutputOnly
+   * 
+ * + * string version_url = 109; + * + * @return The bytes for versionUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionUrlBytes() { + java.lang.Object ref = versionUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINTS_API_SERVICE_FIELD_NUMBER = 110; + private com.google.appengine.v1.EndpointsApiService endpointsApiService_; + /** + * + * + *
+   * Cloud Endpoints configuration.
+   * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+   * Proxy will be provided to serve the API implemented by the app.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + * + * @return Whether the endpointsApiService field is set. + */ + @java.lang.Override + public boolean hasEndpointsApiService() { + return endpointsApiService_ != null; + } + /** + * + * + *
+   * Cloud Endpoints configuration.
+   * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+   * Proxy will be provided to serve the API implemented by the app.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + * + * @return The endpointsApiService. + */ + @java.lang.Override + public com.google.appengine.v1.EndpointsApiService getEndpointsApiService() { + return endpointsApiService_ == null + ? com.google.appengine.v1.EndpointsApiService.getDefaultInstance() + : endpointsApiService_; + } + /** + * + * + *
+   * Cloud Endpoints configuration.
+   * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+   * Proxy will be provided to serve the API implemented by the app.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + */ + @java.lang.Override + public com.google.appengine.v1.EndpointsApiServiceOrBuilder getEndpointsApiServiceOrBuilder() { + return getEndpointsApiService(); + } + + public static final int ENTRYPOINT_FIELD_NUMBER = 122; + private com.google.appengine.v1.Entrypoint entrypoint_; + /** + * + * + *
+   * The entrypoint for the application.
+   * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + * + * @return Whether the entrypoint field is set. + */ + @java.lang.Override + public boolean hasEntrypoint() { + return entrypoint_ != null; + } + /** + * + * + *
+   * The entrypoint for the application.
+   * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + * + * @return The entrypoint. + */ + @java.lang.Override + public com.google.appengine.v1.Entrypoint getEntrypoint() { + return entrypoint_ == null + ? com.google.appengine.v1.Entrypoint.getDefaultInstance() + : entrypoint_; + } + /** + * + * + *
+   * The entrypoint for the application.
+   * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + */ + @java.lang.Override + public com.google.appengine.v1.EntrypointOrBuilder getEntrypointOrBuilder() { + return getEntrypoint(); + } + + public static final int VPC_ACCESS_CONNECTOR_FIELD_NUMBER = 121; + private com.google.appengine.v1.VpcAccessConnector vpcAccessConnector_; + /** + * + * + *
+   * Enables VPC connectivity for standard apps.
+   * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + * + * @return Whether the vpcAccessConnector field is set. + */ + @java.lang.Override + public boolean hasVpcAccessConnector() { + return vpcAccessConnector_ != null; + } + /** + * + * + *
+   * Enables VPC connectivity for standard apps.
+   * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + * + * @return The vpcAccessConnector. + */ + @java.lang.Override + public com.google.appengine.v1.VpcAccessConnector getVpcAccessConnector() { + return vpcAccessConnector_ == null + ? com.google.appengine.v1.VpcAccessConnector.getDefaultInstance() + : vpcAccessConnector_; + } + /** + * + * + *
+   * Enables VPC connectivity for standard apps.
+   * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + */ + @java.lang.Override + public com.google.appengine.v1.VpcAccessConnectorOrBuilder getVpcAccessConnectorOrBuilder() { + return getVpcAccessConnector(); + } + + 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 { + getSerializedSize(); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (scalingCase_ == 3) { + output.writeMessage(3, (com.google.appengine.v1.AutomaticScaling) scaling_); + } + if (scalingCase_ == 4) { + output.writeMessage(4, (com.google.appengine.v1.BasicScaling) scaling_); + } + if (scalingCase_ == 5) { + output.writeMessage(5, (com.google.appengine.v1.ManualScaling) scaling_); + } + if (getInboundServicesList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(inboundServicesMemoizedSerializedSize); + } + for (int i = 0; i < inboundServices_.size(); i++) { + output.writeEnumNoTag(inboundServices_.get(i)); + } + if (!getInstanceClassBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, instanceClass_); + } + if (network_ != null) { + output.writeMessage(8, getNetwork()); + } + if (resources_ != null) { + output.writeMessage(9, getResources()); + } + if (!getRuntimeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, runtime_); + } + if (threadsafe_ != false) { + output.writeBool(11, threadsafe_); + } + if (vm_ != false) { + output.writeBool(12, vm_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetBetaSettings(), BetaSettingsDefaultEntryHolder.defaultEntry, 13); + if (!getEnvBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, env_); + } + if (servingStatus_ + != com.google.appengine.v1.ServingStatus.SERVING_STATUS_UNSPECIFIED.getNumber()) { + output.writeEnum(15, servingStatus_); + } + if (!getCreatedByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, createdBy_); + } + if (createTime_ != null) { + output.writeMessage(17, getCreateTime()); + } + if (diskUsageBytes_ != 0L) { + output.writeInt64(18, diskUsageBytes_); + } + if (!getRuntimeApiVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, runtimeApiVersion_); + } + if (!getRuntimeMainExecutablePathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 22, runtimeMainExecutablePath_); + } + for (int i = 0; i < handlers_.size(); i++) { + output.writeMessage(100, handlers_.get(i)); + } + for (int i = 0; i < errorHandlers_.size(); i++) { + output.writeMessage(101, errorHandlers_.get(i)); + } + for (int i = 0; i < libraries_.size(); i++) { + output.writeMessage(102, libraries_.get(i)); + } + if (apiConfig_ != null) { + output.writeMessage(103, getApiConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetEnvVariables(), EnvVariablesDefaultEntryHolder.defaultEntry, 104); + if (defaultExpiration_ != null) { + output.writeMessage(105, getDefaultExpiration()); + } + if (healthCheck_ != null) { + output.writeMessage(106, getHealthCheck()); + } + if (!getNobuildFilesRegexBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 107, nobuildFilesRegex_); + } + if (deployment_ != null) { + output.writeMessage(108, getDeployment()); + } + if (!getVersionUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 109, versionUrl_); + } + if (endpointsApiService_ != null) { + output.writeMessage(110, getEndpointsApiService()); + } + if (readinessCheck_ != null) { + output.writeMessage(112, getReadinessCheck()); + } + if (livenessCheck_ != null) { + output.writeMessage(113, getLivenessCheck()); + } + if (!getRuntimeChannelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 117, runtimeChannel_); + } + for (int i = 0; i < zones_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 118, zones_.getRaw(i)); + } + if (vpcAccessConnector_ != null) { + output.writeMessage(121, getVpcAccessConnector()); + } + if (entrypoint_ != null) { + output.writeMessage(122, getEntrypoint()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetBuildEnvVariables(), + BuildEnvVariablesDefaultEntryHolder.defaultEntry, + 125); + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 127, serviceAccount_); + } + 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 (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (scalingCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.appengine.v1.AutomaticScaling) scaling_); + } + if (scalingCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.appengine.v1.BasicScaling) scaling_); + } + if (scalingCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.appengine.v1.ManualScaling) scaling_); + } + { + int dataSize = 0; + for (int i = 0; i < inboundServices_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(inboundServices_.get(i)); + } + size += dataSize; + if (!getInboundServicesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + inboundServicesMemoizedSerializedSize = dataSize; + } + if (!getInstanceClassBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, instanceClass_); + } + if (network_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getNetwork()); + } + if (resources_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getResources()); + } + if (!getRuntimeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, runtime_); + } + if (threadsafe_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, threadsafe_); + } + if (vm_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, vm_); + } + for (java.util.Map.Entry entry : + internalGetBetaSettings().getMap().entrySet()) { + com.google.protobuf.MapEntry betaSettings__ = + BetaSettingsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, betaSettings__); + } + if (!getEnvBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, env_); + } + if (servingStatus_ + != com.google.appengine.v1.ServingStatus.SERVING_STATUS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, servingStatus_); + } + if (!getCreatedByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, createdBy_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getCreateTime()); + } + if (diskUsageBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(18, diskUsageBytes_); + } + if (!getRuntimeApiVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, runtimeApiVersion_); + } + if (!getRuntimeMainExecutablePathBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(22, runtimeMainExecutablePath_); + } + for (int i = 0; i < handlers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(100, handlers_.get(i)); + } + for (int i = 0; i < errorHandlers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(101, errorHandlers_.get(i)); + } + for (int i = 0; i < libraries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(102, libraries_.get(i)); + } + if (apiConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(103, getApiConfig()); + } + for (java.util.Map.Entry entry : + internalGetEnvVariables().getMap().entrySet()) { + com.google.protobuf.MapEntry envVariables__ = + EnvVariablesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(104, envVariables__); + } + if (defaultExpiration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(105, getDefaultExpiration()); + } + if (healthCheck_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(106, getHealthCheck()); + } + if (!getNobuildFilesRegexBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(107, nobuildFilesRegex_); + } + if (deployment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(108, getDeployment()); + } + if (!getVersionUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(109, versionUrl_); + } + if (endpointsApiService_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(110, getEndpointsApiService()); + } + if (readinessCheck_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(112, getReadinessCheck()); + } + if (livenessCheck_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(113, getLivenessCheck()); + } + if (!getRuntimeChannelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(117, runtimeChannel_); + } + { + int dataSize = 0; + for (int i = 0; i < zones_.size(); i++) { + dataSize += computeStringSizeNoTag(zones_.getRaw(i)); + } + size += dataSize; + size += 2 * getZonesList().size(); + } + if (vpcAccessConnector_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(121, getVpcAccessConnector()); + } + if (entrypoint_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(122, getEntrypoint()); + } + for (java.util.Map.Entry entry : + internalGetBuildEnvVariables().getMap().entrySet()) { + com.google.protobuf.MapEntry buildEnvVariables__ = + BuildEnvVariablesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(125, buildEnvVariables__); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(127, 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.appengine.v1.Version)) { + return super.equals(obj); + } + com.google.appengine.v1.Version other = (com.google.appengine.v1.Version) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; + if (!inboundServices_.equals(other.inboundServices_)) return false; + if (!getInstanceClass().equals(other.getInstanceClass())) return false; + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; + } + if (!getZonesList().equals(other.getZonesList())) return false; + if (hasResources() != other.hasResources()) return false; + if (hasResources()) { + if (!getResources().equals(other.getResources())) return false; + } + if (!getRuntime().equals(other.getRuntime())) return false; + if (!getRuntimeChannel().equals(other.getRuntimeChannel())) return false; + if (getThreadsafe() != other.getThreadsafe()) return false; + if (getVm() != other.getVm()) return false; + if (!internalGetBetaSettings().equals(other.internalGetBetaSettings())) return false; + if (!getEnv().equals(other.getEnv())) return false; + if (servingStatus_ != other.servingStatus_) return false; + if (!getCreatedBy().equals(other.getCreatedBy())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (getDiskUsageBytes() != other.getDiskUsageBytes()) return false; + if (!getRuntimeApiVersion().equals(other.getRuntimeApiVersion())) return false; + if (!getRuntimeMainExecutablePath().equals(other.getRuntimeMainExecutablePath())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getHandlersList().equals(other.getHandlersList())) return false; + if (!getErrorHandlersList().equals(other.getErrorHandlersList())) return false; + if (!getLibrariesList().equals(other.getLibrariesList())) return false; + if (hasApiConfig() != other.hasApiConfig()) return false; + if (hasApiConfig()) { + if (!getApiConfig().equals(other.getApiConfig())) return false; + } + if (!internalGetEnvVariables().equals(other.internalGetEnvVariables())) return false; + if (!internalGetBuildEnvVariables().equals(other.internalGetBuildEnvVariables())) return false; + if (hasDefaultExpiration() != other.hasDefaultExpiration()) return false; + if (hasDefaultExpiration()) { + if (!getDefaultExpiration().equals(other.getDefaultExpiration())) return false; + } + if (hasHealthCheck() != other.hasHealthCheck()) return false; + if (hasHealthCheck()) { + if (!getHealthCheck().equals(other.getHealthCheck())) return false; + } + if (hasReadinessCheck() != other.hasReadinessCheck()) return false; + if (hasReadinessCheck()) { + if (!getReadinessCheck().equals(other.getReadinessCheck())) return false; + } + if (hasLivenessCheck() != other.hasLivenessCheck()) return false; + if (hasLivenessCheck()) { + if (!getLivenessCheck().equals(other.getLivenessCheck())) return false; + } + if (!getNobuildFilesRegex().equals(other.getNobuildFilesRegex())) return false; + if (hasDeployment() != other.hasDeployment()) return false; + if (hasDeployment()) { + if (!getDeployment().equals(other.getDeployment())) return false; + } + if (!getVersionUrl().equals(other.getVersionUrl())) return false; + if (hasEndpointsApiService() != other.hasEndpointsApiService()) return false; + if (hasEndpointsApiService()) { + if (!getEndpointsApiService().equals(other.getEndpointsApiService())) return false; + } + if (hasEntrypoint() != other.hasEntrypoint()) return false; + if (hasEntrypoint()) { + if (!getEntrypoint().equals(other.getEntrypoint())) return false; + } + if (hasVpcAccessConnector() != other.hasVpcAccessConnector()) return false; + if (hasVpcAccessConnector()) { + if (!getVpcAccessConnector().equals(other.getVpcAccessConnector())) return false; + } + if (!getScalingCase().equals(other.getScalingCase())) return false; + switch (scalingCase_) { + case 3: + if (!getAutomaticScaling().equals(other.getAutomaticScaling())) return false; + break; + case 4: + if (!getBasicScaling().equals(other.getBasicScaling())) return false; + break; + case 5: + if (!getManualScaling().equals(other.getManualScaling())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getInboundServicesCount() > 0) { + hash = (37 * hash) + INBOUND_SERVICES_FIELD_NUMBER; + hash = (53 * hash) + inboundServices_.hashCode(); + } + hash = (37 * hash) + INSTANCE_CLASS_FIELD_NUMBER; + hash = (53 * hash) + getInstanceClass().hashCode(); + if (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + } + if (getZonesCount() > 0) { + hash = (37 * hash) + ZONES_FIELD_NUMBER; + hash = (53 * hash) + getZonesList().hashCode(); + } + if (hasResources()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResources().hashCode(); + } + hash = (37 * hash) + RUNTIME_FIELD_NUMBER; + hash = (53 * hash) + getRuntime().hashCode(); + hash = (37 * hash) + RUNTIME_CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeChannel().hashCode(); + hash = (37 * hash) + THREADSAFE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getThreadsafe()); + hash = (37 * hash) + VM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVm()); + if (!internalGetBetaSettings().getMap().isEmpty()) { + hash = (37 * hash) + BETA_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetBetaSettings().hashCode(); + } + hash = (37 * hash) + ENV_FIELD_NUMBER; + hash = (53 * hash) + getEnv().hashCode(); + hash = (37 * hash) + SERVING_STATUS_FIELD_NUMBER; + hash = (53 * hash) + servingStatus_; + hash = (37 * hash) + CREATED_BY_FIELD_NUMBER; + hash = (53 * hash) + getCreatedBy().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + DISK_USAGE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskUsageBytes()); + hash = (37 * hash) + RUNTIME_API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeApiVersion().hashCode(); + hash = (37 * hash) + RUNTIME_MAIN_EXECUTABLE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeMainExecutablePath().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + if (getHandlersCount() > 0) { + hash = (37 * hash) + HANDLERS_FIELD_NUMBER; + hash = (53 * hash) + getHandlersList().hashCode(); + } + if (getErrorHandlersCount() > 0) { + hash = (37 * hash) + ERROR_HANDLERS_FIELD_NUMBER; + hash = (53 * hash) + getErrorHandlersList().hashCode(); + } + if (getLibrariesCount() > 0) { + hash = (37 * hash) + LIBRARIES_FIELD_NUMBER; + hash = (53 * hash) + getLibrariesList().hashCode(); + } + if (hasApiConfig()) { + hash = (37 * hash) + API_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getApiConfig().hashCode(); + } + if (!internalGetEnvVariables().getMap().isEmpty()) { + hash = (37 * hash) + ENV_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + internalGetEnvVariables().hashCode(); + } + if (!internalGetBuildEnvVariables().getMap().isEmpty()) { + hash = (37 * hash) + BUILD_ENV_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + internalGetBuildEnvVariables().hashCode(); + } + if (hasDefaultExpiration()) { + hash = (37 * hash) + DEFAULT_EXPIRATION_FIELD_NUMBER; + hash = (53 * hash) + getDefaultExpiration().hashCode(); + } + if (hasHealthCheck()) { + hash = (37 * hash) + HEALTH_CHECK_FIELD_NUMBER; + hash = (53 * hash) + getHealthCheck().hashCode(); + } + if (hasReadinessCheck()) { + hash = (37 * hash) + READINESS_CHECK_FIELD_NUMBER; + hash = (53 * hash) + getReadinessCheck().hashCode(); + } + if (hasLivenessCheck()) { + hash = (37 * hash) + LIVENESS_CHECK_FIELD_NUMBER; + hash = (53 * hash) + getLivenessCheck().hashCode(); + } + hash = (37 * hash) + NOBUILD_FILES_REGEX_FIELD_NUMBER; + hash = (53 * hash) + getNobuildFilesRegex().hashCode(); + if (hasDeployment()) { + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + } + hash = (37 * hash) + VERSION_URL_FIELD_NUMBER; + hash = (53 * hash) + getVersionUrl().hashCode(); + if (hasEndpointsApiService()) { + hash = (37 * hash) + ENDPOINTS_API_SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getEndpointsApiService().hashCode(); + } + if (hasEntrypoint()) { + hash = (37 * hash) + ENTRYPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEntrypoint().hashCode(); + } + if (hasVpcAccessConnector()) { + hash = (37 * hash) + VPC_ACCESS_CONNECTOR_FIELD_NUMBER; + hash = (53 * hash) + getVpcAccessConnector().hashCode(); + } + switch (scalingCase_) { + case 3: + hash = (37 * hash) + AUTOMATIC_SCALING_FIELD_NUMBER; + hash = (53 * hash) + getAutomaticScaling().hashCode(); + break; + case 4: + hash = (37 * hash) + BASIC_SCALING_FIELD_NUMBER; + hash = (53 * hash) + getBasicScaling().hashCode(); + break; + case 5: + hash = (37 * hash) + MANUAL_SCALING_FIELD_NUMBER; + hash = (53 * hash) + getManualScaling().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Version parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Version parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Version parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Version 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.appengine.v1.Version parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Version parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Version parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Version 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.appengine.v1.Version parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Version 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.appengine.v1.Version parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Version 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.appengine.v1.Version 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 Version resource is a specific set of source code and configuration files
+   * that are deployed into a service.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Version} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Version) + com.google.appengine.v1.VersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Version_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 13: + return internalGetBetaSettings(); + case 104: + return internalGetEnvVariables(); + case 125: + return internalGetBuildEnvVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 13: + return internalGetMutableBetaSettings(); + case 104: + return internalGetMutableEnvVariables(); + case 125: + return internalGetMutableBuildEnvVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Version.class, com.google.appengine.v1.Version.Builder.class); + } + + // Construct using com.google.appengine.v1.Version.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHandlersFieldBuilder(); + getErrorHandlersFieldBuilder(); + getLibrariesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + id_ = ""; + + inboundServices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + instanceClass_ = ""; + + if (networkBuilder_ == null) { + network_ = null; + } else { + network_ = null; + networkBuilder_ = null; + } + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (resourcesBuilder_ == null) { + resources_ = null; + } else { + resources_ = null; + resourcesBuilder_ = null; + } + runtime_ = ""; + + runtimeChannel_ = ""; + + threadsafe_ = false; + + vm_ = false; + + internalGetMutableBetaSettings().clear(); + env_ = ""; + + servingStatus_ = 0; + + createdBy_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + diskUsageBytes_ = 0L; + + runtimeApiVersion_ = ""; + + runtimeMainExecutablePath_ = ""; + + serviceAccount_ = ""; + + if (handlersBuilder_ == null) { + handlers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + handlersBuilder_.clear(); + } + if (errorHandlersBuilder_ == null) { + errorHandlers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + errorHandlersBuilder_.clear(); + } + if (librariesBuilder_ == null) { + libraries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + librariesBuilder_.clear(); + } + if (apiConfigBuilder_ == null) { + apiConfig_ = null; + } else { + apiConfig_ = null; + apiConfigBuilder_ = null; + } + internalGetMutableEnvVariables().clear(); + internalGetMutableBuildEnvVariables().clear(); + if (defaultExpirationBuilder_ == null) { + defaultExpiration_ = null; + } else { + defaultExpiration_ = null; + defaultExpirationBuilder_ = null; + } + if (healthCheckBuilder_ == null) { + healthCheck_ = null; + } else { + healthCheck_ = null; + healthCheckBuilder_ = null; + } + if (readinessCheckBuilder_ == null) { + readinessCheck_ = null; + } else { + readinessCheck_ = null; + readinessCheckBuilder_ = null; + } + if (livenessCheckBuilder_ == null) { + livenessCheck_ = null; + } else { + livenessCheck_ = null; + livenessCheckBuilder_ = null; + } + nobuildFilesRegex_ = ""; + + if (deploymentBuilder_ == null) { + deployment_ = null; + } else { + deployment_ = null; + deploymentBuilder_ = null; + } + versionUrl_ = ""; + + if (endpointsApiServiceBuilder_ == null) { + endpointsApiService_ = null; + } else { + endpointsApiService_ = null; + endpointsApiServiceBuilder_ = null; + } + if (entrypointBuilder_ == null) { + entrypoint_ = null; + } else { + entrypoint_ = null; + entrypointBuilder_ = null; + } + if (vpcAccessConnectorBuilder_ == null) { + vpcAccessConnector_ = null; + } else { + vpcAccessConnector_ = null; + vpcAccessConnectorBuilder_ = null; + } + scalingCase_ = 0; + scaling_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Version_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Version getDefaultInstanceForType() { + return com.google.appengine.v1.Version.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Version build() { + com.google.appengine.v1.Version result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Version buildPartial() { + com.google.appengine.v1.Version result = new com.google.appengine.v1.Version(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.id_ = id_; + if (scalingCase_ == 3) { + if (automaticScalingBuilder_ == null) { + result.scaling_ = scaling_; + } else { + result.scaling_ = automaticScalingBuilder_.build(); + } + } + if (scalingCase_ == 4) { + if (basicScalingBuilder_ == null) { + result.scaling_ = scaling_; + } else { + result.scaling_ = basicScalingBuilder_.build(); + } + } + if (scalingCase_ == 5) { + if (manualScalingBuilder_ == null) { + result.scaling_ = scaling_; + } else { + result.scaling_ = manualScalingBuilder_.build(); + } + } + if (((bitField0_ & 0x00000001) != 0)) { + inboundServices_ = java.util.Collections.unmodifiableList(inboundServices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.inboundServices_ = inboundServices_; + result.instanceClass_ = instanceClass_; + if (networkBuilder_ == null) { + result.network_ = network_; + } else { + result.network_ = networkBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + zones_ = zones_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.zones_ = zones_; + if (resourcesBuilder_ == null) { + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + result.runtime_ = runtime_; + result.runtimeChannel_ = runtimeChannel_; + result.threadsafe_ = threadsafe_; + result.vm_ = vm_; + result.betaSettings_ = internalGetBetaSettings(); + result.betaSettings_.makeImmutable(); + result.env_ = env_; + result.servingStatus_ = servingStatus_; + result.createdBy_ = createdBy_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.diskUsageBytes_ = diskUsageBytes_; + result.runtimeApiVersion_ = runtimeApiVersion_; + result.runtimeMainExecutablePath_ = runtimeMainExecutablePath_; + result.serviceAccount_ = serviceAccount_; + if (handlersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + handlers_ = java.util.Collections.unmodifiableList(handlers_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.handlers_ = handlers_; + } else { + result.handlers_ = handlersBuilder_.build(); + } + if (errorHandlersBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + errorHandlers_ = java.util.Collections.unmodifiableList(errorHandlers_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.errorHandlers_ = errorHandlers_; + } else { + result.errorHandlers_ = errorHandlersBuilder_.build(); + } + if (librariesBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + libraries_ = java.util.Collections.unmodifiableList(libraries_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.libraries_ = libraries_; + } else { + result.libraries_ = librariesBuilder_.build(); + } + if (apiConfigBuilder_ == null) { + result.apiConfig_ = apiConfig_; + } else { + result.apiConfig_ = apiConfigBuilder_.build(); + } + result.envVariables_ = internalGetEnvVariables(); + result.envVariables_.makeImmutable(); + result.buildEnvVariables_ = internalGetBuildEnvVariables(); + result.buildEnvVariables_.makeImmutable(); + if (defaultExpirationBuilder_ == null) { + result.defaultExpiration_ = defaultExpiration_; + } else { + result.defaultExpiration_ = defaultExpirationBuilder_.build(); + } + if (healthCheckBuilder_ == null) { + result.healthCheck_ = healthCheck_; + } else { + result.healthCheck_ = healthCheckBuilder_.build(); + } + if (readinessCheckBuilder_ == null) { + result.readinessCheck_ = readinessCheck_; + } else { + result.readinessCheck_ = readinessCheckBuilder_.build(); + } + if (livenessCheckBuilder_ == null) { + result.livenessCheck_ = livenessCheck_; + } else { + result.livenessCheck_ = livenessCheckBuilder_.build(); + } + result.nobuildFilesRegex_ = nobuildFilesRegex_; + if (deploymentBuilder_ == null) { + result.deployment_ = deployment_; + } else { + result.deployment_ = deploymentBuilder_.build(); + } + result.versionUrl_ = versionUrl_; + if (endpointsApiServiceBuilder_ == null) { + result.endpointsApiService_ = endpointsApiService_; + } else { + result.endpointsApiService_ = endpointsApiServiceBuilder_.build(); + } + if (entrypointBuilder_ == null) { + result.entrypoint_ = entrypoint_; + } else { + result.entrypoint_ = entrypointBuilder_.build(); + } + if (vpcAccessConnectorBuilder_ == null) { + result.vpcAccessConnector_ = vpcAccessConnector_; + } else { + result.vpcAccessConnector_ = vpcAccessConnectorBuilder_.build(); + } + result.scalingCase_ = scalingCase_; + 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.appengine.v1.Version) { + return mergeFrom((com.google.appengine.v1.Version) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Version other) { + if (other == com.google.appengine.v1.Version.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.inboundServices_.isEmpty()) { + if (inboundServices_.isEmpty()) { + inboundServices_ = other.inboundServices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInboundServicesIsMutable(); + inboundServices_.addAll(other.inboundServices_); + } + onChanged(); + } + if (!other.getInstanceClass().isEmpty()) { + instanceClass_ = other.instanceClass_; + onChanged(); + } + if (other.hasNetwork()) { + mergeNetwork(other.getNetwork()); + } + if (!other.zones_.isEmpty()) { + if (zones_.isEmpty()) { + zones_ = other.zones_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureZonesIsMutable(); + zones_.addAll(other.zones_); + } + onChanged(); + } + if (other.hasResources()) { + mergeResources(other.getResources()); + } + if (!other.getRuntime().isEmpty()) { + runtime_ = other.runtime_; + onChanged(); + } + if (!other.getRuntimeChannel().isEmpty()) { + runtimeChannel_ = other.runtimeChannel_; + onChanged(); + } + if (other.getThreadsafe() != false) { + setThreadsafe(other.getThreadsafe()); + } + if (other.getVm() != false) { + setVm(other.getVm()); + } + internalGetMutableBetaSettings().mergeFrom(other.internalGetBetaSettings()); + if (!other.getEnv().isEmpty()) { + env_ = other.env_; + onChanged(); + } + if (other.servingStatus_ != 0) { + setServingStatusValue(other.getServingStatusValue()); + } + if (!other.getCreatedBy().isEmpty()) { + createdBy_ = other.createdBy_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.getDiskUsageBytes() != 0L) { + setDiskUsageBytes(other.getDiskUsageBytes()); + } + if (!other.getRuntimeApiVersion().isEmpty()) { + runtimeApiVersion_ = other.runtimeApiVersion_; + onChanged(); + } + if (!other.getRuntimeMainExecutablePath().isEmpty()) { + runtimeMainExecutablePath_ = other.runtimeMainExecutablePath_; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (handlersBuilder_ == null) { + if (!other.handlers_.isEmpty()) { + if (handlers_.isEmpty()) { + handlers_ = other.handlers_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureHandlersIsMutable(); + handlers_.addAll(other.handlers_); + } + onChanged(); + } + } else { + if (!other.handlers_.isEmpty()) { + if (handlersBuilder_.isEmpty()) { + handlersBuilder_.dispose(); + handlersBuilder_ = null; + handlers_ = other.handlers_; + bitField0_ = (bitField0_ & ~0x00000008); + handlersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHandlersFieldBuilder() + : null; + } else { + handlersBuilder_.addAllMessages(other.handlers_); + } + } + } + if (errorHandlersBuilder_ == null) { + if (!other.errorHandlers_.isEmpty()) { + if (errorHandlers_.isEmpty()) { + errorHandlers_ = other.errorHandlers_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureErrorHandlersIsMutable(); + errorHandlers_.addAll(other.errorHandlers_); + } + onChanged(); + } + } else { + if (!other.errorHandlers_.isEmpty()) { + if (errorHandlersBuilder_.isEmpty()) { + errorHandlersBuilder_.dispose(); + errorHandlersBuilder_ = null; + errorHandlers_ = other.errorHandlers_; + bitField0_ = (bitField0_ & ~0x00000010); + errorHandlersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorHandlersFieldBuilder() + : null; + } else { + errorHandlersBuilder_.addAllMessages(other.errorHandlers_); + } + } + } + if (librariesBuilder_ == null) { + if (!other.libraries_.isEmpty()) { + if (libraries_.isEmpty()) { + libraries_ = other.libraries_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureLibrariesIsMutable(); + libraries_.addAll(other.libraries_); + } + onChanged(); + } + } else { + if (!other.libraries_.isEmpty()) { + if (librariesBuilder_.isEmpty()) { + librariesBuilder_.dispose(); + librariesBuilder_ = null; + libraries_ = other.libraries_; + bitField0_ = (bitField0_ & ~0x00000020); + librariesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLibrariesFieldBuilder() + : null; + } else { + librariesBuilder_.addAllMessages(other.libraries_); + } + } + } + if (other.hasApiConfig()) { + mergeApiConfig(other.getApiConfig()); + } + internalGetMutableEnvVariables().mergeFrom(other.internalGetEnvVariables()); + internalGetMutableBuildEnvVariables().mergeFrom(other.internalGetBuildEnvVariables()); + if (other.hasDefaultExpiration()) { + mergeDefaultExpiration(other.getDefaultExpiration()); + } + if (other.hasHealthCheck()) { + mergeHealthCheck(other.getHealthCheck()); + } + if (other.hasReadinessCheck()) { + mergeReadinessCheck(other.getReadinessCheck()); + } + if (other.hasLivenessCheck()) { + mergeLivenessCheck(other.getLivenessCheck()); + } + if (!other.getNobuildFilesRegex().isEmpty()) { + nobuildFilesRegex_ = other.nobuildFilesRegex_; + onChanged(); + } + if (other.hasDeployment()) { + mergeDeployment(other.getDeployment()); + } + if (!other.getVersionUrl().isEmpty()) { + versionUrl_ = other.versionUrl_; + onChanged(); + } + if (other.hasEndpointsApiService()) { + mergeEndpointsApiService(other.getEndpointsApiService()); + } + if (other.hasEntrypoint()) { + mergeEntrypoint(other.getEntrypoint()); + } + if (other.hasVpcAccessConnector()) { + mergeVpcAccessConnector(other.getVpcAccessConnector()); + } + switch (other.getScalingCase()) { + case AUTOMATIC_SCALING: + { + mergeAutomaticScaling(other.getAutomaticScaling()); + break; + } + case BASIC_SCALING: + { + mergeBasicScaling(other.getBasicScaling()); + break; + } + case MANUAL_SCALING: + { + mergeManualScaling(other.getManualScaling()); + break; + } + case SCALING_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.appengine.v1.Version parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Version) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int scalingCase_ = 0; + private java.lang.Object scaling_; + + public ScalingCase getScalingCase() { + return ScalingCase.forNumber(scalingCase_); + } + + public Builder clearScaling() { + scalingCase_ = 0; + scaling_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Full path to the Version resource in the API.  Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Full path to the Version resource in the API.  Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Full path to the Version resource in the API.  Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the Version resource in the API.  Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Full path to the Version resource in the API.  Example:
+     * `apps/myapp/services/default/versions/v1`.
+     * @OutputOnly
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Relative name of the version within the service.  Example: `v1`.
+     * Version names can contain only lowercase letters, numbers, or hyphens.
+     * Reserved names: "default", "latest", and any name with the prefix "ah-".
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Relative name of the version within the service.  Example: `v1`.
+     * Version names can contain only lowercase letters, numbers, or hyphens.
+     * Reserved names: "default", "latest", and any name with the prefix "ah-".
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Relative name of the version within the service.  Example: `v1`.
+     * Version names can contain only lowercase letters, numbers, or hyphens.
+     * Reserved names: "default", "latest", and any name with the prefix "ah-".
+     * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the version within the service.  Example: `v1`.
+     * Version names can contain only lowercase letters, numbers, or hyphens.
+     * Reserved names: "default", "latest", and any name with the prefix "ah-".
+     * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Relative name of the version within the service.  Example: `v1`.
+     * Version names can contain only lowercase letters, numbers, or hyphens.
+     * Reserved names: "default", "latest", and any name with the prefix "ah-".
+     * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.AutomaticScaling, + com.google.appengine.v1.AutomaticScaling.Builder, + com.google.appengine.v1.AutomaticScalingOrBuilder> + automaticScalingBuilder_; + /** + * + * + *
+     * Automatic scaling is based on request rate, response latencies, and other
+     * application metrics. Instances are dynamically created and destroyed as
+     * needed in order to handle traffic.
+     * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + * + * @return Whether the automaticScaling field is set. + */ + @java.lang.Override + public boolean hasAutomaticScaling() { + return scalingCase_ == 3; + } + /** + * + * + *
+     * Automatic scaling is based on request rate, response latencies, and other
+     * application metrics. Instances are dynamically created and destroyed as
+     * needed in order to handle traffic.
+     * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + * + * @return The automaticScaling. + */ + @java.lang.Override + public com.google.appengine.v1.AutomaticScaling getAutomaticScaling() { + if (automaticScalingBuilder_ == null) { + if (scalingCase_ == 3) { + return (com.google.appengine.v1.AutomaticScaling) scaling_; + } + return com.google.appengine.v1.AutomaticScaling.getDefaultInstance(); + } else { + if (scalingCase_ == 3) { + return automaticScalingBuilder_.getMessage(); + } + return com.google.appengine.v1.AutomaticScaling.getDefaultInstance(); + } + } + /** + * + * + *
+     * Automatic scaling is based on request rate, response latencies, and other
+     * application metrics. Instances are dynamically created and destroyed as
+     * needed in order to handle traffic.
+     * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + */ + public Builder setAutomaticScaling(com.google.appengine.v1.AutomaticScaling value) { + if (automaticScalingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scaling_ = value; + onChanged(); + } else { + automaticScalingBuilder_.setMessage(value); + } + scalingCase_ = 3; + return this; + } + /** + * + * + *
+     * Automatic scaling is based on request rate, response latencies, and other
+     * application metrics. Instances are dynamically created and destroyed as
+     * needed in order to handle traffic.
+     * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + */ + public Builder setAutomaticScaling( + com.google.appengine.v1.AutomaticScaling.Builder builderForValue) { + if (automaticScalingBuilder_ == null) { + scaling_ = builderForValue.build(); + onChanged(); + } else { + automaticScalingBuilder_.setMessage(builderForValue.build()); + } + scalingCase_ = 3; + return this; + } + /** + * + * + *
+     * Automatic scaling is based on request rate, response latencies, and other
+     * application metrics. Instances are dynamically created and destroyed as
+     * needed in order to handle traffic.
+     * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + */ + public Builder mergeAutomaticScaling(com.google.appengine.v1.AutomaticScaling value) { + if (automaticScalingBuilder_ == null) { + if (scalingCase_ == 3 + && scaling_ != com.google.appengine.v1.AutomaticScaling.getDefaultInstance()) { + scaling_ = + com.google.appengine.v1.AutomaticScaling.newBuilder( + (com.google.appengine.v1.AutomaticScaling) scaling_) + .mergeFrom(value) + .buildPartial(); + } else { + scaling_ = value; + } + onChanged(); + } else { + if (scalingCase_ == 3) { + automaticScalingBuilder_.mergeFrom(value); + } + automaticScalingBuilder_.setMessage(value); + } + scalingCase_ = 3; + return this; + } + /** + * + * + *
+     * Automatic scaling is based on request rate, response latencies, and other
+     * application metrics. Instances are dynamically created and destroyed as
+     * needed in order to handle traffic.
+     * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + */ + public Builder clearAutomaticScaling() { + if (automaticScalingBuilder_ == null) { + if (scalingCase_ == 3) { + scalingCase_ = 0; + scaling_ = null; + onChanged(); + } + } else { + if (scalingCase_ == 3) { + scalingCase_ = 0; + scaling_ = null; + } + automaticScalingBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Automatic scaling is based on request rate, response latencies, and other
+     * application metrics. Instances are dynamically created and destroyed as
+     * needed in order to handle traffic.
+     * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + */ + public com.google.appengine.v1.AutomaticScaling.Builder getAutomaticScalingBuilder() { + return getAutomaticScalingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Automatic scaling is based on request rate, response latencies, and other
+     * application metrics. Instances are dynamically created and destroyed as
+     * needed in order to handle traffic.
+     * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + */ + @java.lang.Override + public com.google.appengine.v1.AutomaticScalingOrBuilder getAutomaticScalingOrBuilder() { + if ((scalingCase_ == 3) && (automaticScalingBuilder_ != null)) { + return automaticScalingBuilder_.getMessageOrBuilder(); + } else { + if (scalingCase_ == 3) { + return (com.google.appengine.v1.AutomaticScaling) scaling_; + } + return com.google.appengine.v1.AutomaticScaling.getDefaultInstance(); + } + } + /** + * + * + *
+     * Automatic scaling is based on request rate, response latencies, and other
+     * application metrics. Instances are dynamically created and destroyed as
+     * needed in order to handle traffic.
+     * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.AutomaticScaling, + com.google.appengine.v1.AutomaticScaling.Builder, + com.google.appengine.v1.AutomaticScalingOrBuilder> + getAutomaticScalingFieldBuilder() { + if (automaticScalingBuilder_ == null) { + if (!(scalingCase_ == 3)) { + scaling_ = com.google.appengine.v1.AutomaticScaling.getDefaultInstance(); + } + automaticScalingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.AutomaticScaling, + com.google.appengine.v1.AutomaticScaling.Builder, + com.google.appengine.v1.AutomaticScalingOrBuilder>( + (com.google.appengine.v1.AutomaticScaling) scaling_, + getParentForChildren(), + isClean()); + scaling_ = null; + } + scalingCase_ = 3; + onChanged(); + ; + return automaticScalingBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.BasicScaling, + com.google.appengine.v1.BasicScaling.Builder, + com.google.appengine.v1.BasicScalingOrBuilder> + basicScalingBuilder_; + /** + * + * + *
+     * A service with basic scaling will create an instance when the application
+     * receives a request. The instance will be turned down when the app becomes
+     * idle. Basic scaling is ideal for work that is intermittent or driven by
+     * user activity.
+     * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + * + * @return Whether the basicScaling field is set. + */ + @java.lang.Override + public boolean hasBasicScaling() { + return scalingCase_ == 4; + } + /** + * + * + *
+     * A service with basic scaling will create an instance when the application
+     * receives a request. The instance will be turned down when the app becomes
+     * idle. Basic scaling is ideal for work that is intermittent or driven by
+     * user activity.
+     * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + * + * @return The basicScaling. + */ + @java.lang.Override + public com.google.appengine.v1.BasicScaling getBasicScaling() { + if (basicScalingBuilder_ == null) { + if (scalingCase_ == 4) { + return (com.google.appengine.v1.BasicScaling) scaling_; + } + return com.google.appengine.v1.BasicScaling.getDefaultInstance(); + } else { + if (scalingCase_ == 4) { + return basicScalingBuilder_.getMessage(); + } + return com.google.appengine.v1.BasicScaling.getDefaultInstance(); + } + } + /** + * + * + *
+     * A service with basic scaling will create an instance when the application
+     * receives a request. The instance will be turned down when the app becomes
+     * idle. Basic scaling is ideal for work that is intermittent or driven by
+     * user activity.
+     * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + */ + public Builder setBasicScaling(com.google.appengine.v1.BasicScaling value) { + if (basicScalingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scaling_ = value; + onChanged(); + } else { + basicScalingBuilder_.setMessage(value); + } + scalingCase_ = 4; + return this; + } + /** + * + * + *
+     * A service with basic scaling will create an instance when the application
+     * receives a request. The instance will be turned down when the app becomes
+     * idle. Basic scaling is ideal for work that is intermittent or driven by
+     * user activity.
+     * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + */ + public Builder setBasicScaling(com.google.appengine.v1.BasicScaling.Builder builderForValue) { + if (basicScalingBuilder_ == null) { + scaling_ = builderForValue.build(); + onChanged(); + } else { + basicScalingBuilder_.setMessage(builderForValue.build()); + } + scalingCase_ = 4; + return this; + } + /** + * + * + *
+     * A service with basic scaling will create an instance when the application
+     * receives a request. The instance will be turned down when the app becomes
+     * idle. Basic scaling is ideal for work that is intermittent or driven by
+     * user activity.
+     * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + */ + public Builder mergeBasicScaling(com.google.appengine.v1.BasicScaling value) { + if (basicScalingBuilder_ == null) { + if (scalingCase_ == 4 + && scaling_ != com.google.appengine.v1.BasicScaling.getDefaultInstance()) { + scaling_ = + com.google.appengine.v1.BasicScaling.newBuilder( + (com.google.appengine.v1.BasicScaling) scaling_) + .mergeFrom(value) + .buildPartial(); + } else { + scaling_ = value; + } + onChanged(); + } else { + if (scalingCase_ == 4) { + basicScalingBuilder_.mergeFrom(value); + } + basicScalingBuilder_.setMessage(value); + } + scalingCase_ = 4; + return this; + } + /** + * + * + *
+     * A service with basic scaling will create an instance when the application
+     * receives a request. The instance will be turned down when the app becomes
+     * idle. Basic scaling is ideal for work that is intermittent or driven by
+     * user activity.
+     * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + */ + public Builder clearBasicScaling() { + if (basicScalingBuilder_ == null) { + if (scalingCase_ == 4) { + scalingCase_ = 0; + scaling_ = null; + onChanged(); + } + } else { + if (scalingCase_ == 4) { + scalingCase_ = 0; + scaling_ = null; + } + basicScalingBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A service with basic scaling will create an instance when the application
+     * receives a request. The instance will be turned down when the app becomes
+     * idle. Basic scaling is ideal for work that is intermittent or driven by
+     * user activity.
+     * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + */ + public com.google.appengine.v1.BasicScaling.Builder getBasicScalingBuilder() { + return getBasicScalingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A service with basic scaling will create an instance when the application
+     * receives a request. The instance will be turned down when the app becomes
+     * idle. Basic scaling is ideal for work that is intermittent or driven by
+     * user activity.
+     * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + */ + @java.lang.Override + public com.google.appengine.v1.BasicScalingOrBuilder getBasicScalingOrBuilder() { + if ((scalingCase_ == 4) && (basicScalingBuilder_ != null)) { + return basicScalingBuilder_.getMessageOrBuilder(); + } else { + if (scalingCase_ == 4) { + return (com.google.appengine.v1.BasicScaling) scaling_; + } + return com.google.appengine.v1.BasicScaling.getDefaultInstance(); + } + } + /** + * + * + *
+     * A service with basic scaling will create an instance when the application
+     * receives a request. The instance will be turned down when the app becomes
+     * idle. Basic scaling is ideal for work that is intermittent or driven by
+     * user activity.
+     * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.BasicScaling, + com.google.appengine.v1.BasicScaling.Builder, + com.google.appengine.v1.BasicScalingOrBuilder> + getBasicScalingFieldBuilder() { + if (basicScalingBuilder_ == null) { + if (!(scalingCase_ == 4)) { + scaling_ = com.google.appengine.v1.BasicScaling.getDefaultInstance(); + } + basicScalingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.BasicScaling, + com.google.appengine.v1.BasicScaling.Builder, + com.google.appengine.v1.BasicScalingOrBuilder>( + (com.google.appengine.v1.BasicScaling) scaling_, getParentForChildren(), isClean()); + scaling_ = null; + } + scalingCase_ = 4; + onChanged(); + ; + return basicScalingBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ManualScaling, + com.google.appengine.v1.ManualScaling.Builder, + com.google.appengine.v1.ManualScalingOrBuilder> + manualScalingBuilder_; + /** + * + * + *
+     * A service with manual scaling runs continuously, allowing you to perform
+     * complex initialization and rely on the state of its memory over time.
+     * Manually scaled versions are sometimes referred to as "backends".
+     * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + * + * @return Whether the manualScaling field is set. + */ + @java.lang.Override + public boolean hasManualScaling() { + return scalingCase_ == 5; + } + /** + * + * + *
+     * A service with manual scaling runs continuously, allowing you to perform
+     * complex initialization and rely on the state of its memory over time.
+     * Manually scaled versions are sometimes referred to as "backends".
+     * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + * + * @return The manualScaling. + */ + @java.lang.Override + public com.google.appengine.v1.ManualScaling getManualScaling() { + if (manualScalingBuilder_ == null) { + if (scalingCase_ == 5) { + return (com.google.appengine.v1.ManualScaling) scaling_; + } + return com.google.appengine.v1.ManualScaling.getDefaultInstance(); + } else { + if (scalingCase_ == 5) { + return manualScalingBuilder_.getMessage(); + } + return com.google.appengine.v1.ManualScaling.getDefaultInstance(); + } + } + /** + * + * + *
+     * A service with manual scaling runs continuously, allowing you to perform
+     * complex initialization and rely on the state of its memory over time.
+     * Manually scaled versions are sometimes referred to as "backends".
+     * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + */ + public Builder setManualScaling(com.google.appengine.v1.ManualScaling value) { + if (manualScalingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scaling_ = value; + onChanged(); + } else { + manualScalingBuilder_.setMessage(value); + } + scalingCase_ = 5; + return this; + } + /** + * + * + *
+     * A service with manual scaling runs continuously, allowing you to perform
+     * complex initialization and rely on the state of its memory over time.
+     * Manually scaled versions are sometimes referred to as "backends".
+     * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + */ + public Builder setManualScaling(com.google.appengine.v1.ManualScaling.Builder builderForValue) { + if (manualScalingBuilder_ == null) { + scaling_ = builderForValue.build(); + onChanged(); + } else { + manualScalingBuilder_.setMessage(builderForValue.build()); + } + scalingCase_ = 5; + return this; + } + /** + * + * + *
+     * A service with manual scaling runs continuously, allowing you to perform
+     * complex initialization and rely on the state of its memory over time.
+     * Manually scaled versions are sometimes referred to as "backends".
+     * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + */ + public Builder mergeManualScaling(com.google.appengine.v1.ManualScaling value) { + if (manualScalingBuilder_ == null) { + if (scalingCase_ == 5 + && scaling_ != com.google.appengine.v1.ManualScaling.getDefaultInstance()) { + scaling_ = + com.google.appengine.v1.ManualScaling.newBuilder( + (com.google.appengine.v1.ManualScaling) scaling_) + .mergeFrom(value) + .buildPartial(); + } else { + scaling_ = value; + } + onChanged(); + } else { + if (scalingCase_ == 5) { + manualScalingBuilder_.mergeFrom(value); + } + manualScalingBuilder_.setMessage(value); + } + scalingCase_ = 5; + return this; + } + /** + * + * + *
+     * A service with manual scaling runs continuously, allowing you to perform
+     * complex initialization and rely on the state of its memory over time.
+     * Manually scaled versions are sometimes referred to as "backends".
+     * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + */ + public Builder clearManualScaling() { + if (manualScalingBuilder_ == null) { + if (scalingCase_ == 5) { + scalingCase_ = 0; + scaling_ = null; + onChanged(); + } + } else { + if (scalingCase_ == 5) { + scalingCase_ = 0; + scaling_ = null; + } + manualScalingBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A service with manual scaling runs continuously, allowing you to perform
+     * complex initialization and rely on the state of its memory over time.
+     * Manually scaled versions are sometimes referred to as "backends".
+     * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + */ + public com.google.appengine.v1.ManualScaling.Builder getManualScalingBuilder() { + return getManualScalingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A service with manual scaling runs continuously, allowing you to perform
+     * complex initialization and rely on the state of its memory over time.
+     * Manually scaled versions are sometimes referred to as "backends".
+     * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + */ + @java.lang.Override + public com.google.appengine.v1.ManualScalingOrBuilder getManualScalingOrBuilder() { + if ((scalingCase_ == 5) && (manualScalingBuilder_ != null)) { + return manualScalingBuilder_.getMessageOrBuilder(); + } else { + if (scalingCase_ == 5) { + return (com.google.appengine.v1.ManualScaling) scaling_; + } + return com.google.appengine.v1.ManualScaling.getDefaultInstance(); + } + } + /** + * + * + *
+     * A service with manual scaling runs continuously, allowing you to perform
+     * complex initialization and rely on the state of its memory over time.
+     * Manually scaled versions are sometimes referred to as "backends".
+     * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ManualScaling, + com.google.appengine.v1.ManualScaling.Builder, + com.google.appengine.v1.ManualScalingOrBuilder> + getManualScalingFieldBuilder() { + if (manualScalingBuilder_ == null) { + if (!(scalingCase_ == 5)) { + scaling_ = com.google.appengine.v1.ManualScaling.getDefaultInstance(); + } + manualScalingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ManualScaling, + com.google.appengine.v1.ManualScaling.Builder, + com.google.appengine.v1.ManualScalingOrBuilder>( + (com.google.appengine.v1.ManualScaling) scaling_, + getParentForChildren(), + isClean()); + scaling_ = null; + } + scalingCase_ = 5; + onChanged(); + ; + return manualScalingBuilder_; + } + + private java.util.List inboundServices_ = java.util.Collections.emptyList(); + + private void ensureInboundServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + inboundServices_ = new java.util.ArrayList(inboundServices_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return A list containing the inboundServices. + */ + public java.util.List getInboundServicesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.appengine.v1.InboundServiceType>( + inboundServices_, inboundServices_converter_); + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return The count of inboundServices. + */ + public int getInboundServicesCount() { + return inboundServices_.size(); + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param index The index of the element to return. + * @return The inboundServices at the given index. + */ + public com.google.appengine.v1.InboundServiceType getInboundServices(int index) { + return inboundServices_converter_.convert(inboundServices_.get(index)); + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param index The index to set the value at. + * @param value The inboundServices to set. + * @return This builder for chaining. + */ + public Builder setInboundServices(int index, com.google.appengine.v1.InboundServiceType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInboundServicesIsMutable(); + inboundServices_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param value The inboundServices to add. + * @return This builder for chaining. + */ + public Builder addInboundServices(com.google.appengine.v1.InboundServiceType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInboundServicesIsMutable(); + inboundServices_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param values The inboundServices to add. + * @return This builder for chaining. + */ + public Builder addAllInboundServices( + java.lang.Iterable values) { + ensureInboundServicesIsMutable(); + for (com.google.appengine.v1.InboundServiceType value : values) { + inboundServices_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return This builder for chaining. + */ + public Builder clearInboundServices() { + inboundServices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return A list containing the enum numeric values on the wire for inboundServices. + */ + public java.util.List getInboundServicesValueList() { + return java.util.Collections.unmodifiableList(inboundServices_); + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of inboundServices at the given index. + */ + public int getInboundServicesValue(int index) { + return inboundServices_.get(index); + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of inboundServices at the given index. + * @return This builder for chaining. + */ + public Builder setInboundServicesValue(int index, int value) { + ensureInboundServicesIsMutable(); + inboundServices_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param value The enum numeric value on the wire for inboundServices to add. + * @return This builder for chaining. + */ + public Builder addInboundServicesValue(int value) { + ensureInboundServicesIsMutable(); + inboundServices_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Before an application can receive email or XMPP messages, the application
+     * must be configured to enable the service.
+     * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param values The enum numeric values on the wire for inboundServices to add. + * @return This builder for chaining. + */ + public Builder addAllInboundServicesValue(java.lang.Iterable values) { + ensureInboundServicesIsMutable(); + for (int value : values) { + inboundServices_.add(value); + } + onChanged(); + return this; + } + + private java.lang.Object instanceClass_ = ""; + /** + * + * + *
+     * Instance class that is used to run this version. Valid values are:
+     * * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+     * * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+     * Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+     * BasicScaling.
+     * 
+ * + * string instance_class = 7; + * + * @return The instanceClass. + */ + public java.lang.String getInstanceClass() { + java.lang.Object ref = instanceClass_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceClass_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Instance class that is used to run this version. Valid values are:
+     * * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+     * * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+     * Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+     * BasicScaling.
+     * 
+ * + * string instance_class = 7; + * + * @return The bytes for instanceClass. + */ + public com.google.protobuf.ByteString getInstanceClassBytes() { + java.lang.Object ref = instanceClass_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceClass_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Instance class that is used to run this version. Valid values are:
+     * * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+     * * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+     * Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+     * BasicScaling.
+     * 
+ * + * string instance_class = 7; + * + * @param value The instanceClass to set. + * @return This builder for chaining. + */ + public Builder setInstanceClass(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceClass_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance class that is used to run this version. Valid values are:
+     * * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+     * * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+     * Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+     * BasicScaling.
+     * 
+ * + * string instance_class = 7; + * + * @return This builder for chaining. + */ + public Builder clearInstanceClass() { + + instanceClass_ = getDefaultInstance().getInstanceClass(); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance class that is used to run this version. Valid values are:
+     * * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+     * * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+     * Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+     * BasicScaling.
+     * 
+ * + * string instance_class = 7; + * + * @param value The bytes for instanceClass to set. + * @return This builder for chaining. + */ + public Builder setInstanceClassBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceClass_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.Network network_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Network, + com.google.appengine.v1.Network.Builder, + com.google.appengine.v1.NetworkOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Extra network settings.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Network network = 8; + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return networkBuilder_ != null || network_ != null; + } + /** + * + * + *
+     * Extra network settings.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Network network = 8; + * + * @return The network. + */ + public com.google.appengine.v1.Network getNetwork() { + if (networkBuilder_ == null) { + return network_ == null ? com.google.appengine.v1.Network.getDefaultInstance() : network_; + } else { + return networkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Extra network settings.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Network network = 8; + */ + public Builder setNetwork(com.google.appengine.v1.Network value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + onChanged(); + } else { + networkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Extra network settings.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Network network = 8; + */ + public Builder setNetwork(com.google.appengine.v1.Network.Builder builderForValue) { + if (networkBuilder_ == null) { + network_ = builderForValue.build(); + onChanged(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Extra network settings.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Network network = 8; + */ + public Builder mergeNetwork(com.google.appengine.v1.Network value) { + if (networkBuilder_ == null) { + if (network_ != null) { + network_ = + com.google.appengine.v1.Network.newBuilder(network_).mergeFrom(value).buildPartial(); + } else { + network_ = value; + } + onChanged(); + } else { + networkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Extra network settings.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Network network = 8; + */ + public Builder clearNetwork() { + if (networkBuilder_ == null) { + network_ = null; + onChanged(); + } else { + network_ = null; + networkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Extra network settings.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Network network = 8; + */ + public com.google.appengine.v1.Network.Builder getNetworkBuilder() { + + onChanged(); + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Extra network settings.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Network network = 8; + */ + public com.google.appengine.v1.NetworkOrBuilder getNetworkOrBuilder() { + if (networkBuilder_ != null) { + return networkBuilder_.getMessageOrBuilder(); + } else { + return network_ == null ? com.google.appengine.v1.Network.getDefaultInstance() : network_; + } + } + /** + * + * + *
+     * Extra network settings.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Network network = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Network, + com.google.appengine.v1.Network.Builder, + com.google.appengine.v1.NetworkOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Network, + com.google.appengine.v1.Network.Builder, + com.google.appengine.v1.NetworkOrBuilder>( + getNetwork(), getParentForChildren(), isClean()); + network_ = null; + } + return networkBuilder_; + } + + private com.google.protobuf.LazyStringList zones_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureZonesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + zones_ = new com.google.protobuf.LazyStringArrayList(zones_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The Google Compute Engine zones that are supported by this version in the
+     * App Engine flexible environment. Deprecated.
+     * 
+ * + * repeated string zones = 118; + * + * @return A list containing the zones. + */ + public com.google.protobuf.ProtocolStringList getZonesList() { + return zones_.getUnmodifiableView(); + } + /** + * + * + *
+     * The Google Compute Engine zones that are supported by this version in the
+     * App Engine flexible environment. Deprecated.
+     * 
+ * + * repeated string zones = 118; + * + * @return The count of zones. + */ + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+     * The Google Compute Engine zones that are supported by this version in the
+     * App Engine flexible environment. Deprecated.
+     * 
+ * + * repeated string zones = 118; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + public java.lang.String getZones(int index) { + return zones_.get(index); + } + /** + * + * + *
+     * The Google Compute Engine zones that are supported by this version in the
+     * App Engine flexible environment. Deprecated.
+     * 
+ * + * repeated string zones = 118; + * + * @param index The index of the value to return. + * @return The bytes of the zones at the given index. + */ + public com.google.protobuf.ByteString getZonesBytes(int index) { + return zones_.getByteString(index); + } + /** + * + * + *
+     * The Google Compute Engine zones that are supported by this version in the
+     * App Engine flexible environment. Deprecated.
+     * 
+ * + * repeated string zones = 118; + * + * @param index The index to set the value at. + * @param value The zones to set. + * @return This builder for chaining. + */ + public Builder setZones(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Compute Engine zones that are supported by this version in the
+     * App Engine flexible environment. Deprecated.
+     * 
+ * + * repeated string zones = 118; + * + * @param value The zones to add. + * @return This builder for chaining. + */ + public Builder addZones(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Compute Engine zones that are supported by this version in the
+     * App Engine flexible environment. Deprecated.
+     * 
+ * + * repeated string zones = 118; + * + * @param values The zones to add. + * @return This builder for chaining. + */ + public Builder addAllZones(java.lang.Iterable values) { + ensureZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, zones_); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Compute Engine zones that are supported by this version in the
+     * App Engine flexible environment. Deprecated.
+     * 
+ * + * repeated string zones = 118; + * + * @return This builder for chaining. + */ + public Builder clearZones() { + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Compute Engine zones that are supported by this version in the
+     * App Engine flexible environment. Deprecated.
+     * 
+ * + * repeated string zones = 118; + * + * @param value The bytes of the zones to add. + * @return This builder for chaining. + */ + public Builder addZonesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureZonesIsMutable(); + zones_.add(value); + onChanged(); + return this; + } + + private com.google.appengine.v1.Resources resources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Resources, + com.google.appengine.v1.Resources.Builder, + com.google.appengine.v1.ResourcesOrBuilder> + resourcesBuilder_; + /** + * + * + *
+     * Machine resources for this version.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Resources resources = 9; + * + * @return Whether the resources field is set. + */ + public boolean hasResources() { + return resourcesBuilder_ != null || resources_ != null; + } + /** + * + * + *
+     * Machine resources for this version.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Resources resources = 9; + * + * @return The resources. + */ + public com.google.appengine.v1.Resources getResources() { + if (resourcesBuilder_ == null) { + return resources_ == null + ? com.google.appengine.v1.Resources.getDefaultInstance() + : resources_; + } else { + return resourcesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Machine resources for this version.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Resources resources = 9; + */ + public Builder setResources(com.google.appengine.v1.Resources value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resources_ = value; + onChanged(); + } else { + resourcesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Machine resources for this version.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Resources resources = 9; + */ + public Builder setResources(com.google.appengine.v1.Resources.Builder builderForValue) { + if (resourcesBuilder_ == null) { + resources_ = builderForValue.build(); + onChanged(); + } else { + resourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Machine resources for this version.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Resources resources = 9; + */ + public Builder mergeResources(com.google.appengine.v1.Resources value) { + if (resourcesBuilder_ == null) { + if (resources_ != null) { + resources_ = + com.google.appengine.v1.Resources.newBuilder(resources_) + .mergeFrom(value) + .buildPartial(); + } else { + resources_ = value; + } + onChanged(); + } else { + resourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Machine resources for this version.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Resources resources = 9; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = null; + onChanged(); + } else { + resources_ = null; + resourcesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Machine resources for this version.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Resources resources = 9; + */ + public com.google.appengine.v1.Resources.Builder getResourcesBuilder() { + + onChanged(); + return getResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Machine resources for this version.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Resources resources = 9; + */ + public com.google.appengine.v1.ResourcesOrBuilder getResourcesOrBuilder() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilder(); + } else { + return resources_ == null + ? com.google.appengine.v1.Resources.getDefaultInstance() + : resources_; + } + } + /** + * + * + *
+     * Machine resources for this version.
+     * Only applicable in the App Engine flexible environment.
+     * 
+ * + * .google.appengine.v1.Resources resources = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Resources, + com.google.appengine.v1.Resources.Builder, + com.google.appengine.v1.ResourcesOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Resources, + com.google.appengine.v1.Resources.Builder, + com.google.appengine.v1.ResourcesOrBuilder>( + getResources(), getParentForChildren(), isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + private java.lang.Object runtime_ = ""; + /** + * + * + *
+     * Desired runtime. Example: `python27`.
+     * 
+ * + * string runtime = 10; + * + * @return The runtime. + */ + public java.lang.String getRuntime() { + java.lang.Object ref = runtime_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtime_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Desired runtime. Example: `python27`.
+     * 
+ * + * string runtime = 10; + * + * @return The bytes for runtime. + */ + public com.google.protobuf.ByteString getRuntimeBytes() { + java.lang.Object ref = runtime_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtime_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Desired runtime. Example: `python27`.
+     * 
+ * + * string runtime = 10; + * + * @param value The runtime to set. + * @return This builder for chaining. + */ + public Builder setRuntime(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + runtime_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Desired runtime. Example: `python27`.
+     * 
+ * + * string runtime = 10; + * + * @return This builder for chaining. + */ + public Builder clearRuntime() { + + runtime_ = getDefaultInstance().getRuntime(); + onChanged(); + return this; + } + /** + * + * + *
+     * Desired runtime. Example: `python27`.
+     * 
+ * + * string runtime = 10; + * + * @param value The bytes for runtime to set. + * @return This builder for chaining. + */ + public Builder setRuntimeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + runtime_ = value; + onChanged(); + return this; + } + + private java.lang.Object runtimeChannel_ = ""; + /** + * + * + *
+     * The channel of the runtime to use. Only available for some
+     * runtimes. Defaults to the `default` channel.
+     * 
+ * + * string runtime_channel = 117; + * + * @return The runtimeChannel. + */ + public java.lang.String getRuntimeChannel() { + java.lang.Object ref = runtimeChannel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeChannel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The channel of the runtime to use. Only available for some
+     * runtimes. Defaults to the `default` channel.
+     * 
+ * + * string runtime_channel = 117; + * + * @return The bytes for runtimeChannel. + */ + public com.google.protobuf.ByteString getRuntimeChannelBytes() { + java.lang.Object ref = runtimeChannel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeChannel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The channel of the runtime to use. Only available for some
+     * runtimes. Defaults to the `default` channel.
+     * 
+ * + * string runtime_channel = 117; + * + * @param value The runtimeChannel to set. + * @return This builder for chaining. + */ + public Builder setRuntimeChannel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + runtimeChannel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The channel of the runtime to use. Only available for some
+     * runtimes. Defaults to the `default` channel.
+     * 
+ * + * string runtime_channel = 117; + * + * @return This builder for chaining. + */ + public Builder clearRuntimeChannel() { + + runtimeChannel_ = getDefaultInstance().getRuntimeChannel(); + onChanged(); + return this; + } + /** + * + * + *
+     * The channel of the runtime to use. Only available for some
+     * runtimes. Defaults to the `default` channel.
+     * 
+ * + * string runtime_channel = 117; + * + * @param value The bytes for runtimeChannel to set. + * @return This builder for chaining. + */ + public Builder setRuntimeChannelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + runtimeChannel_ = value; + onChanged(); + return this; + } + + private boolean threadsafe_; + /** + * + * + *
+     * Whether multiple requests can be dispatched to this version at once.
+     * 
+ * + * bool threadsafe = 11; + * + * @return The threadsafe. + */ + @java.lang.Override + public boolean getThreadsafe() { + return threadsafe_; + } + /** + * + * + *
+     * Whether multiple requests can be dispatched to this version at once.
+     * 
+ * + * bool threadsafe = 11; + * + * @param value The threadsafe to set. + * @return This builder for chaining. + */ + public Builder setThreadsafe(boolean value) { + + threadsafe_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether multiple requests can be dispatched to this version at once.
+     * 
+ * + * bool threadsafe = 11; + * + * @return This builder for chaining. + */ + public Builder clearThreadsafe() { + + threadsafe_ = false; + onChanged(); + return this; + } + + private boolean vm_; + /** + * + * + *
+     * Whether to deploy this version in a container on a virtual machine.
+     * 
+ * + * bool vm = 12; + * + * @return The vm. + */ + @java.lang.Override + public boolean getVm() { + return vm_; + } + /** + * + * + *
+     * Whether to deploy this version in a container on a virtual machine.
+     * 
+ * + * bool vm = 12; + * + * @param value The vm to set. + * @return This builder for chaining. + */ + public Builder setVm(boolean value) { + + vm_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to deploy this version in a container on a virtual machine.
+     * 
+ * + * bool vm = 12; + * + * @return This builder for chaining. + */ + public Builder clearVm() { + + vm_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField betaSettings_; + + private com.google.protobuf.MapField + internalGetBetaSettings() { + if (betaSettings_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BetaSettingsDefaultEntryHolder.defaultEntry); + } + return betaSettings_; + } + + private com.google.protobuf.MapField + internalGetMutableBetaSettings() { + onChanged(); + ; + if (betaSettings_ == null) { + betaSettings_ = + com.google.protobuf.MapField.newMapField(BetaSettingsDefaultEntryHolder.defaultEntry); + } + if (!betaSettings_.isMutable()) { + betaSettings_ = betaSettings_.copy(); + } + return betaSettings_; + } + + public int getBetaSettingsCount() { + return internalGetBetaSettings().getMap().size(); + } + /** + * + * + *
+     * Metadata settings that are supplied to this version to enable
+     * beta runtime features.
+     * 
+ * + * map<string, string> beta_settings = 13; + */ + @java.lang.Override + public boolean containsBetaSettings(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetBetaSettings().getMap().containsKey(key); + } + /** Use {@link #getBetaSettingsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBetaSettings() { + return getBetaSettingsMap(); + } + /** + * + * + *
+     * Metadata settings that are supplied to this version to enable
+     * beta runtime features.
+     * 
+ * + * map<string, string> beta_settings = 13; + */ + @java.lang.Override + public java.util.Map getBetaSettingsMap() { + return internalGetBetaSettings().getMap(); + } + /** + * + * + *
+     * Metadata settings that are supplied to this version to enable
+     * beta runtime features.
+     * 
+ * + * map<string, string> beta_settings = 13; + */ + @java.lang.Override + public java.lang.String getBetaSettingsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetBetaSettings().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Metadata settings that are supplied to this version to enable
+     * beta runtime features.
+     * 
+ * + * map<string, string> beta_settings = 13; + */ + @java.lang.Override + public java.lang.String getBetaSettingsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetBetaSettings().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearBetaSettings() { + internalGetMutableBetaSettings().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Metadata settings that are supplied to this version to enable
+     * beta runtime features.
+     * 
+ * + * map<string, string> beta_settings = 13; + */ + public Builder removeBetaSettings(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableBetaSettings().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableBetaSettings() { + return internalGetMutableBetaSettings().getMutableMap(); + } + /** + * + * + *
+     * Metadata settings that are supplied to this version to enable
+     * beta runtime features.
+     * 
+ * + * map<string, string> beta_settings = 13; + */ + public Builder putBetaSettings(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableBetaSettings().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Metadata settings that are supplied to this version to enable
+     * beta runtime features.
+     * 
+ * + * map<string, string> beta_settings = 13; + */ + public Builder putAllBetaSettings(java.util.Map values) { + internalGetMutableBetaSettings().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object env_ = ""; + /** + * + * + *
+     * App Engine execution environment for this version.
+     * Defaults to `standard`.
+     * 
+ * + * string env = 14; + * + * @return The env. + */ + public java.lang.String getEnv() { + java.lang.Object ref = env_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + env_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * App Engine execution environment for this version.
+     * Defaults to `standard`.
+     * 
+ * + * string env = 14; + * + * @return The bytes for env. + */ + public com.google.protobuf.ByteString getEnvBytes() { + java.lang.Object ref = env_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + env_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * App Engine execution environment for this version.
+     * Defaults to `standard`.
+     * 
+ * + * string env = 14; + * + * @param value The env to set. + * @return This builder for chaining. + */ + public Builder setEnv(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + env_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * App Engine execution environment for this version.
+     * Defaults to `standard`.
+     * 
+ * + * string env = 14; + * + * @return This builder for chaining. + */ + public Builder clearEnv() { + + env_ = getDefaultInstance().getEnv(); + onChanged(); + return this; + } + /** + * + * + *
+     * App Engine execution environment for this version.
+     * Defaults to `standard`.
+     * 
+ * + * string env = 14; + * + * @param value The bytes for env to set. + * @return This builder for chaining. + */ + public Builder setEnvBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + env_ = value; + onChanged(); + return this; + } + + private int servingStatus_ = 0; + /** + * + * + *
+     * Current serving status of this version. Only the versions with a
+     * `SERVING` status create instances and can be billed.
+     * `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+     * 
+ * + * .google.appengine.v1.ServingStatus serving_status = 15; + * + * @return The enum numeric value on the wire for servingStatus. + */ + @java.lang.Override + public int getServingStatusValue() { + return servingStatus_; + } + /** + * + * + *
+     * Current serving status of this version. Only the versions with a
+     * `SERVING` status create instances and can be billed.
+     * `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+     * 
+ * + * .google.appengine.v1.ServingStatus serving_status = 15; + * + * @param value The enum numeric value on the wire for servingStatus to set. + * @return This builder for chaining. + */ + public Builder setServingStatusValue(int value) { + + servingStatus_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Current serving status of this version. Only the versions with a
+     * `SERVING` status create instances and can be billed.
+     * `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+     * 
+ * + * .google.appengine.v1.ServingStatus serving_status = 15; + * + * @return The servingStatus. + */ + @java.lang.Override + public com.google.appengine.v1.ServingStatus getServingStatus() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.ServingStatus result = + com.google.appengine.v1.ServingStatus.valueOf(servingStatus_); + return result == null ? com.google.appengine.v1.ServingStatus.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Current serving status of this version. Only the versions with a
+     * `SERVING` status create instances and can be billed.
+     * `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+     * 
+ * + * .google.appengine.v1.ServingStatus serving_status = 15; + * + * @param value The servingStatus to set. + * @return This builder for chaining. + */ + public Builder setServingStatus(com.google.appengine.v1.ServingStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + servingStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Current serving status of this version. Only the versions with a
+     * `SERVING` status create instances and can be billed.
+     * `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+     * 
+ * + * .google.appengine.v1.ServingStatus serving_status = 15; + * + * @return This builder for chaining. + */ + public Builder clearServingStatus() { + + servingStatus_ = 0; + onChanged(); + return this; + } + + private java.lang.Object createdBy_ = ""; + /** + * + * + *
+     * Email address of the user who created this version.
+     * @OutputOnly
+     * 
+ * + * string created_by = 16; + * + * @return The createdBy. + */ + public java.lang.String getCreatedBy() { + java.lang.Object ref = createdBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + createdBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Email address of the user who created this version.
+     * @OutputOnly
+     * 
+ * + * string created_by = 16; + * + * @return The bytes for createdBy. + */ + public com.google.protobuf.ByteString getCreatedByBytes() { + java.lang.Object ref = createdBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + createdBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Email address of the user who created this version.
+     * @OutputOnly
+     * 
+ * + * string created_by = 16; + * + * @param value The createdBy to set. + * @return This builder for chaining. + */ + public Builder setCreatedBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + createdBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Email address of the user who created this version.
+     * @OutputOnly
+     * 
+ * + * string created_by = 16; + * + * @return This builder for chaining. + */ + public Builder clearCreatedBy() { + + createdBy_ = getDefaultInstance().getCreatedBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Email address of the user who created this version.
+     * @OutputOnly
+     * 
+ * + * string created_by = 16; + * + * @param value The bytes for createdBy to set. + * @return This builder for chaining. + */ + public Builder setCreatedByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + createdBy_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Time that this version was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp create_time = 17; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Time that this version was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp create_time = 17; + * + * @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(); + } + } + /** + * + * + *
+     * Time that this version was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp create_time = 17; + */ + 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; + } + /** + * + * + *
+     * Time that this version was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp create_time = 17; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time that this version was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp create_time = 17; + */ + 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; + } + /** + * + * + *
+     * Time that this version was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp create_time = 17; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time that this version was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp create_time = 17; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time that this version was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp create_time = 17; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Time that this version was created.
+     * @OutputOnly
+     * 
+ * + * .google.protobuf.Timestamp create_time = 17; + */ + 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 long diskUsageBytes_; + /** + * + * + *
+     * Total size in bytes of all the files that are included in this version
+     * and currently hosted on the App Engine disk.
+     * @OutputOnly
+     * 
+ * + * int64 disk_usage_bytes = 18; + * + * @return The diskUsageBytes. + */ + @java.lang.Override + public long getDiskUsageBytes() { + return diskUsageBytes_; + } + /** + * + * + *
+     * Total size in bytes of all the files that are included in this version
+     * and currently hosted on the App Engine disk.
+     * @OutputOnly
+     * 
+ * + * int64 disk_usage_bytes = 18; + * + * @param value The diskUsageBytes to set. + * @return This builder for chaining. + */ + public Builder setDiskUsageBytes(long value) { + + diskUsageBytes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Total size in bytes of all the files that are included in this version
+     * and currently hosted on the App Engine disk.
+     * @OutputOnly
+     * 
+ * + * int64 disk_usage_bytes = 18; + * + * @return This builder for chaining. + */ + public Builder clearDiskUsageBytes() { + + diskUsageBytes_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object runtimeApiVersion_ = ""; + /** + * + * + *
+     * The version of the API in the given runtime environment. Please see the
+     * app.yaml reference for valid values at
+     * https://cloud.google.com/appengine/docs/standard/<language>/config/appref
+     * 
+ * + * string runtime_api_version = 21; + * + * @return The runtimeApiVersion. + */ + public java.lang.String getRuntimeApiVersion() { + java.lang.Object ref = runtimeApiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeApiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The version of the API in the given runtime environment. Please see the
+     * app.yaml reference for valid values at
+     * https://cloud.google.com/appengine/docs/standard/<language>/config/appref
+     * 
+ * + * string runtime_api_version = 21; + * + * @return The bytes for runtimeApiVersion. + */ + public com.google.protobuf.ByteString getRuntimeApiVersionBytes() { + java.lang.Object ref = runtimeApiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeApiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The version of the API in the given runtime environment. Please see the
+     * app.yaml reference for valid values at
+     * https://cloud.google.com/appengine/docs/standard/<language>/config/appref
+     * 
+ * + * string runtime_api_version = 21; + * + * @param value The runtimeApiVersion to set. + * @return This builder for chaining. + */ + public Builder setRuntimeApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + runtimeApiVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the API in the given runtime environment. Please see the
+     * app.yaml reference for valid values at
+     * https://cloud.google.com/appengine/docs/standard/<language>/config/appref
+     * 
+ * + * string runtime_api_version = 21; + * + * @return This builder for chaining. + */ + public Builder clearRuntimeApiVersion() { + + runtimeApiVersion_ = getDefaultInstance().getRuntimeApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the API in the given runtime environment. Please see the
+     * app.yaml reference for valid values at
+     * https://cloud.google.com/appengine/docs/standard/<language>/config/appref
+     * 
+ * + * string runtime_api_version = 21; + * + * @param value The bytes for runtimeApiVersion to set. + * @return This builder for chaining. + */ + public Builder setRuntimeApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + runtimeApiVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object runtimeMainExecutablePath_ = ""; + /** + * + * + *
+     * The path or name of the app's main executable.
+     * 
+ * + * string runtime_main_executable_path = 22; + * + * @return The runtimeMainExecutablePath. + */ + public java.lang.String getRuntimeMainExecutablePath() { + java.lang.Object ref = runtimeMainExecutablePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeMainExecutablePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The path or name of the app's main executable.
+     * 
+ * + * string runtime_main_executable_path = 22; + * + * @return The bytes for runtimeMainExecutablePath. + */ + public com.google.protobuf.ByteString getRuntimeMainExecutablePathBytes() { + java.lang.Object ref = runtimeMainExecutablePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeMainExecutablePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The path or name of the app's main executable.
+     * 
+ * + * string runtime_main_executable_path = 22; + * + * @param value The runtimeMainExecutablePath to set. + * @return This builder for chaining. + */ + public Builder setRuntimeMainExecutablePath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + runtimeMainExecutablePath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The path or name of the app's main executable.
+     * 
+ * + * string runtime_main_executable_path = 22; + * + * @return This builder for chaining. + */ + public Builder clearRuntimeMainExecutablePath() { + + runtimeMainExecutablePath_ = getDefaultInstance().getRuntimeMainExecutablePath(); + onChanged(); + return this; + } + /** + * + * + *
+     * The path or name of the app's main executable.
+     * 
+ * + * string runtime_main_executable_path = 22; + * + * @param value The bytes for runtimeMainExecutablePath to set. + * @return This builder for chaining. + */ + public Builder setRuntimeMainExecutablePathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + runtimeMainExecutablePath_ = value; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * The identity that the deployed version will run as.
+     * Admin API will use the App Engine Appspot service account as default if
+     * this field is neither provided in app.yaml file nor through CLI flag.
+     * 
+ * + * string service_account = 127; + * + * @return The serviceAccount. + */ + 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; + } + } + /** + * + * + *
+     * The identity that the deployed version will run as.
+     * Admin API will use the App Engine Appspot service account as default if
+     * this field is neither provided in app.yaml file nor through CLI flag.
+     * 
+ * + * string service_account = 127; + * + * @return The bytes for serviceAccount. + */ + 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; + } + } + /** + * + * + *
+     * The identity that the deployed version will run as.
+     * Admin API will use the App Engine Appspot service account as default if
+     * this field is neither provided in app.yaml file nor through CLI flag.
+     * 
+ * + * string service_account = 127; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The identity that the deployed version will run as.
+     * Admin API will use the App Engine Appspot service account as default if
+     * this field is neither provided in app.yaml file nor through CLI flag.
+     * 
+ * + * string service_account = 127; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * The identity that the deployed version will run as.
+     * Admin API will use the App Engine Appspot service account as default if
+     * this field is neither provided in app.yaml file nor through CLI flag.
+     * 
+ * + * string service_account = 127; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + onChanged(); + return this; + } + + private java.util.List handlers_ = + java.util.Collections.emptyList(); + + private void ensureHandlersIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + handlers_ = new java.util.ArrayList(handlers_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.UrlMap, + com.google.appengine.v1.UrlMap.Builder, + com.google.appengine.v1.UrlMapOrBuilder> + handlersBuilder_; + + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public java.util.List getHandlersList() { + if (handlersBuilder_ == null) { + return java.util.Collections.unmodifiableList(handlers_); + } else { + return handlersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public int getHandlersCount() { + if (handlersBuilder_ == null) { + return handlers_.size(); + } else { + return handlersBuilder_.getCount(); + } + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public com.google.appengine.v1.UrlMap getHandlers(int index) { + if (handlersBuilder_ == null) { + return handlers_.get(index); + } else { + return handlersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public Builder setHandlers(int index, com.google.appengine.v1.UrlMap value) { + if (handlersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandlersIsMutable(); + handlers_.set(index, value); + onChanged(); + } else { + handlersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public Builder setHandlers(int index, com.google.appengine.v1.UrlMap.Builder builderForValue) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + handlers_.set(index, builderForValue.build()); + onChanged(); + } else { + handlersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public Builder addHandlers(com.google.appengine.v1.UrlMap value) { + if (handlersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandlersIsMutable(); + handlers_.add(value); + onChanged(); + } else { + handlersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public Builder addHandlers(int index, com.google.appengine.v1.UrlMap value) { + if (handlersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandlersIsMutable(); + handlers_.add(index, value); + onChanged(); + } else { + handlersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public Builder addHandlers(com.google.appengine.v1.UrlMap.Builder builderForValue) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + handlers_.add(builderForValue.build()); + onChanged(); + } else { + handlersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public Builder addHandlers(int index, com.google.appengine.v1.UrlMap.Builder builderForValue) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + handlers_.add(index, builderForValue.build()); + onChanged(); + } else { + handlersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public Builder addAllHandlers( + java.lang.Iterable values) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, handlers_); + onChanged(); + } else { + handlersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public Builder clearHandlers() { + if (handlersBuilder_ == null) { + handlers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + handlersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public Builder removeHandlers(int index) { + if (handlersBuilder_ == null) { + ensureHandlersIsMutable(); + handlers_.remove(index); + onChanged(); + } else { + handlersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public com.google.appengine.v1.UrlMap.Builder getHandlersBuilder(int index) { + return getHandlersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public com.google.appengine.v1.UrlMapOrBuilder getHandlersOrBuilder(int index) { + if (handlersBuilder_ == null) { + return handlers_.get(index); + } else { + return handlersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public java.util.List + getHandlersOrBuilderList() { + if (handlersBuilder_ != null) { + return handlersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(handlers_); + } + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public com.google.appengine.v1.UrlMap.Builder addHandlersBuilder() { + return getHandlersFieldBuilder() + .addBuilder(com.google.appengine.v1.UrlMap.getDefaultInstance()); + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public com.google.appengine.v1.UrlMap.Builder addHandlersBuilder(int index) { + return getHandlersFieldBuilder() + .addBuilder(index, com.google.appengine.v1.UrlMap.getDefaultInstance()); + } + /** + * + * + *
+     * An ordered list of URL-matching patterns that should be applied to incoming
+     * requests. The first matching URL handles the request and other request
+     * handlers are not attempted.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + public java.util.List getHandlersBuilderList() { + return getHandlersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.UrlMap, + com.google.appengine.v1.UrlMap.Builder, + com.google.appengine.v1.UrlMapOrBuilder> + getHandlersFieldBuilder() { + if (handlersBuilder_ == null) { + handlersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.UrlMap, + com.google.appengine.v1.UrlMap.Builder, + com.google.appengine.v1.UrlMapOrBuilder>( + handlers_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + handlers_ = null; + } + return handlersBuilder_; + } + + private java.util.List errorHandlers_ = + java.util.Collections.emptyList(); + + private void ensureErrorHandlersIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + errorHandlers_ = + new java.util.ArrayList(errorHandlers_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.ErrorHandler, + com.google.appengine.v1.ErrorHandler.Builder, + com.google.appengine.v1.ErrorHandlerOrBuilder> + errorHandlersBuilder_; + + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public java.util.List getErrorHandlersList() { + if (errorHandlersBuilder_ == null) { + return java.util.Collections.unmodifiableList(errorHandlers_); + } else { + return errorHandlersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public int getErrorHandlersCount() { + if (errorHandlersBuilder_ == null) { + return errorHandlers_.size(); + } else { + return errorHandlersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public com.google.appengine.v1.ErrorHandler getErrorHandlers(int index) { + if (errorHandlersBuilder_ == null) { + return errorHandlers_.get(index); + } else { + return errorHandlersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public Builder setErrorHandlers(int index, com.google.appengine.v1.ErrorHandler value) { + if (errorHandlersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorHandlersIsMutable(); + errorHandlers_.set(index, value); + onChanged(); + } else { + errorHandlersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public Builder setErrorHandlers( + int index, com.google.appengine.v1.ErrorHandler.Builder builderForValue) { + if (errorHandlersBuilder_ == null) { + ensureErrorHandlersIsMutable(); + errorHandlers_.set(index, builderForValue.build()); + onChanged(); + } else { + errorHandlersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public Builder addErrorHandlers(com.google.appengine.v1.ErrorHandler value) { + if (errorHandlersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorHandlersIsMutable(); + errorHandlers_.add(value); + onChanged(); + } else { + errorHandlersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public Builder addErrorHandlers(int index, com.google.appengine.v1.ErrorHandler value) { + if (errorHandlersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorHandlersIsMutable(); + errorHandlers_.add(index, value); + onChanged(); + } else { + errorHandlersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public Builder addErrorHandlers(com.google.appengine.v1.ErrorHandler.Builder builderForValue) { + if (errorHandlersBuilder_ == null) { + ensureErrorHandlersIsMutable(); + errorHandlers_.add(builderForValue.build()); + onChanged(); + } else { + errorHandlersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public Builder addErrorHandlers( + int index, com.google.appengine.v1.ErrorHandler.Builder builderForValue) { + if (errorHandlersBuilder_ == null) { + ensureErrorHandlersIsMutable(); + errorHandlers_.add(index, builderForValue.build()); + onChanged(); + } else { + errorHandlersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public Builder addAllErrorHandlers( + java.lang.Iterable values) { + if (errorHandlersBuilder_ == null) { + ensureErrorHandlersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorHandlers_); + onChanged(); + } else { + errorHandlersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public Builder clearErrorHandlers() { + if (errorHandlersBuilder_ == null) { + errorHandlers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + errorHandlersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public Builder removeErrorHandlers(int index) { + if (errorHandlersBuilder_ == null) { + ensureErrorHandlersIsMutable(); + errorHandlers_.remove(index); + onChanged(); + } else { + errorHandlersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public com.google.appengine.v1.ErrorHandler.Builder getErrorHandlersBuilder(int index) { + return getErrorHandlersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public com.google.appengine.v1.ErrorHandlerOrBuilder getErrorHandlersOrBuilder(int index) { + if (errorHandlersBuilder_ == null) { + return errorHandlers_.get(index); + } else { + return errorHandlersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public java.util.List + getErrorHandlersOrBuilderList() { + if (errorHandlersBuilder_ != null) { + return errorHandlersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errorHandlers_); + } + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public com.google.appengine.v1.ErrorHandler.Builder addErrorHandlersBuilder() { + return getErrorHandlersFieldBuilder() + .addBuilder(com.google.appengine.v1.ErrorHandler.getDefaultInstance()); + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public com.google.appengine.v1.ErrorHandler.Builder addErrorHandlersBuilder(int index) { + return getErrorHandlersFieldBuilder() + .addBuilder(index, com.google.appengine.v1.ErrorHandler.getDefaultInstance()); + } + /** + * + * + *
+     * Custom static error pages. Limited to 10KB per page.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + public java.util.List + getErrorHandlersBuilderList() { + return getErrorHandlersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.ErrorHandler, + com.google.appengine.v1.ErrorHandler.Builder, + com.google.appengine.v1.ErrorHandlerOrBuilder> + getErrorHandlersFieldBuilder() { + if (errorHandlersBuilder_ == null) { + errorHandlersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.ErrorHandler, + com.google.appengine.v1.ErrorHandler.Builder, + com.google.appengine.v1.ErrorHandlerOrBuilder>( + errorHandlers_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + errorHandlers_ = null; + } + return errorHandlersBuilder_; + } + + private java.util.List libraries_ = + java.util.Collections.emptyList(); + + private void ensureLibrariesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + libraries_ = new java.util.ArrayList(libraries_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Library, + com.google.appengine.v1.Library.Builder, + com.google.appengine.v1.LibraryOrBuilder> + librariesBuilder_; + + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public java.util.List getLibrariesList() { + if (librariesBuilder_ == null) { + return java.util.Collections.unmodifiableList(libraries_); + } else { + return librariesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public int getLibrariesCount() { + if (librariesBuilder_ == null) { + return libraries_.size(); + } else { + return librariesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public com.google.appengine.v1.Library getLibraries(int index) { + if (librariesBuilder_ == null) { + return libraries_.get(index); + } else { + return librariesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public Builder setLibraries(int index, com.google.appengine.v1.Library value) { + if (librariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.set(index, value); + onChanged(); + } else { + librariesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public Builder setLibraries( + int index, com.google.appengine.v1.Library.Builder builderForValue) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.set(index, builderForValue.build()); + onChanged(); + } else { + librariesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public Builder addLibraries(com.google.appengine.v1.Library value) { + if (librariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.add(value); + onChanged(); + } else { + librariesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public Builder addLibraries(int index, com.google.appengine.v1.Library value) { + if (librariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.add(index, value); + onChanged(); + } else { + librariesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public Builder addLibraries(com.google.appengine.v1.Library.Builder builderForValue) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.add(builderForValue.build()); + onChanged(); + } else { + librariesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public Builder addLibraries( + int index, com.google.appengine.v1.Library.Builder builderForValue) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.add(index, builderForValue.build()); + onChanged(); + } else { + librariesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public Builder addAllLibraries( + java.lang.Iterable values) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, libraries_); + onChanged(); + } else { + librariesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public Builder clearLibraries() { + if (librariesBuilder_ == null) { + libraries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + librariesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public Builder removeLibraries(int index) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.remove(index); + onChanged(); + } else { + librariesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public com.google.appengine.v1.Library.Builder getLibrariesBuilder(int index) { + return getLibrariesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public com.google.appengine.v1.LibraryOrBuilder getLibrariesOrBuilder(int index) { + if (librariesBuilder_ == null) { + return libraries_.get(index); + } else { + return librariesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public java.util.List + getLibrariesOrBuilderList() { + if (librariesBuilder_ != null) { + return librariesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(libraries_); + } + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public com.google.appengine.v1.Library.Builder addLibrariesBuilder() { + return getLibrariesFieldBuilder() + .addBuilder(com.google.appengine.v1.Library.getDefaultInstance()); + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public com.google.appengine.v1.Library.Builder addLibrariesBuilder(int index) { + return getLibrariesFieldBuilder() + .addBuilder(index, com.google.appengine.v1.Library.getDefaultInstance()); + } + /** + * + * + *
+     * Configuration for third-party Python runtime libraries that are required
+     * by the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + public java.util.List getLibrariesBuilderList() { + return getLibrariesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Library, + com.google.appengine.v1.Library.Builder, + com.google.appengine.v1.LibraryOrBuilder> + getLibrariesFieldBuilder() { + if (librariesBuilder_ == null) { + librariesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.appengine.v1.Library, + com.google.appengine.v1.Library.Builder, + com.google.appengine.v1.LibraryOrBuilder>( + libraries_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + libraries_ = null; + } + return librariesBuilder_; + } + + private com.google.appengine.v1.ApiConfigHandler apiConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ApiConfigHandler, + com.google.appengine.v1.ApiConfigHandler.Builder, + com.google.appengine.v1.ApiConfigHandlerOrBuilder> + apiConfigBuilder_; + /** + * + * + *
+     * Serving configuration for
+     * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + * + * @return Whether the apiConfig field is set. + */ + public boolean hasApiConfig() { + return apiConfigBuilder_ != null || apiConfig_ != null; + } + /** + * + * + *
+     * Serving configuration for
+     * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + * + * @return The apiConfig. + */ + public com.google.appengine.v1.ApiConfigHandler getApiConfig() { + if (apiConfigBuilder_ == null) { + return apiConfig_ == null + ? com.google.appengine.v1.ApiConfigHandler.getDefaultInstance() + : apiConfig_; + } else { + return apiConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Serving configuration for
+     * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + */ + public Builder setApiConfig(com.google.appengine.v1.ApiConfigHandler value) { + if (apiConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiConfig_ = value; + onChanged(); + } else { + apiConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Serving configuration for
+     * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + */ + public Builder setApiConfig(com.google.appengine.v1.ApiConfigHandler.Builder builderForValue) { + if (apiConfigBuilder_ == null) { + apiConfig_ = builderForValue.build(); + onChanged(); + } else { + apiConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Serving configuration for
+     * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + */ + public Builder mergeApiConfig(com.google.appengine.v1.ApiConfigHandler value) { + if (apiConfigBuilder_ == null) { + if (apiConfig_ != null) { + apiConfig_ = + com.google.appengine.v1.ApiConfigHandler.newBuilder(apiConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + apiConfig_ = value; + } + onChanged(); + } else { + apiConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Serving configuration for
+     * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + */ + public Builder clearApiConfig() { + if (apiConfigBuilder_ == null) { + apiConfig_ = null; + onChanged(); + } else { + apiConfig_ = null; + apiConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Serving configuration for
+     * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + */ + public com.google.appengine.v1.ApiConfigHandler.Builder getApiConfigBuilder() { + + onChanged(); + return getApiConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Serving configuration for
+     * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + */ + public com.google.appengine.v1.ApiConfigHandlerOrBuilder getApiConfigOrBuilder() { + if (apiConfigBuilder_ != null) { + return apiConfigBuilder_.getMessageOrBuilder(); + } else { + return apiConfig_ == null + ? com.google.appengine.v1.ApiConfigHandler.getDefaultInstance() + : apiConfig_; + } + } + /** + * + * + *
+     * Serving configuration for
+     * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ApiConfigHandler, + com.google.appengine.v1.ApiConfigHandler.Builder, + com.google.appengine.v1.ApiConfigHandlerOrBuilder> + getApiConfigFieldBuilder() { + if (apiConfigBuilder_ == null) { + apiConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ApiConfigHandler, + com.google.appengine.v1.ApiConfigHandler.Builder, + com.google.appengine.v1.ApiConfigHandlerOrBuilder>( + getApiConfig(), getParentForChildren(), isClean()); + apiConfig_ = null; + } + return apiConfigBuilder_; + } + + private com.google.protobuf.MapField envVariables_; + + private com.google.protobuf.MapField + internalGetEnvVariables() { + if (envVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvVariablesDefaultEntryHolder.defaultEntry); + } + return envVariables_; + } + + private com.google.protobuf.MapField + internalGetMutableEnvVariables() { + onChanged(); + ; + if (envVariables_ == null) { + envVariables_ = + com.google.protobuf.MapField.newMapField(EnvVariablesDefaultEntryHolder.defaultEntry); + } + if (!envVariables_.isMutable()) { + envVariables_ = envVariables_.copy(); + } + return envVariables_; + } + + public int getEnvVariablesCount() { + return internalGetEnvVariables().getMap().size(); + } + /** + * + * + *
+     * Environment variables available to the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> env_variables = 104; + */ + @java.lang.Override + public boolean containsEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvVariables().getMap().containsKey(key); + } + /** Use {@link #getEnvVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvVariables() { + return getEnvVariablesMap(); + } + /** + * + * + *
+     * Environment variables available to the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> env_variables = 104; + */ + @java.lang.Override + public java.util.Map getEnvVariablesMap() { + return internalGetEnvVariables().getMap(); + } + /** + * + * + *
+     * Environment variables available to the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> env_variables = 104; + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Environment variables available to the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> env_variables = 104; + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEnvVariables() { + internalGetMutableEnvVariables().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Environment variables available to the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> env_variables = 104; + */ + public Builder removeEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvVariables().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableEnvVariables() { + return internalGetMutableEnvVariables().getMutableMap(); + } + /** + * + * + *
+     * Environment variables available to the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> env_variables = 104; + */ + public Builder putEnvVariables(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvVariables().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Environment variables available to the application.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> env_variables = 104; + */ + public Builder putAllEnvVariables(java.util.Map values) { + internalGetMutableEnvVariables().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField buildEnvVariables_; + + private com.google.protobuf.MapField + internalGetBuildEnvVariables() { + if (buildEnvVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuildEnvVariablesDefaultEntryHolder.defaultEntry); + } + return buildEnvVariables_; + } + + private com.google.protobuf.MapField + internalGetMutableBuildEnvVariables() { + onChanged(); + ; + if (buildEnvVariables_ == null) { + buildEnvVariables_ = + com.google.protobuf.MapField.newMapField( + BuildEnvVariablesDefaultEntryHolder.defaultEntry); + } + if (!buildEnvVariables_.isMutable()) { + buildEnvVariables_ = buildEnvVariables_.copy(); + } + return buildEnvVariables_; + } + + public int getBuildEnvVariablesCount() { + return internalGetBuildEnvVariables().getMap().size(); + } + /** + * + * + *
+     * Environment variables available to the build environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> build_env_variables = 125; + */ + @java.lang.Override + public boolean containsBuildEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetBuildEnvVariables().getMap().containsKey(key); + } + /** Use {@link #getBuildEnvVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuildEnvVariables() { + return getBuildEnvVariablesMap(); + } + /** + * + * + *
+     * Environment variables available to the build environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> build_env_variables = 125; + */ + @java.lang.Override + public java.util.Map getBuildEnvVariablesMap() { + return internalGetBuildEnvVariables().getMap(); + } + /** + * + * + *
+     * Environment variables available to the build environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> build_env_variables = 125; + */ + @java.lang.Override + public java.lang.String getBuildEnvVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetBuildEnvVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Environment variables available to the build environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> build_env_variables = 125; + */ + @java.lang.Override + public java.lang.String getBuildEnvVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetBuildEnvVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearBuildEnvVariables() { + internalGetMutableBuildEnvVariables().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Environment variables available to the build environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> build_env_variables = 125; + */ + public Builder removeBuildEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableBuildEnvVariables().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableBuildEnvVariables() { + return internalGetMutableBuildEnvVariables().getMutableMap(); + } + /** + * + * + *
+     * Environment variables available to the build environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> build_env_variables = 125; + */ + public Builder putBuildEnvVariables(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableBuildEnvVariables().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Environment variables available to the build environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * map<string, string> build_env_variables = 125; + */ + public Builder putAllBuildEnvVariables( + java.util.Map values) { + internalGetMutableBuildEnvVariables().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Duration defaultExpiration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + defaultExpirationBuilder_; + /** + * + * + *
+     * Duration that static files should be cached by web proxies and browsers.
+     * Only applicable if the corresponding
+     * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+     * does not specify its own expiration time.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.protobuf.Duration default_expiration = 105; + * + * @return Whether the defaultExpiration field is set. + */ + public boolean hasDefaultExpiration() { + return defaultExpirationBuilder_ != null || defaultExpiration_ != null; + } + /** + * + * + *
+     * Duration that static files should be cached by web proxies and browsers.
+     * Only applicable if the corresponding
+     * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+     * does not specify its own expiration time.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.protobuf.Duration default_expiration = 105; + * + * @return The defaultExpiration. + */ + public com.google.protobuf.Duration getDefaultExpiration() { + if (defaultExpirationBuilder_ == null) { + return defaultExpiration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : defaultExpiration_; + } else { + return defaultExpirationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Duration that static files should be cached by web proxies and browsers.
+     * Only applicable if the corresponding
+     * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+     * does not specify its own expiration time.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.protobuf.Duration default_expiration = 105; + */ + public Builder setDefaultExpiration(com.google.protobuf.Duration value) { + if (defaultExpirationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultExpiration_ = value; + onChanged(); + } else { + defaultExpirationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Duration that static files should be cached by web proxies and browsers.
+     * Only applicable if the corresponding
+     * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+     * does not specify its own expiration time.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.protobuf.Duration default_expiration = 105; + */ + public Builder setDefaultExpiration(com.google.protobuf.Duration.Builder builderForValue) { + if (defaultExpirationBuilder_ == null) { + defaultExpiration_ = builderForValue.build(); + onChanged(); + } else { + defaultExpirationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Duration that static files should be cached by web proxies and browsers.
+     * Only applicable if the corresponding
+     * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+     * does not specify its own expiration time.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.protobuf.Duration default_expiration = 105; + */ + public Builder mergeDefaultExpiration(com.google.protobuf.Duration value) { + if (defaultExpirationBuilder_ == null) { + if (defaultExpiration_ != null) { + defaultExpiration_ = + com.google.protobuf.Duration.newBuilder(defaultExpiration_) + .mergeFrom(value) + .buildPartial(); + } else { + defaultExpiration_ = value; + } + onChanged(); + } else { + defaultExpirationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Duration that static files should be cached by web proxies and browsers.
+     * Only applicable if the corresponding
+     * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+     * does not specify its own expiration time.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.protobuf.Duration default_expiration = 105; + */ + public Builder clearDefaultExpiration() { + if (defaultExpirationBuilder_ == null) { + defaultExpiration_ = null; + onChanged(); + } else { + defaultExpiration_ = null; + defaultExpirationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Duration that static files should be cached by web proxies and browsers.
+     * Only applicable if the corresponding
+     * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+     * does not specify its own expiration time.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.protobuf.Duration default_expiration = 105; + */ + public com.google.protobuf.Duration.Builder getDefaultExpirationBuilder() { + + onChanged(); + return getDefaultExpirationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Duration that static files should be cached by web proxies and browsers.
+     * Only applicable if the corresponding
+     * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+     * does not specify its own expiration time.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.protobuf.Duration default_expiration = 105; + */ + public com.google.protobuf.DurationOrBuilder getDefaultExpirationOrBuilder() { + if (defaultExpirationBuilder_ != null) { + return defaultExpirationBuilder_.getMessageOrBuilder(); + } else { + return defaultExpiration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : defaultExpiration_; + } + } + /** + * + * + *
+     * Duration that static files should be cached by web proxies and browsers.
+     * Only applicable if the corresponding
+     * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+     * does not specify its own expiration time.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.protobuf.Duration default_expiration = 105; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDefaultExpirationFieldBuilder() { + if (defaultExpirationBuilder_ == null) { + defaultExpirationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDefaultExpiration(), getParentForChildren(), isClean()); + defaultExpiration_ = null; + } + return defaultExpirationBuilder_; + } + + private com.google.appengine.v1.HealthCheck healthCheck_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.HealthCheck, + com.google.appengine.v1.HealthCheck.Builder, + com.google.appengine.v1.HealthCheckOrBuilder> + healthCheckBuilder_; + /** + * + * + *
+     * Configures health checking for instances. Unhealthy instances are
+     * stopped and replaced with new instances.
+     * Only applicable in the App Engine flexible environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + * + * @return Whether the healthCheck field is set. + */ + public boolean hasHealthCheck() { + return healthCheckBuilder_ != null || healthCheck_ != null; + } + /** + * + * + *
+     * Configures health checking for instances. Unhealthy instances are
+     * stopped and replaced with new instances.
+     * Only applicable in the App Engine flexible environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + * + * @return The healthCheck. + */ + public com.google.appengine.v1.HealthCheck getHealthCheck() { + if (healthCheckBuilder_ == null) { + return healthCheck_ == null + ? com.google.appengine.v1.HealthCheck.getDefaultInstance() + : healthCheck_; + } else { + return healthCheckBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configures health checking for instances. Unhealthy instances are
+     * stopped and replaced with new instances.
+     * Only applicable in the App Engine flexible environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + */ + public Builder setHealthCheck(com.google.appengine.v1.HealthCheck value) { + if (healthCheckBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + healthCheck_ = value; + onChanged(); + } else { + healthCheckBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Configures health checking for instances. Unhealthy instances are
+     * stopped and replaced with new instances.
+     * Only applicable in the App Engine flexible environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + */ + public Builder setHealthCheck(com.google.appengine.v1.HealthCheck.Builder builderForValue) { + if (healthCheckBuilder_ == null) { + healthCheck_ = builderForValue.build(); + onChanged(); + } else { + healthCheckBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Configures health checking for instances. Unhealthy instances are
+     * stopped and replaced with new instances.
+     * Only applicable in the App Engine flexible environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + */ + public Builder mergeHealthCheck(com.google.appengine.v1.HealthCheck value) { + if (healthCheckBuilder_ == null) { + if (healthCheck_ != null) { + healthCheck_ = + com.google.appengine.v1.HealthCheck.newBuilder(healthCheck_) + .mergeFrom(value) + .buildPartial(); + } else { + healthCheck_ = value; + } + onChanged(); + } else { + healthCheckBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Configures health checking for instances. Unhealthy instances are
+     * stopped and replaced with new instances.
+     * Only applicable in the App Engine flexible environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + */ + public Builder clearHealthCheck() { + if (healthCheckBuilder_ == null) { + healthCheck_ = null; + onChanged(); + } else { + healthCheck_ = null; + healthCheckBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Configures health checking for instances. Unhealthy instances are
+     * stopped and replaced with new instances.
+     * Only applicable in the App Engine flexible environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + */ + public com.google.appengine.v1.HealthCheck.Builder getHealthCheckBuilder() { + + onChanged(); + return getHealthCheckFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configures health checking for instances. Unhealthy instances are
+     * stopped and replaced with new instances.
+     * Only applicable in the App Engine flexible environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + */ + public com.google.appengine.v1.HealthCheckOrBuilder getHealthCheckOrBuilder() { + if (healthCheckBuilder_ != null) { + return healthCheckBuilder_.getMessageOrBuilder(); + } else { + return healthCheck_ == null + ? com.google.appengine.v1.HealthCheck.getDefaultInstance() + : healthCheck_; + } + } + /** + * + * + *
+     * Configures health checking for instances. Unhealthy instances are
+     * stopped and replaced with new instances.
+     * Only applicable in the App Engine flexible environment.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.HealthCheck, + com.google.appengine.v1.HealthCheck.Builder, + com.google.appengine.v1.HealthCheckOrBuilder> + getHealthCheckFieldBuilder() { + if (healthCheckBuilder_ == null) { + healthCheckBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.HealthCheck, + com.google.appengine.v1.HealthCheck.Builder, + com.google.appengine.v1.HealthCheckOrBuilder>( + getHealthCheck(), getParentForChildren(), isClean()); + healthCheck_ = null; + } + return healthCheckBuilder_; + } + + private com.google.appengine.v1.ReadinessCheck readinessCheck_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ReadinessCheck, + com.google.appengine.v1.ReadinessCheck.Builder, + com.google.appengine.v1.ReadinessCheckOrBuilder> + readinessCheckBuilder_; + /** + * + * + *
+     * Configures readiness health checking for instances.
+     * Unhealthy instances are not put into the backend traffic rotation.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + * + * @return Whether the readinessCheck field is set. + */ + public boolean hasReadinessCheck() { + return readinessCheckBuilder_ != null || readinessCheck_ != null; + } + /** + * + * + *
+     * Configures readiness health checking for instances.
+     * Unhealthy instances are not put into the backend traffic rotation.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + * + * @return The readinessCheck. + */ + public com.google.appengine.v1.ReadinessCheck getReadinessCheck() { + if (readinessCheckBuilder_ == null) { + return readinessCheck_ == null + ? com.google.appengine.v1.ReadinessCheck.getDefaultInstance() + : readinessCheck_; + } else { + return readinessCheckBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configures readiness health checking for instances.
+     * Unhealthy instances are not put into the backend traffic rotation.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + */ + public Builder setReadinessCheck(com.google.appengine.v1.ReadinessCheck value) { + if (readinessCheckBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readinessCheck_ = value; + onChanged(); + } else { + readinessCheckBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Configures readiness health checking for instances.
+     * Unhealthy instances are not put into the backend traffic rotation.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + */ + public Builder setReadinessCheck( + com.google.appengine.v1.ReadinessCheck.Builder builderForValue) { + if (readinessCheckBuilder_ == null) { + readinessCheck_ = builderForValue.build(); + onChanged(); + } else { + readinessCheckBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Configures readiness health checking for instances.
+     * Unhealthy instances are not put into the backend traffic rotation.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + */ + public Builder mergeReadinessCheck(com.google.appengine.v1.ReadinessCheck value) { + if (readinessCheckBuilder_ == null) { + if (readinessCheck_ != null) { + readinessCheck_ = + com.google.appengine.v1.ReadinessCheck.newBuilder(readinessCheck_) + .mergeFrom(value) + .buildPartial(); + } else { + readinessCheck_ = value; + } + onChanged(); + } else { + readinessCheckBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Configures readiness health checking for instances.
+     * Unhealthy instances are not put into the backend traffic rotation.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + */ + public Builder clearReadinessCheck() { + if (readinessCheckBuilder_ == null) { + readinessCheck_ = null; + onChanged(); + } else { + readinessCheck_ = null; + readinessCheckBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Configures readiness health checking for instances.
+     * Unhealthy instances are not put into the backend traffic rotation.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + */ + public com.google.appengine.v1.ReadinessCheck.Builder getReadinessCheckBuilder() { + + onChanged(); + return getReadinessCheckFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configures readiness health checking for instances.
+     * Unhealthy instances are not put into the backend traffic rotation.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + */ + public com.google.appengine.v1.ReadinessCheckOrBuilder getReadinessCheckOrBuilder() { + if (readinessCheckBuilder_ != null) { + return readinessCheckBuilder_.getMessageOrBuilder(); + } else { + return readinessCheck_ == null + ? com.google.appengine.v1.ReadinessCheck.getDefaultInstance() + : readinessCheck_; + } + } + /** + * + * + *
+     * Configures readiness health checking for instances.
+     * Unhealthy instances are not put into the backend traffic rotation.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ReadinessCheck, + com.google.appengine.v1.ReadinessCheck.Builder, + com.google.appengine.v1.ReadinessCheckOrBuilder> + getReadinessCheckFieldBuilder() { + if (readinessCheckBuilder_ == null) { + readinessCheckBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.ReadinessCheck, + com.google.appengine.v1.ReadinessCheck.Builder, + com.google.appengine.v1.ReadinessCheckOrBuilder>( + getReadinessCheck(), getParentForChildren(), isClean()); + readinessCheck_ = null; + } + return readinessCheckBuilder_; + } + + private com.google.appengine.v1.LivenessCheck livenessCheck_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.LivenessCheck, + com.google.appengine.v1.LivenessCheck.Builder, + com.google.appengine.v1.LivenessCheckOrBuilder> + livenessCheckBuilder_; + /** + * + * + *
+     * Configures liveness health checking for instances.
+     * Unhealthy instances are stopped and replaced with new instances
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + * + * @return Whether the livenessCheck field is set. + */ + public boolean hasLivenessCheck() { + return livenessCheckBuilder_ != null || livenessCheck_ != null; + } + /** + * + * + *
+     * Configures liveness health checking for instances.
+     * Unhealthy instances are stopped and replaced with new instances
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + * + * @return The livenessCheck. + */ + public com.google.appengine.v1.LivenessCheck getLivenessCheck() { + if (livenessCheckBuilder_ == null) { + return livenessCheck_ == null + ? com.google.appengine.v1.LivenessCheck.getDefaultInstance() + : livenessCheck_; + } else { + return livenessCheckBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configures liveness health checking for instances.
+     * Unhealthy instances are stopped and replaced with new instances
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + */ + public Builder setLivenessCheck(com.google.appengine.v1.LivenessCheck value) { + if (livenessCheckBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + livenessCheck_ = value; + onChanged(); + } else { + livenessCheckBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Configures liveness health checking for instances.
+     * Unhealthy instances are stopped and replaced with new instances
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + */ + public Builder setLivenessCheck(com.google.appengine.v1.LivenessCheck.Builder builderForValue) { + if (livenessCheckBuilder_ == null) { + livenessCheck_ = builderForValue.build(); + onChanged(); + } else { + livenessCheckBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Configures liveness health checking for instances.
+     * Unhealthy instances are stopped and replaced with new instances
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + */ + public Builder mergeLivenessCheck(com.google.appengine.v1.LivenessCheck value) { + if (livenessCheckBuilder_ == null) { + if (livenessCheck_ != null) { + livenessCheck_ = + com.google.appengine.v1.LivenessCheck.newBuilder(livenessCheck_) + .mergeFrom(value) + .buildPartial(); + } else { + livenessCheck_ = value; + } + onChanged(); + } else { + livenessCheckBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Configures liveness health checking for instances.
+     * Unhealthy instances are stopped and replaced with new instances
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + */ + public Builder clearLivenessCheck() { + if (livenessCheckBuilder_ == null) { + livenessCheck_ = null; + onChanged(); + } else { + livenessCheck_ = null; + livenessCheckBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Configures liveness health checking for instances.
+     * Unhealthy instances are stopped and replaced with new instances
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + */ + public com.google.appengine.v1.LivenessCheck.Builder getLivenessCheckBuilder() { + + onChanged(); + return getLivenessCheckFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configures liveness health checking for instances.
+     * Unhealthy instances are stopped and replaced with new instances
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + */ + public com.google.appengine.v1.LivenessCheckOrBuilder getLivenessCheckOrBuilder() { + if (livenessCheckBuilder_ != null) { + return livenessCheckBuilder_.getMessageOrBuilder(); + } else { + return livenessCheck_ == null + ? com.google.appengine.v1.LivenessCheck.getDefaultInstance() + : livenessCheck_; + } + } + /** + * + * + *
+     * Configures liveness health checking for instances.
+     * Unhealthy instances are stopped and replaced with new instances
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.LivenessCheck, + com.google.appengine.v1.LivenessCheck.Builder, + com.google.appengine.v1.LivenessCheckOrBuilder> + getLivenessCheckFieldBuilder() { + if (livenessCheckBuilder_ == null) { + livenessCheckBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.LivenessCheck, + com.google.appengine.v1.LivenessCheck.Builder, + com.google.appengine.v1.LivenessCheckOrBuilder>( + getLivenessCheck(), getParentForChildren(), isClean()); + livenessCheck_ = null; + } + return livenessCheckBuilder_; + } + + private java.lang.Object nobuildFilesRegex_ = ""; + /** + * + * + *
+     * Files that match this pattern will not be built into this version.
+     * Only applicable for Go runtimes.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * string nobuild_files_regex = 107; + * + * @return The nobuildFilesRegex. + */ + public java.lang.String getNobuildFilesRegex() { + java.lang.Object ref = nobuildFilesRegex_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nobuildFilesRegex_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Files that match this pattern will not be built into this version.
+     * Only applicable for Go runtimes.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * string nobuild_files_regex = 107; + * + * @return The bytes for nobuildFilesRegex. + */ + public com.google.protobuf.ByteString getNobuildFilesRegexBytes() { + java.lang.Object ref = nobuildFilesRegex_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nobuildFilesRegex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Files that match this pattern will not be built into this version.
+     * Only applicable for Go runtimes.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * string nobuild_files_regex = 107; + * + * @param value The nobuildFilesRegex to set. + * @return This builder for chaining. + */ + public Builder setNobuildFilesRegex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nobuildFilesRegex_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Files that match this pattern will not be built into this version.
+     * Only applicable for Go runtimes.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * string nobuild_files_regex = 107; + * + * @return This builder for chaining. + */ + public Builder clearNobuildFilesRegex() { + + nobuildFilesRegex_ = getDefaultInstance().getNobuildFilesRegex(); + onChanged(); + return this; + } + /** + * + * + *
+     * Files that match this pattern will not be built into this version.
+     * Only applicable for Go runtimes.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * string nobuild_files_regex = 107; + * + * @param value The bytes for nobuildFilesRegex to set. + * @return This builder for chaining. + */ + public Builder setNobuildFilesRegexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nobuildFilesRegex_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.Deployment deployment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Deployment, + com.google.appengine.v1.Deployment.Builder, + com.google.appengine.v1.DeploymentOrBuilder> + deploymentBuilder_; + /** + * + * + *
+     * Code and application artifacts that make up this version.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + * + * @return Whether the deployment field is set. + */ + public boolean hasDeployment() { + return deploymentBuilder_ != null || deployment_ != null; + } + /** + * + * + *
+     * Code and application artifacts that make up this version.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + * + * @return The deployment. + */ + public com.google.appengine.v1.Deployment getDeployment() { + if (deploymentBuilder_ == null) { + return deployment_ == null + ? com.google.appengine.v1.Deployment.getDefaultInstance() + : deployment_; + } else { + return deploymentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Code and application artifacts that make up this version.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + */ + public Builder setDeployment(com.google.appengine.v1.Deployment value) { + if (deploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployment_ = value; + onChanged(); + } else { + deploymentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Code and application artifacts that make up this version.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + */ + public Builder setDeployment(com.google.appengine.v1.Deployment.Builder builderForValue) { + if (deploymentBuilder_ == null) { + deployment_ = builderForValue.build(); + onChanged(); + } else { + deploymentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Code and application artifacts that make up this version.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + */ + public Builder mergeDeployment(com.google.appengine.v1.Deployment value) { + if (deploymentBuilder_ == null) { + if (deployment_ != null) { + deployment_ = + com.google.appengine.v1.Deployment.newBuilder(deployment_) + .mergeFrom(value) + .buildPartial(); + } else { + deployment_ = value; + } + onChanged(); + } else { + deploymentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Code and application artifacts that make up this version.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + */ + public Builder clearDeployment() { + if (deploymentBuilder_ == null) { + deployment_ = null; + onChanged(); + } else { + deployment_ = null; + deploymentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Code and application artifacts that make up this version.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + */ + public com.google.appengine.v1.Deployment.Builder getDeploymentBuilder() { + + onChanged(); + return getDeploymentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Code and application artifacts that make up this version.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + */ + public com.google.appengine.v1.DeploymentOrBuilder getDeploymentOrBuilder() { + if (deploymentBuilder_ != null) { + return deploymentBuilder_.getMessageOrBuilder(); + } else { + return deployment_ == null + ? com.google.appengine.v1.Deployment.getDefaultInstance() + : deployment_; + } + } + /** + * + * + *
+     * Code and application artifacts that make up this version.
+     * Only returned in `GET` requests if `view=FULL` is set.
+     * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Deployment, + com.google.appengine.v1.Deployment.Builder, + com.google.appengine.v1.DeploymentOrBuilder> + getDeploymentFieldBuilder() { + if (deploymentBuilder_ == null) { + deploymentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Deployment, + com.google.appengine.v1.Deployment.Builder, + com.google.appengine.v1.DeploymentOrBuilder>( + getDeployment(), getParentForChildren(), isClean()); + deployment_ = null; + } + return deploymentBuilder_; + } + + private java.lang.Object versionUrl_ = ""; + /** + * + * + *
+     * Serving URL for this version. Example:
+     * "https://myversion-dot-myservice-dot-myapp.appspot.com"
+     * @OutputOnly
+     * 
+ * + * string version_url = 109; + * + * @return The versionUrl. + */ + public java.lang.String getVersionUrl() { + java.lang.Object ref = versionUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Serving URL for this version. Example:
+     * "https://myversion-dot-myservice-dot-myapp.appspot.com"
+     * @OutputOnly
+     * 
+ * + * string version_url = 109; + * + * @return The bytes for versionUrl. + */ + public com.google.protobuf.ByteString getVersionUrlBytes() { + java.lang.Object ref = versionUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Serving URL for this version. Example:
+     * "https://myversion-dot-myservice-dot-myapp.appspot.com"
+     * @OutputOnly
+     * 
+ * + * string version_url = 109; + * + * @param value The versionUrl to set. + * @return This builder for chaining. + */ + public Builder setVersionUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + versionUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Serving URL for this version. Example:
+     * "https://myversion-dot-myservice-dot-myapp.appspot.com"
+     * @OutputOnly
+     * 
+ * + * string version_url = 109; + * + * @return This builder for chaining. + */ + public Builder clearVersionUrl() { + + versionUrl_ = getDefaultInstance().getVersionUrl(); + onChanged(); + return this; + } + /** + * + * + *
+     * Serving URL for this version. Example:
+     * "https://myversion-dot-myservice-dot-myapp.appspot.com"
+     * @OutputOnly
+     * 
+ * + * string version_url = 109; + * + * @param value The bytes for versionUrl to set. + * @return This builder for chaining. + */ + public Builder setVersionUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + versionUrl_ = value; + onChanged(); + return this; + } + + private com.google.appengine.v1.EndpointsApiService endpointsApiService_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.EndpointsApiService, + com.google.appengine.v1.EndpointsApiService.Builder, + com.google.appengine.v1.EndpointsApiServiceOrBuilder> + endpointsApiServiceBuilder_; + /** + * + * + *
+     * Cloud Endpoints configuration.
+     * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+     * Proxy will be provided to serve the API implemented by the app.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + * + * @return Whether the endpointsApiService field is set. + */ + public boolean hasEndpointsApiService() { + return endpointsApiServiceBuilder_ != null || endpointsApiService_ != null; + } + /** + * + * + *
+     * Cloud Endpoints configuration.
+     * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+     * Proxy will be provided to serve the API implemented by the app.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + * + * @return The endpointsApiService. + */ + public com.google.appengine.v1.EndpointsApiService getEndpointsApiService() { + if (endpointsApiServiceBuilder_ == null) { + return endpointsApiService_ == null + ? com.google.appengine.v1.EndpointsApiService.getDefaultInstance() + : endpointsApiService_; + } else { + return endpointsApiServiceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Cloud Endpoints configuration.
+     * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+     * Proxy will be provided to serve the API implemented by the app.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + */ + public Builder setEndpointsApiService(com.google.appengine.v1.EndpointsApiService value) { + if (endpointsApiServiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointsApiService_ = value; + onChanged(); + } else { + endpointsApiServiceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Cloud Endpoints configuration.
+     * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+     * Proxy will be provided to serve the API implemented by the app.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + */ + public Builder setEndpointsApiService( + com.google.appengine.v1.EndpointsApiService.Builder builderForValue) { + if (endpointsApiServiceBuilder_ == null) { + endpointsApiService_ = builderForValue.build(); + onChanged(); + } else { + endpointsApiServiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Cloud Endpoints configuration.
+     * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+     * Proxy will be provided to serve the API implemented by the app.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + */ + public Builder mergeEndpointsApiService(com.google.appengine.v1.EndpointsApiService value) { + if (endpointsApiServiceBuilder_ == null) { + if (endpointsApiService_ != null) { + endpointsApiService_ = + com.google.appengine.v1.EndpointsApiService.newBuilder(endpointsApiService_) + .mergeFrom(value) + .buildPartial(); + } else { + endpointsApiService_ = value; + } + onChanged(); + } else { + endpointsApiServiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Cloud Endpoints configuration.
+     * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+     * Proxy will be provided to serve the API implemented by the app.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + */ + public Builder clearEndpointsApiService() { + if (endpointsApiServiceBuilder_ == null) { + endpointsApiService_ = null; + onChanged(); + } else { + endpointsApiService_ = null; + endpointsApiServiceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Cloud Endpoints configuration.
+     * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+     * Proxy will be provided to serve the API implemented by the app.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + */ + public com.google.appengine.v1.EndpointsApiService.Builder getEndpointsApiServiceBuilder() { + + onChanged(); + return getEndpointsApiServiceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cloud Endpoints configuration.
+     * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+     * Proxy will be provided to serve the API implemented by the app.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + */ + public com.google.appengine.v1.EndpointsApiServiceOrBuilder getEndpointsApiServiceOrBuilder() { + if (endpointsApiServiceBuilder_ != null) { + return endpointsApiServiceBuilder_.getMessageOrBuilder(); + } else { + return endpointsApiService_ == null + ? com.google.appengine.v1.EndpointsApiService.getDefaultInstance() + : endpointsApiService_; + } + } + /** + * + * + *
+     * Cloud Endpoints configuration.
+     * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+     * Proxy will be provided to serve the API implemented by the app.
+     * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.EndpointsApiService, + com.google.appengine.v1.EndpointsApiService.Builder, + com.google.appengine.v1.EndpointsApiServiceOrBuilder> + getEndpointsApiServiceFieldBuilder() { + if (endpointsApiServiceBuilder_ == null) { + endpointsApiServiceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.EndpointsApiService, + com.google.appengine.v1.EndpointsApiService.Builder, + com.google.appengine.v1.EndpointsApiServiceOrBuilder>( + getEndpointsApiService(), getParentForChildren(), isClean()); + endpointsApiService_ = null; + } + return endpointsApiServiceBuilder_; + } + + private com.google.appengine.v1.Entrypoint entrypoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Entrypoint, + com.google.appengine.v1.Entrypoint.Builder, + com.google.appengine.v1.EntrypointOrBuilder> + entrypointBuilder_; + /** + * + * + *
+     * The entrypoint for the application.
+     * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + * + * @return Whether the entrypoint field is set. + */ + public boolean hasEntrypoint() { + return entrypointBuilder_ != null || entrypoint_ != null; + } + /** + * + * + *
+     * The entrypoint for the application.
+     * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + * + * @return The entrypoint. + */ + public com.google.appengine.v1.Entrypoint getEntrypoint() { + if (entrypointBuilder_ == null) { + return entrypoint_ == null + ? com.google.appengine.v1.Entrypoint.getDefaultInstance() + : entrypoint_; + } else { + return entrypointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The entrypoint for the application.
+     * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + */ + public Builder setEntrypoint(com.google.appengine.v1.Entrypoint value) { + if (entrypointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entrypoint_ = value; + onChanged(); + } else { + entrypointBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The entrypoint for the application.
+     * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + */ + public Builder setEntrypoint(com.google.appengine.v1.Entrypoint.Builder builderForValue) { + if (entrypointBuilder_ == null) { + entrypoint_ = builderForValue.build(); + onChanged(); + } else { + entrypointBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The entrypoint for the application.
+     * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + */ + public Builder mergeEntrypoint(com.google.appengine.v1.Entrypoint value) { + if (entrypointBuilder_ == null) { + if (entrypoint_ != null) { + entrypoint_ = + com.google.appengine.v1.Entrypoint.newBuilder(entrypoint_) + .mergeFrom(value) + .buildPartial(); + } else { + entrypoint_ = value; + } + onChanged(); + } else { + entrypointBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The entrypoint for the application.
+     * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + */ + public Builder clearEntrypoint() { + if (entrypointBuilder_ == null) { + entrypoint_ = null; + onChanged(); + } else { + entrypoint_ = null; + entrypointBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The entrypoint for the application.
+     * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + */ + public com.google.appengine.v1.Entrypoint.Builder getEntrypointBuilder() { + + onChanged(); + return getEntrypointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The entrypoint for the application.
+     * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + */ + public com.google.appengine.v1.EntrypointOrBuilder getEntrypointOrBuilder() { + if (entrypointBuilder_ != null) { + return entrypointBuilder_.getMessageOrBuilder(); + } else { + return entrypoint_ == null + ? com.google.appengine.v1.Entrypoint.getDefaultInstance() + : entrypoint_; + } + } + /** + * + * + *
+     * The entrypoint for the application.
+     * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Entrypoint, + com.google.appengine.v1.Entrypoint.Builder, + com.google.appengine.v1.EntrypointOrBuilder> + getEntrypointFieldBuilder() { + if (entrypointBuilder_ == null) { + entrypointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.Entrypoint, + com.google.appengine.v1.Entrypoint.Builder, + com.google.appengine.v1.EntrypointOrBuilder>( + getEntrypoint(), getParentForChildren(), isClean()); + entrypoint_ = null; + } + return entrypointBuilder_; + } + + private com.google.appengine.v1.VpcAccessConnector vpcAccessConnector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.VpcAccessConnector, + com.google.appengine.v1.VpcAccessConnector.Builder, + com.google.appengine.v1.VpcAccessConnectorOrBuilder> + vpcAccessConnectorBuilder_; + /** + * + * + *
+     * Enables VPC connectivity for standard apps.
+     * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + * + * @return Whether the vpcAccessConnector field is set. + */ + public boolean hasVpcAccessConnector() { + return vpcAccessConnectorBuilder_ != null || vpcAccessConnector_ != null; + } + /** + * + * + *
+     * Enables VPC connectivity for standard apps.
+     * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + * + * @return The vpcAccessConnector. + */ + public com.google.appengine.v1.VpcAccessConnector getVpcAccessConnector() { + if (vpcAccessConnectorBuilder_ == null) { + return vpcAccessConnector_ == null + ? com.google.appengine.v1.VpcAccessConnector.getDefaultInstance() + : vpcAccessConnector_; + } else { + return vpcAccessConnectorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Enables VPC connectivity for standard apps.
+     * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + */ + public Builder setVpcAccessConnector(com.google.appengine.v1.VpcAccessConnector value) { + if (vpcAccessConnectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vpcAccessConnector_ = value; + onChanged(); + } else { + vpcAccessConnectorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Enables VPC connectivity for standard apps.
+     * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + */ + public Builder setVpcAccessConnector( + com.google.appengine.v1.VpcAccessConnector.Builder builderForValue) { + if (vpcAccessConnectorBuilder_ == null) { + vpcAccessConnector_ = builderForValue.build(); + onChanged(); + } else { + vpcAccessConnectorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Enables VPC connectivity for standard apps.
+     * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + */ + public Builder mergeVpcAccessConnector(com.google.appengine.v1.VpcAccessConnector value) { + if (vpcAccessConnectorBuilder_ == null) { + if (vpcAccessConnector_ != null) { + vpcAccessConnector_ = + com.google.appengine.v1.VpcAccessConnector.newBuilder(vpcAccessConnector_) + .mergeFrom(value) + .buildPartial(); + } else { + vpcAccessConnector_ = value; + } + onChanged(); + } else { + vpcAccessConnectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Enables VPC connectivity for standard apps.
+     * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + */ + public Builder clearVpcAccessConnector() { + if (vpcAccessConnectorBuilder_ == null) { + vpcAccessConnector_ = null; + onChanged(); + } else { + vpcAccessConnector_ = null; + vpcAccessConnectorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Enables VPC connectivity for standard apps.
+     * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + */ + public com.google.appengine.v1.VpcAccessConnector.Builder getVpcAccessConnectorBuilder() { + + onChanged(); + return getVpcAccessConnectorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Enables VPC connectivity for standard apps.
+     * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + */ + public com.google.appengine.v1.VpcAccessConnectorOrBuilder getVpcAccessConnectorOrBuilder() { + if (vpcAccessConnectorBuilder_ != null) { + return vpcAccessConnectorBuilder_.getMessageOrBuilder(); + } else { + return vpcAccessConnector_ == null + ? com.google.appengine.v1.VpcAccessConnector.getDefaultInstance() + : vpcAccessConnector_; + } + } + /** + * + * + *
+     * Enables VPC connectivity for standard apps.
+     * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.VpcAccessConnector, + com.google.appengine.v1.VpcAccessConnector.Builder, + com.google.appengine.v1.VpcAccessConnectorOrBuilder> + getVpcAccessConnectorFieldBuilder() { + if (vpcAccessConnectorBuilder_ == null) { + vpcAccessConnectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.appengine.v1.VpcAccessConnector, + com.google.appengine.v1.VpcAccessConnector.Builder, + com.google.appengine.v1.VpcAccessConnectorOrBuilder>( + getVpcAccessConnector(), getParentForChildren(), isClean()); + vpcAccessConnector_ = null; + } + return vpcAccessConnectorBuilder_; + } + + @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.appengine.v1.Version) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Version) + private static final com.google.appengine.v1.Version DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Version(); + } + + public static com.google.appengine.v1.Version getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Version parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Version(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.appengine.v1.Version getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionOrBuilder.java new file mode 100644 index 00000000..0f3e8b80 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionOrBuilder.java @@ -0,0 +1,1523 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface VersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Version) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Full path to the Version resource in the API.  Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Full path to the Version resource in the API.  Example:
+   * `apps/myapp/services/default/versions/v1`.
+   * @OutputOnly
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Relative name of the version within the service.  Example: `v1`.
+   * Version names can contain only lowercase letters, numbers, or hyphens.
+   * Reserved names: "default", "latest", and any name with the prefix "ah-".
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Relative name of the version within the service.  Example: `v1`.
+   * Version names can contain only lowercase letters, numbers, or hyphens.
+   * Reserved names: "default", "latest", and any name with the prefix "ah-".
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Automatic scaling is based on request rate, response latencies, and other
+   * application metrics. Instances are dynamically created and destroyed as
+   * needed in order to handle traffic.
+   * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + * + * @return Whether the automaticScaling field is set. + */ + boolean hasAutomaticScaling(); + /** + * + * + *
+   * Automatic scaling is based on request rate, response latencies, and other
+   * application metrics. Instances are dynamically created and destroyed as
+   * needed in order to handle traffic.
+   * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + * + * @return The automaticScaling. + */ + com.google.appengine.v1.AutomaticScaling getAutomaticScaling(); + /** + * + * + *
+   * Automatic scaling is based on request rate, response latencies, and other
+   * application metrics. Instances are dynamically created and destroyed as
+   * needed in order to handle traffic.
+   * 
+ * + * .google.appengine.v1.AutomaticScaling automatic_scaling = 3; + */ + com.google.appengine.v1.AutomaticScalingOrBuilder getAutomaticScalingOrBuilder(); + + /** + * + * + *
+   * A service with basic scaling will create an instance when the application
+   * receives a request. The instance will be turned down when the app becomes
+   * idle. Basic scaling is ideal for work that is intermittent or driven by
+   * user activity.
+   * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + * + * @return Whether the basicScaling field is set. + */ + boolean hasBasicScaling(); + /** + * + * + *
+   * A service with basic scaling will create an instance when the application
+   * receives a request. The instance will be turned down when the app becomes
+   * idle. Basic scaling is ideal for work that is intermittent or driven by
+   * user activity.
+   * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + * + * @return The basicScaling. + */ + com.google.appengine.v1.BasicScaling getBasicScaling(); + /** + * + * + *
+   * A service with basic scaling will create an instance when the application
+   * receives a request. The instance will be turned down when the app becomes
+   * idle. Basic scaling is ideal for work that is intermittent or driven by
+   * user activity.
+   * 
+ * + * .google.appengine.v1.BasicScaling basic_scaling = 4; + */ + com.google.appengine.v1.BasicScalingOrBuilder getBasicScalingOrBuilder(); + + /** + * + * + *
+   * A service with manual scaling runs continuously, allowing you to perform
+   * complex initialization and rely on the state of its memory over time.
+   * Manually scaled versions are sometimes referred to as "backends".
+   * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + * + * @return Whether the manualScaling field is set. + */ + boolean hasManualScaling(); + /** + * + * + *
+   * A service with manual scaling runs continuously, allowing you to perform
+   * complex initialization and rely on the state of its memory over time.
+   * Manually scaled versions are sometimes referred to as "backends".
+   * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + * + * @return The manualScaling. + */ + com.google.appengine.v1.ManualScaling getManualScaling(); + /** + * + * + *
+   * A service with manual scaling runs continuously, allowing you to perform
+   * complex initialization and rely on the state of its memory over time.
+   * Manually scaled versions are sometimes referred to as "backends".
+   * 
+ * + * .google.appengine.v1.ManualScaling manual_scaling = 5; + */ + com.google.appengine.v1.ManualScalingOrBuilder getManualScalingOrBuilder(); + + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return A list containing the inboundServices. + */ + java.util.List getInboundServicesList(); + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return The count of inboundServices. + */ + int getInboundServicesCount(); + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param index The index of the element to return. + * @return The inboundServices at the given index. + */ + com.google.appengine.v1.InboundServiceType getInboundServices(int index); + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @return A list containing the enum numeric values on the wire for inboundServices. + */ + java.util.List getInboundServicesValueList(); + /** + * + * + *
+   * Before an application can receive email or XMPP messages, the application
+   * must be configured to enable the service.
+   * 
+ * + * repeated .google.appengine.v1.InboundServiceType inbound_services = 6; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of inboundServices at the given index. + */ + int getInboundServicesValue(int index); + + /** + * + * + *
+   * Instance class that is used to run this version. Valid values are:
+   * * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+   * * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+   * Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+   * BasicScaling.
+   * 
+ * + * string instance_class = 7; + * + * @return The instanceClass. + */ + java.lang.String getInstanceClass(); + /** + * + * + *
+   * Instance class that is used to run this version. Valid values are:
+   * * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
+   * * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
+   * Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
+   * BasicScaling.
+   * 
+ * + * string instance_class = 7; + * + * @return The bytes for instanceClass. + */ + com.google.protobuf.ByteString getInstanceClassBytes(); + + /** + * + * + *
+   * Extra network settings.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Network network = 8; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Extra network settings.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Network network = 8; + * + * @return The network. + */ + com.google.appengine.v1.Network getNetwork(); + /** + * + * + *
+   * Extra network settings.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Network network = 8; + */ + com.google.appengine.v1.NetworkOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * The Google Compute Engine zones that are supported by this version in the
+   * App Engine flexible environment. Deprecated.
+   * 
+ * + * repeated string zones = 118; + * + * @return A list containing the zones. + */ + java.util.List getZonesList(); + /** + * + * + *
+   * The Google Compute Engine zones that are supported by this version in the
+   * App Engine flexible environment. Deprecated.
+   * 
+ * + * repeated string zones = 118; + * + * @return The count of zones. + */ + int getZonesCount(); + /** + * + * + *
+   * The Google Compute Engine zones that are supported by this version in the
+   * App Engine flexible environment. Deprecated.
+   * 
+ * + * repeated string zones = 118; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + java.lang.String getZones(int index); + /** + * + * + *
+   * The Google Compute Engine zones that are supported by this version in the
+   * App Engine flexible environment. Deprecated.
+   * 
+ * + * repeated string zones = 118; + * + * @param index The index of the value to return. + * @return The bytes of the zones at the given index. + */ + com.google.protobuf.ByteString getZonesBytes(int index); + + /** + * + * + *
+   * Machine resources for this version.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Resources resources = 9; + * + * @return Whether the resources field is set. + */ + boolean hasResources(); + /** + * + * + *
+   * Machine resources for this version.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Resources resources = 9; + * + * @return The resources. + */ + com.google.appengine.v1.Resources getResources(); + /** + * + * + *
+   * Machine resources for this version.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * .google.appengine.v1.Resources resources = 9; + */ + com.google.appengine.v1.ResourcesOrBuilder getResourcesOrBuilder(); + + /** + * + * + *
+   * Desired runtime. Example: `python27`.
+   * 
+ * + * string runtime = 10; + * + * @return The runtime. + */ + java.lang.String getRuntime(); + /** + * + * + *
+   * Desired runtime. Example: `python27`.
+   * 
+ * + * string runtime = 10; + * + * @return The bytes for runtime. + */ + com.google.protobuf.ByteString getRuntimeBytes(); + + /** + * + * + *
+   * The channel of the runtime to use. Only available for some
+   * runtimes. Defaults to the `default` channel.
+   * 
+ * + * string runtime_channel = 117; + * + * @return The runtimeChannel. + */ + java.lang.String getRuntimeChannel(); + /** + * + * + *
+   * The channel of the runtime to use. Only available for some
+   * runtimes. Defaults to the `default` channel.
+   * 
+ * + * string runtime_channel = 117; + * + * @return The bytes for runtimeChannel. + */ + com.google.protobuf.ByteString getRuntimeChannelBytes(); + + /** + * + * + *
+   * Whether multiple requests can be dispatched to this version at once.
+   * 
+ * + * bool threadsafe = 11; + * + * @return The threadsafe. + */ + boolean getThreadsafe(); + + /** + * + * + *
+   * Whether to deploy this version in a container on a virtual machine.
+   * 
+ * + * bool vm = 12; + * + * @return The vm. + */ + boolean getVm(); + + /** + * + * + *
+   * Metadata settings that are supplied to this version to enable
+   * beta runtime features.
+   * 
+ * + * map<string, string> beta_settings = 13; + */ + int getBetaSettingsCount(); + /** + * + * + *
+   * Metadata settings that are supplied to this version to enable
+   * beta runtime features.
+   * 
+ * + * map<string, string> beta_settings = 13; + */ + boolean containsBetaSettings(java.lang.String key); + /** Use {@link #getBetaSettingsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getBetaSettings(); + /** + * + * + *
+   * Metadata settings that are supplied to this version to enable
+   * beta runtime features.
+   * 
+ * + * map<string, string> beta_settings = 13; + */ + java.util.Map getBetaSettingsMap(); + /** + * + * + *
+   * Metadata settings that are supplied to this version to enable
+   * beta runtime features.
+   * 
+ * + * map<string, string> beta_settings = 13; + */ + java.lang.String getBetaSettingsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Metadata settings that are supplied to this version to enable
+   * beta runtime features.
+   * 
+ * + * map<string, string> beta_settings = 13; + */ + java.lang.String getBetaSettingsOrThrow(java.lang.String key); + + /** + * + * + *
+   * App Engine execution environment for this version.
+   * Defaults to `standard`.
+   * 
+ * + * string env = 14; + * + * @return The env. + */ + java.lang.String getEnv(); + /** + * + * + *
+   * App Engine execution environment for this version.
+   * Defaults to `standard`.
+   * 
+ * + * string env = 14; + * + * @return The bytes for env. + */ + com.google.protobuf.ByteString getEnvBytes(); + + /** + * + * + *
+   * Current serving status of this version. Only the versions with a
+   * `SERVING` status create instances and can be billed.
+   * `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+   * 
+ * + * .google.appengine.v1.ServingStatus serving_status = 15; + * + * @return The enum numeric value on the wire for servingStatus. + */ + int getServingStatusValue(); + /** + * + * + *
+   * Current serving status of this version. Only the versions with a
+   * `SERVING` status create instances and can be billed.
+   * `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
+   * 
+ * + * .google.appengine.v1.ServingStatus serving_status = 15; + * + * @return The servingStatus. + */ + com.google.appengine.v1.ServingStatus getServingStatus(); + + /** + * + * + *
+   * Email address of the user who created this version.
+   * @OutputOnly
+   * 
+ * + * string created_by = 16; + * + * @return The createdBy. + */ + java.lang.String getCreatedBy(); + /** + * + * + *
+   * Email address of the user who created this version.
+   * @OutputOnly
+   * 
+ * + * string created_by = 16; + * + * @return The bytes for createdBy. + */ + com.google.protobuf.ByteString getCreatedByBytes(); + + /** + * + * + *
+   * Time that this version was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Time that this version was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Time that this version was created.
+   * @OutputOnly
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Total size in bytes of all the files that are included in this version
+   * and currently hosted on the App Engine disk.
+   * @OutputOnly
+   * 
+ * + * int64 disk_usage_bytes = 18; + * + * @return The diskUsageBytes. + */ + long getDiskUsageBytes(); + + /** + * + * + *
+   * The version of the API in the given runtime environment. Please see the
+   * app.yaml reference for valid values at
+   * https://cloud.google.com/appengine/docs/standard/<language>/config/appref
+   * 
+ * + * string runtime_api_version = 21; + * + * @return The runtimeApiVersion. + */ + java.lang.String getRuntimeApiVersion(); + /** + * + * + *
+   * The version of the API in the given runtime environment. Please see the
+   * app.yaml reference for valid values at
+   * https://cloud.google.com/appengine/docs/standard/<language>/config/appref
+   * 
+ * + * string runtime_api_version = 21; + * + * @return The bytes for runtimeApiVersion. + */ + com.google.protobuf.ByteString getRuntimeApiVersionBytes(); + + /** + * + * + *
+   * The path or name of the app's main executable.
+   * 
+ * + * string runtime_main_executable_path = 22; + * + * @return The runtimeMainExecutablePath. + */ + java.lang.String getRuntimeMainExecutablePath(); + /** + * + * + *
+   * The path or name of the app's main executable.
+   * 
+ * + * string runtime_main_executable_path = 22; + * + * @return The bytes for runtimeMainExecutablePath. + */ + com.google.protobuf.ByteString getRuntimeMainExecutablePathBytes(); + + /** + * + * + *
+   * The identity that the deployed version will run as.
+   * Admin API will use the App Engine Appspot service account as default if
+   * this field is neither provided in app.yaml file nor through CLI flag.
+   * 
+ * + * string service_account = 127; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * The identity that the deployed version will run as.
+   * Admin API will use the App Engine Appspot service account as default if
+   * this field is neither provided in app.yaml file nor through CLI flag.
+   * 
+ * + * string service_account = 127; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + java.util.List getHandlersList(); + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + com.google.appengine.v1.UrlMap getHandlers(int index); + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + int getHandlersCount(); + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + java.util.List getHandlersOrBuilderList(); + /** + * + * + *
+   * An ordered list of URL-matching patterns that should be applied to incoming
+   * requests. The first matching URL handles the request and other request
+   * handlers are not attempted.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.UrlMap handlers = 100; + */ + com.google.appengine.v1.UrlMapOrBuilder getHandlersOrBuilder(int index); + + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + java.util.List getErrorHandlersList(); + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + com.google.appengine.v1.ErrorHandler getErrorHandlers(int index); + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + int getErrorHandlersCount(); + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + java.util.List + getErrorHandlersOrBuilderList(); + /** + * + * + *
+   * Custom static error pages. Limited to 10KB per page.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.ErrorHandler error_handlers = 101; + */ + com.google.appengine.v1.ErrorHandlerOrBuilder getErrorHandlersOrBuilder(int index); + + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + java.util.List getLibrariesList(); + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + com.google.appengine.v1.Library getLibraries(int index); + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + int getLibrariesCount(); + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + java.util.List getLibrariesOrBuilderList(); + /** + * + * + *
+   * Configuration for third-party Python runtime libraries that are required
+   * by the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * repeated .google.appengine.v1.Library libraries = 102; + */ + com.google.appengine.v1.LibraryOrBuilder getLibrariesOrBuilder(int index); + + /** + * + * + *
+   * Serving configuration for
+   * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + * + * @return Whether the apiConfig field is set. + */ + boolean hasApiConfig(); + /** + * + * + *
+   * Serving configuration for
+   * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + * + * @return The apiConfig. + */ + com.google.appengine.v1.ApiConfigHandler getApiConfig(); + /** + * + * + *
+   * Serving configuration for
+   * [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ApiConfigHandler api_config = 103; + */ + com.google.appengine.v1.ApiConfigHandlerOrBuilder getApiConfigOrBuilder(); + + /** + * + * + *
+   * Environment variables available to the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> env_variables = 104; + */ + int getEnvVariablesCount(); + /** + * + * + *
+   * Environment variables available to the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> env_variables = 104; + */ + boolean containsEnvVariables(java.lang.String key); + /** Use {@link #getEnvVariablesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getEnvVariables(); + /** + * + * + *
+   * Environment variables available to the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> env_variables = 104; + */ + java.util.Map getEnvVariablesMap(); + /** + * + * + *
+   * Environment variables available to the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> env_variables = 104; + */ + java.lang.String getEnvVariablesOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Environment variables available to the application.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> env_variables = 104; + */ + java.lang.String getEnvVariablesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Environment variables available to the build environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> build_env_variables = 125; + */ + int getBuildEnvVariablesCount(); + /** + * + * + *
+   * Environment variables available to the build environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> build_env_variables = 125; + */ + boolean containsBuildEnvVariables(java.lang.String key); + /** Use {@link #getBuildEnvVariablesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getBuildEnvVariables(); + /** + * + * + *
+   * Environment variables available to the build environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> build_env_variables = 125; + */ + java.util.Map getBuildEnvVariablesMap(); + /** + * + * + *
+   * Environment variables available to the build environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> build_env_variables = 125; + */ + java.lang.String getBuildEnvVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Environment variables available to the build environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * map<string, string> build_env_variables = 125; + */ + java.lang.String getBuildEnvVariablesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Duration that static files should be cached by web proxies and browsers.
+   * Only applicable if the corresponding
+   * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+   * does not specify its own expiration time.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.protobuf.Duration default_expiration = 105; + * + * @return Whether the defaultExpiration field is set. + */ + boolean hasDefaultExpiration(); + /** + * + * + *
+   * Duration that static files should be cached by web proxies and browsers.
+   * Only applicable if the corresponding
+   * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+   * does not specify its own expiration time.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.protobuf.Duration default_expiration = 105; + * + * @return The defaultExpiration. + */ + com.google.protobuf.Duration getDefaultExpiration(); + /** + * + * + *
+   * Duration that static files should be cached by web proxies and browsers.
+   * Only applicable if the corresponding
+   * [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler)
+   * does not specify its own expiration time.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.protobuf.Duration default_expiration = 105; + */ + com.google.protobuf.DurationOrBuilder getDefaultExpirationOrBuilder(); + + /** + * + * + *
+   * Configures health checking for instances. Unhealthy instances are
+   * stopped and replaced with new instances.
+   * Only applicable in the App Engine flexible environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + * + * @return Whether the healthCheck field is set. + */ + boolean hasHealthCheck(); + /** + * + * + *
+   * Configures health checking for instances. Unhealthy instances are
+   * stopped and replaced with new instances.
+   * Only applicable in the App Engine flexible environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + * + * @return The healthCheck. + */ + com.google.appengine.v1.HealthCheck getHealthCheck(); + /** + * + * + *
+   * Configures health checking for instances. Unhealthy instances are
+   * stopped and replaced with new instances.
+   * Only applicable in the App Engine flexible environment.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.HealthCheck health_check = 106; + */ + com.google.appengine.v1.HealthCheckOrBuilder getHealthCheckOrBuilder(); + + /** + * + * + *
+   * Configures readiness health checking for instances.
+   * Unhealthy instances are not put into the backend traffic rotation.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + * + * @return Whether the readinessCheck field is set. + */ + boolean hasReadinessCheck(); + /** + * + * + *
+   * Configures readiness health checking for instances.
+   * Unhealthy instances are not put into the backend traffic rotation.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + * + * @return The readinessCheck. + */ + com.google.appengine.v1.ReadinessCheck getReadinessCheck(); + /** + * + * + *
+   * Configures readiness health checking for instances.
+   * Unhealthy instances are not put into the backend traffic rotation.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.ReadinessCheck readiness_check = 112; + */ + com.google.appengine.v1.ReadinessCheckOrBuilder getReadinessCheckOrBuilder(); + + /** + * + * + *
+   * Configures liveness health checking for instances.
+   * Unhealthy instances are stopped and replaced with new instances
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + * + * @return Whether the livenessCheck field is set. + */ + boolean hasLivenessCheck(); + /** + * + * + *
+   * Configures liveness health checking for instances.
+   * Unhealthy instances are stopped and replaced with new instances
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + * + * @return The livenessCheck. + */ + com.google.appengine.v1.LivenessCheck getLivenessCheck(); + /** + * + * + *
+   * Configures liveness health checking for instances.
+   * Unhealthy instances are stopped and replaced with new instances
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.LivenessCheck liveness_check = 113; + */ + com.google.appengine.v1.LivenessCheckOrBuilder getLivenessCheckOrBuilder(); + + /** + * + * + *
+   * Files that match this pattern will not be built into this version.
+   * Only applicable for Go runtimes.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * string nobuild_files_regex = 107; + * + * @return The nobuildFilesRegex. + */ + java.lang.String getNobuildFilesRegex(); + /** + * + * + *
+   * Files that match this pattern will not be built into this version.
+   * Only applicable for Go runtimes.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * string nobuild_files_regex = 107; + * + * @return The bytes for nobuildFilesRegex. + */ + com.google.protobuf.ByteString getNobuildFilesRegexBytes(); + + /** + * + * + *
+   * Code and application artifacts that make up this version.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + * + * @return Whether the deployment field is set. + */ + boolean hasDeployment(); + /** + * + * + *
+   * Code and application artifacts that make up this version.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + * + * @return The deployment. + */ + com.google.appengine.v1.Deployment getDeployment(); + /** + * + * + *
+   * Code and application artifacts that make up this version.
+   * Only returned in `GET` requests if `view=FULL` is set.
+   * 
+ * + * .google.appengine.v1.Deployment deployment = 108; + */ + com.google.appengine.v1.DeploymentOrBuilder getDeploymentOrBuilder(); + + /** + * + * + *
+   * Serving URL for this version. Example:
+   * "https://myversion-dot-myservice-dot-myapp.appspot.com"
+   * @OutputOnly
+   * 
+ * + * string version_url = 109; + * + * @return The versionUrl. + */ + java.lang.String getVersionUrl(); + /** + * + * + *
+   * Serving URL for this version. Example:
+   * "https://myversion-dot-myservice-dot-myapp.appspot.com"
+   * @OutputOnly
+   * 
+ * + * string version_url = 109; + * + * @return The bytes for versionUrl. + */ + com.google.protobuf.ByteString getVersionUrlBytes(); + + /** + * + * + *
+   * Cloud Endpoints configuration.
+   * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+   * Proxy will be provided to serve the API implemented by the app.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + * + * @return Whether the endpointsApiService field is set. + */ + boolean hasEndpointsApiService(); + /** + * + * + *
+   * Cloud Endpoints configuration.
+   * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+   * Proxy will be provided to serve the API implemented by the app.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + * + * @return The endpointsApiService. + */ + com.google.appengine.v1.EndpointsApiService getEndpointsApiService(); + /** + * + * + *
+   * Cloud Endpoints configuration.
+   * If endpoints_api_service is set, the Cloud Endpoints Extensible Service
+   * Proxy will be provided to serve the API implemented by the app.
+   * 
+ * + * .google.appengine.v1.EndpointsApiService endpoints_api_service = 110; + */ + com.google.appengine.v1.EndpointsApiServiceOrBuilder getEndpointsApiServiceOrBuilder(); + + /** + * + * + *
+   * The entrypoint for the application.
+   * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + * + * @return Whether the entrypoint field is set. + */ + boolean hasEntrypoint(); + /** + * + * + *
+   * The entrypoint for the application.
+   * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + * + * @return The entrypoint. + */ + com.google.appengine.v1.Entrypoint getEntrypoint(); + /** + * + * + *
+   * The entrypoint for the application.
+   * 
+ * + * .google.appengine.v1.Entrypoint entrypoint = 122; + */ + com.google.appengine.v1.EntrypointOrBuilder getEntrypointOrBuilder(); + + /** + * + * + *
+   * Enables VPC connectivity for standard apps.
+   * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + * + * @return Whether the vpcAccessConnector field is set. + */ + boolean hasVpcAccessConnector(); + /** + * + * + *
+   * Enables VPC connectivity for standard apps.
+   * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + * + * @return The vpcAccessConnector. + */ + com.google.appengine.v1.VpcAccessConnector getVpcAccessConnector(); + /** + * + * + *
+   * Enables VPC connectivity for standard apps.
+   * 
+ * + * .google.appengine.v1.VpcAccessConnector vpc_access_connector = 121; + */ + com.google.appengine.v1.VpcAccessConnectorOrBuilder getVpcAccessConnectorOrBuilder(); + + public com.google.appengine.v1.Version.ScalingCase getScalingCase(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionProto.java new file mode 100644 index 00000000..80fce766 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VersionProto.java @@ -0,0 +1,457 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public final class VersionProto { + private VersionProto() {} + + 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_appengine_v1_Version_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Version_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Version_BetaSettingsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Version_BetaSettingsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Version_EnvVariablesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Version_EnvVariablesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Version_BuildEnvVariablesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Version_BuildEnvVariablesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_EndpointsApiService_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_EndpointsApiService_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_AutomaticScaling_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_AutomaticScaling_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_BasicScaling_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_BasicScaling_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_ManualScaling_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_ManualScaling_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_CpuUtilization_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_CpuUtilization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_RequestUtilization_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_RequestUtilization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_DiskUtilization_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_DiskUtilization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_NetworkUtilization_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_NetworkUtilization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_StandardSchedulerSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_StandardSchedulerSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Network_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Network_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Volume_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Volume_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Resources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Resources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_VpcAccessConnector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_VpcAccessConnector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_appengine_v1_Entrypoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_Entrypoint_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/appengine/v1/version.proto\022\023goo" + + "gle.appengine.v1\032\"google/appengine/v1/ap" + + "p_yaml.proto\032 google/appengine/v1/deploy" + + ".proto\032*google/appengine/v1/network_sett" + + "ings.proto\032\036google/protobuf/duration.pro" + + "to\032\037google/protobuf/timestamp.proto\032\034goo" + + "gle/api/annotations.proto\"\365\016\n\007Version\022\014\n" + + "\004name\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022B\n\021automatic_sca" + + "ling\030\003 \001(\0132%.google.appengine.v1.Automat" + + "icScalingH\000\022:\n\rbasic_scaling\030\004 \001(\0132!.goo" + + "gle.appengine.v1.BasicScalingH\000\022<\n\016manua" + + "l_scaling\030\005 \001(\0132\".google.appengine.v1.Ma" + + "nualScalingH\000\022A\n\020inbound_services\030\006 \003(\0162" + + "\'.google.appengine.v1.InboundServiceType" + + "\022\026\n\016instance_class\030\007 \001(\t\022-\n\007network\030\010 \001(" + + "\0132\034.google.appengine.v1.Network\022\r\n\005zones" + + "\030v \003(\t\0221\n\tresources\030\t \001(\0132\036.google.appen" + + "gine.v1.Resources\022\017\n\007runtime\030\n \001(\t\022\027\n\017ru" + + "ntime_channel\030u \001(\t\022\022\n\nthreadsafe\030\013 \001(\010\022" + + "\n\n\002vm\030\014 \001(\010\022E\n\rbeta_settings\030\r \003(\0132..goo" + + "gle.appengine.v1.Version.BetaSettingsEnt" + + "ry\022\013\n\003env\030\016 \001(\t\022:\n\016serving_status\030\017 \001(\0162" + + "\".google.appengine.v1.ServingStatus\022\022\n\nc" + + "reated_by\030\020 \001(\t\022/\n\013create_time\030\021 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022\030\n\020disk_usage_b" + + "ytes\030\022 \001(\003\022\033\n\023runtime_api_version\030\025 \001(\t\022" + + "$\n\034runtime_main_executable_path\030\026 \001(\t\022\027\n" + + "\017service_account\030\177 \001(\t\022-\n\010handlers\030d \003(\013" + + "2\033.google.appengine.v1.UrlMap\0229\n\016error_h" + + "andlers\030e \003(\0132!.google.appengine.v1.Erro" + + "rHandler\022/\n\tlibraries\030f \003(\0132\034.google.app" + + "engine.v1.Library\0229\n\napi_config\030g \001(\0132%." + + "google.appengine.v1.ApiConfigHandler\022E\n\r" + + "env_variables\030h \003(\0132..google.appengine.v" + + "1.Version.EnvVariablesEntry\022P\n\023build_env" + + "_variables\030} \003(\01323.google.appengine.v1.V" + + "ersion.BuildEnvVariablesEntry\0225\n\022default" + + "_expiration\030i \001(\0132\031.google.protobuf.Dura" + + "tion\0226\n\014health_check\030j \001(\0132 .google.appe" + + "ngine.v1.HealthCheck\022<\n\017readiness_check\030" + + "p \001(\0132#.google.appengine.v1.ReadinessChe" + + "ck\022:\n\016liveness_check\030q \001(\0132\".google.appe" + + "ngine.v1.LivenessCheck\022\033\n\023nobuild_files_" + + "regex\030k \001(\t\0223\n\ndeployment\030l \001(\0132\037.google" + + ".appengine.v1.Deployment\022\023\n\013version_url\030" + + "m \001(\t\022G\n\025endpoints_api_service\030n \001(\0132(.g" + + "oogle.appengine.v1.EndpointsApiService\0223" + + "\n\nentrypoint\030z \001(\0132\037.google.appengine.v1" + + ".Entrypoint\022E\n\024vpc_access_connector\030y \001(" + + "\0132\'.google.appengine.v1.VpcAccessConnect" + + "or\0323\n\021BetaSettingsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001\0323\n\021EnvVariablesEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0328\n\026BuildEnv" + + "VariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001B\t\n\007scaling\"\367\001\n\023EndpointsApiServic" + + "e\022\014\n\004name\030\001 \001(\t\022\021\n\tconfig_id\030\002 \001(\t\022R\n\020ro" + + "llout_strategy\030\003 \001(\01628.google.appengine." + + "v1.EndpointsApiService.RolloutStrategy\022\036" + + "\n\026disable_trace_sampling\030\004 \001(\010\"K\n\017Rollou" + + "tStrategy\022 \n\034UNSPECIFIED_ROLLOUT_STRATEG" + + "Y\020\000\022\t\n\005FIXED\020\001\022\013\n\007MANAGED\020\002\"\251\005\n\020Automati" + + "cScaling\0223\n\020cool_down_period\030\001 \001(\0132\031.goo" + + "gle.protobuf.Duration\022<\n\017cpu_utilization" + + "\030\002 \001(\0132#.google.appengine.v1.CpuUtilizat" + + "ion\022\037\n\027max_concurrent_requests\030\003 \001(\005\022\032\n\022" + + "max_idle_instances\030\004 \001(\005\022\033\n\023max_total_in" + + "stances\030\005 \001(\005\0226\n\023max_pending_latency\030\006 \001" + + "(\0132\031.google.protobuf.Duration\022\032\n\022min_idl" + + "e_instances\030\007 \001(\005\022\033\n\023min_total_instances" + + "\030\010 \001(\005\0226\n\023min_pending_latency\030\t \001(\0132\031.go" + + "ogle.protobuf.Duration\022D\n\023request_utiliz" + + "ation\030\n \001(\0132\'.google.appengine.v1.Reques" + + "tUtilization\022>\n\020disk_utilization\030\013 \001(\0132$" + + ".google.appengine.v1.DiskUtilization\022D\n\023" + + "network_utilization\030\014 \001(\0132\'.google.appen" + + "gine.v1.NetworkUtilization\022S\n\033standard_s" + + "cheduler_settings\030\024 \001(\0132..google.appengi" + + "ne.v1.StandardSchedulerSettings\"V\n\014Basic" + + "Scaling\022/\n\014idle_timeout\030\001 \001(\0132\031.google.p" + + "rotobuf.Duration\022\025\n\rmax_instances\030\002 \001(\005\"" + + "\"\n\rManualScaling\022\021\n\tinstances\030\001 \001(\005\"j\n\016C" + + "puUtilization\022<\n\031aggregation_window_leng" + + "th\030\001 \001(\0132\031.google.protobuf.Duration\022\032\n\022t" + + "arget_utilization\030\002 \001(\001\"a\n\022RequestUtiliz" + + "ation\022\'\n\037target_request_count_per_second" + + "\030\001 \001(\005\022\"\n\032target_concurrent_requests\030\002 \001" + + "(\005\"\247\001\n\017DiskUtilization\022%\n\035target_write_b" + + "ytes_per_second\030\016 \001(\005\022#\n\033target_write_op" + + "s_per_second\030\017 \001(\005\022$\n\034target_read_bytes_" + + "per_second\030\020 \001(\005\022\"\n\032target_read_ops_per_" + + "second\030\021 \001(\005\"\270\001\n\022NetworkUtilization\022$\n\034t" + + "arget_sent_bytes_per_second\030\001 \001(\005\022&\n\036tar" + + "get_sent_packets_per_second\030\013 \001(\005\022(\n tar" + + "get_received_bytes_per_second\030\014 \001(\005\022*\n\"t" + + "arget_received_packets_per_second\030\r \001(\005\"" + + "\220\001\n\031StandardSchedulerSettings\022\036\n\026target_" + + "cpu_utilization\030\001 \001(\001\022%\n\035target_throughp" + + "ut_utilization\030\002 \001(\001\022\025\n\rmin_instances\030\003 " + + "\001(\005\022\025\n\rmax_instances\030\004 \001(\005\"y\n\007Network\022\027\n" + + "\017forwarded_ports\030\001 \003(\t\022\024\n\014instance_tag\030\002" + + " \001(\t\022\014\n\004name\030\003 \001(\t\022\027\n\017subnetwork_name\030\004 " + + "\001(\t\022\030\n\020session_affinity\030\005 \001(\010\"<\n\006Volume\022" + + "\014\n\004name\030\001 \001(\t\022\023\n\013volume_type\030\002 \001(\t\022\017\n\007si" + + "ze_gb\030\003 \001(\001\"\205\001\n\tResources\022\013\n\003cpu\030\001 \001(\001\022\017" + + "\n\007disk_gb\030\002 \001(\001\022\021\n\tmemory_gb\030\003 \001(\001\022,\n\007vo" + + "lumes\030\004 \003(\0132\033.google.appengine.v1.Volume" + + "\022\031\n\021kms_key_reference\030\005 \001(\t\"\"\n\022VpcAccess" + + "Connector\022\014\n\004name\030\001 \001(\t\"(\n\nEntrypoint\022\017\n" + + "\005shell\030\001 \001(\tH\000B\t\n\007command*\273\002\n\022InboundSer" + + "viceType\022\037\n\033INBOUND_SERVICE_UNSPECIFIED\020" + + "\000\022\030\n\024INBOUND_SERVICE_MAIL\020\001\022\037\n\033INBOUND_S" + + "ERVICE_MAIL_BOUNCE\020\002\022\036\n\032INBOUND_SERVICE_" + + "XMPP_ERROR\020\003\022 \n\034INBOUND_SERVICE_XMPP_MES" + + "SAGE\020\004\022\"\n\036INBOUND_SERVICE_XMPP_SUBSCRIBE" + + "\020\005\022!\n\035INBOUND_SERVICE_XMPP_PRESENCE\020\006\022$\n" + + " INBOUND_SERVICE_CHANNEL_PRESENCE\020\007\022\032\n\026I" + + "NBOUND_SERVICE_WARMUP\020\t*I\n\rServingStatus" + + "\022\036\n\032SERVING_STATUS_UNSPECIFIED\020\000\022\013\n\007SERV" + + "ING\020\001\022\013\n\007STOPPED\020\002B\276\001\n\027com.google.appeng" + + "ine.v1B\014VersionProtoP\001Z + * Fields that should be returned when [Version][google.appengine.v1.Version] resources + * are retrieved. + * + * + * Protobuf enum {@code google.appengine.v1.VersionView} + */ +public enum VersionView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Basic version information including scaling and inbound services,
+   * but not detailed deployment information.
+   * 
+ * + * BASIC = 0; + */ + BASIC(0), + /** + * + * + *
+   * The information from `BASIC`, plus detailed information about the
+   * deployment. This format is required when creating resources, but
+   * is not returned in `Get` or `List` by default.
+   * 
+ * + * FULL = 1; + */ + FULL(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Basic version information including scaling and inbound services,
+   * but not detailed deployment information.
+   * 
+ * + * BASIC = 0; + */ + public static final int BASIC_VALUE = 0; + /** + * + * + *
+   * The information from `BASIC`, plus detailed information about the
+   * deployment. This format is required when creating resources, but
+   * is not returned in `Get` or `List` by default.
+   * 
+ * + * FULL = 1; + */ + public static final int FULL_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VersionView 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 VersionView forNumber(int value) { + switch (value) { + case 0: + return BASIC; + case 1: + return FULL; + 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 VersionView findValueByNumber(int number) { + return VersionView.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.appengine.v1.AppengineProto.getDescriptor().getEnumTypes().get(0); + } + + private static final VersionView[] VALUES = values(); + + public static VersionView 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 VersionView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.VersionView) +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Volume.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Volume.java new file mode 100644 index 00000000..745915c9 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/Volume.java @@ -0,0 +1,903 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * Volumes mounted within the app container.
+ * Only applicable in the App Engine flexible environment.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.Volume} + */ +public final class Volume extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.Volume) + VolumeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Volume.newBuilder() to construct. + private Volume(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Volume() { + name_ = ""; + volumeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Volume(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Volume( + 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; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + volumeType_ = s; + break; + } + case 25: + { + sizeGb_ = input.readDouble(); + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Volume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Volume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Volume.class, com.google.appengine.v1.Volume.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Unique name for the volume.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Unique name for the volume.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VOLUME_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object volumeType_; + /** + * + * + *
+   * Underlying volume type, e.g. 'tmpfs'.
+   * 
+ * + * string volume_type = 2; + * + * @return The volumeType. + */ + @java.lang.Override + public java.lang.String getVolumeType() { + java.lang.Object ref = volumeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volumeType_ = s; + return s; + } + } + /** + * + * + *
+   * Underlying volume type, e.g. 'tmpfs'.
+   * 
+ * + * string volume_type = 2; + * + * @return The bytes for volumeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVolumeTypeBytes() { + java.lang.Object ref = volumeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + volumeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_GB_FIELD_NUMBER = 3; + private double sizeGb_; + /** + * + * + *
+   * Volume size in gigabytes.
+   * 
+ * + * double size_gb = 3; + * + * @return The sizeGb. + */ + @java.lang.Override + public double getSizeGb() { + return sizeGb_; + } + + 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 (!getVolumeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, volumeType_); + } + if (sizeGb_ != 0D) { + output.writeDouble(3, sizeGb_); + } + 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 (!getVolumeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, volumeType_); + } + if (sizeGb_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, sizeGb_); + } + 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.appengine.v1.Volume)) { + return super.equals(obj); + } + com.google.appengine.v1.Volume other = (com.google.appengine.v1.Volume) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVolumeType().equals(other.getVolumeType())) return false; + if (java.lang.Double.doubleToLongBits(getSizeGb()) + != java.lang.Double.doubleToLongBits(other.getSizeGb())) 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) + VOLUME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getVolumeType().hashCode(); + hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getSizeGb())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.Volume parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Volume parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Volume parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Volume 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.appengine.v1.Volume parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.Volume parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.Volume parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Volume 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.appengine.v1.Volume parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Volume 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.appengine.v1.Volume parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.Volume 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.appengine.v1.Volume 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; + } + /** + * + * + *
+   * Volumes mounted within the app container.
+   * Only applicable in the App Engine flexible environment.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.Volume} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.Volume) + com.google.appengine.v1.VolumeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Volume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Volume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.Volume.class, com.google.appengine.v1.Volume.Builder.class); + } + + // Construct using com.google.appengine.v1.Volume.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_ = ""; + + volumeType_ = ""; + + sizeGb_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_Volume_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.Volume getDefaultInstanceForType() { + return com.google.appengine.v1.Volume.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.Volume build() { + com.google.appengine.v1.Volume result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.Volume buildPartial() { + com.google.appengine.v1.Volume result = new com.google.appengine.v1.Volume(this); + result.name_ = name_; + result.volumeType_ = volumeType_; + result.sizeGb_ = sizeGb_; + 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.appengine.v1.Volume) { + return mergeFrom((com.google.appengine.v1.Volume) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.Volume other) { + if (other == com.google.appengine.v1.Volume.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVolumeType().isEmpty()) { + volumeType_ = other.volumeType_; + onChanged(); + } + if (other.getSizeGb() != 0D) { + setSizeGb(other.getSizeGb()); + } + 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.appengine.v1.Volume parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.Volume) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Unique name for the volume.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique name for the volume.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique name for the volume.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique name for the volume.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique name for the volume.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object volumeType_ = ""; + /** + * + * + *
+     * Underlying volume type, e.g. 'tmpfs'.
+     * 
+ * + * string volume_type = 2; + * + * @return The volumeType. + */ + public java.lang.String getVolumeType() { + java.lang.Object ref = volumeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volumeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Underlying volume type, e.g. 'tmpfs'.
+     * 
+ * + * string volume_type = 2; + * + * @return The bytes for volumeType. + */ + public com.google.protobuf.ByteString getVolumeTypeBytes() { + java.lang.Object ref = volumeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + volumeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Underlying volume type, e.g. 'tmpfs'.
+     * 
+ * + * string volume_type = 2; + * + * @param value The volumeType to set. + * @return This builder for chaining. + */ + public Builder setVolumeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + volumeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Underlying volume type, e.g. 'tmpfs'.
+     * 
+ * + * string volume_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearVolumeType() { + + volumeType_ = getDefaultInstance().getVolumeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Underlying volume type, e.g. 'tmpfs'.
+     * 
+ * + * string volume_type = 2; + * + * @param value The bytes for volumeType to set. + * @return This builder for chaining. + */ + public Builder setVolumeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + volumeType_ = value; + onChanged(); + return this; + } + + private double sizeGb_; + /** + * + * + *
+     * Volume size in gigabytes.
+     * 
+ * + * double size_gb = 3; + * + * @return The sizeGb. + */ + @java.lang.Override + public double getSizeGb() { + return sizeGb_; + } + /** + * + * + *
+     * Volume size in gigabytes.
+     * 
+ * + * double size_gb = 3; + * + * @param value The sizeGb to set. + * @return This builder for chaining. + */ + public Builder setSizeGb(double value) { + + sizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Volume size in gigabytes.
+     * 
+ * + * double size_gb = 3; + * + * @return This builder for chaining. + */ + public Builder clearSizeGb() { + + sizeGb_ = 0D; + 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.appengine.v1.Volume) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.Volume) + private static final com.google.appengine.v1.Volume DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.Volume(); + } + + public static com.google.appengine.v1.Volume getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Volume parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Volume(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.appengine.v1.Volume getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VolumeOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VolumeOrBuilder.java new file mode 100644 index 00000000..4ae1b9ea --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VolumeOrBuilder.java @@ -0,0 +1,88 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface VolumeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.Volume) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Unique name for the volume.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Unique name for the volume.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Underlying volume type, e.g. 'tmpfs'.
+   * 
+ * + * string volume_type = 2; + * + * @return The volumeType. + */ + java.lang.String getVolumeType(); + /** + * + * + *
+   * Underlying volume type, e.g. 'tmpfs'.
+   * 
+ * + * string volume_type = 2; + * + * @return The bytes for volumeType. + */ + com.google.protobuf.ByteString getVolumeTypeBytes(); + + /** + * + * + *
+   * Volume size in gigabytes.
+   * 
+ * + * double size_gb = 3; + * + * @return The sizeGb. + */ + double getSizeGb(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VpcAccessConnector.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VpcAccessConnector.java new file mode 100644 index 00000000..23411bfe --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VpcAccessConnector.java @@ -0,0 +1,641 @@ +/* + * 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/appengine/v1/version.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * VPC access connector specification.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.VpcAccessConnector} + */ +public final class VpcAccessConnector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.VpcAccessConnector) + VpcAccessConnectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use VpcAccessConnector.newBuilder() to construct. + private VpcAccessConnector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpcAccessConnector() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpcAccessConnector(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VpcAccessConnector( + 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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_VpcAccessConnector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_VpcAccessConnector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.VpcAccessConnector.class, + com.google.appengine.v1.VpcAccessConnector.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Full Serverless VPC Access Connector name e.g.
+   * /projects/my-project/locations/us-central1/connectors/c1.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Full Serverless VPC Access Connector name e.g.
+   * /projects/my-project/locations/us-central1/connectors/c1.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.appengine.v1.VpcAccessConnector)) { + return super.equals(obj); + } + com.google.appengine.v1.VpcAccessConnector other = + (com.google.appengine.v1.VpcAccessConnector) 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.appengine.v1.VpcAccessConnector parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.VpcAccessConnector parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.VpcAccessConnector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.VpcAccessConnector 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.appengine.v1.VpcAccessConnector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.VpcAccessConnector parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.VpcAccessConnector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.VpcAccessConnector 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.appengine.v1.VpcAccessConnector parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.VpcAccessConnector 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.appengine.v1.VpcAccessConnector parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.VpcAccessConnector 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.appengine.v1.VpcAccessConnector 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; + } + /** + * + * + *
+   * VPC access connector specification.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.VpcAccessConnector} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.VpcAccessConnector) + com.google.appengine.v1.VpcAccessConnectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_VpcAccessConnector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.VersionProto + .internal_static_google_appengine_v1_VpcAccessConnector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.VpcAccessConnector.class, + com.google.appengine.v1.VpcAccessConnector.Builder.class); + } + + // Construct using com.google.appengine.v1.VpcAccessConnector.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.appengine.v1.VersionProto + .internal_static_google_appengine_v1_VpcAccessConnector_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.VpcAccessConnector getDefaultInstanceForType() { + return com.google.appengine.v1.VpcAccessConnector.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.VpcAccessConnector build() { + com.google.appengine.v1.VpcAccessConnector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.VpcAccessConnector buildPartial() { + com.google.appengine.v1.VpcAccessConnector result = + new com.google.appengine.v1.VpcAccessConnector(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.appengine.v1.VpcAccessConnector) { + return mergeFrom((com.google.appengine.v1.VpcAccessConnector) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.VpcAccessConnector other) { + if (other == com.google.appengine.v1.VpcAccessConnector.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.appengine.v1.VpcAccessConnector parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.VpcAccessConnector) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Full Serverless VPC Access Connector name e.g.
+     * /projects/my-project/locations/us-central1/connectors/c1.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Full Serverless VPC Access Connector name e.g.
+     * /projects/my-project/locations/us-central1/connectors/c1.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Full Serverless VPC Access Connector name e.g.
+     * /projects/my-project/locations/us-central1/connectors/c1.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Full Serverless VPC Access Connector name e.g.
+     * /projects/my-project/locations/us-central1/connectors/c1.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Full Serverless VPC Access Connector name e.g.
+     * /projects/my-project/locations/us-central1/connectors/c1.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.appengine.v1.VpcAccessConnector) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.VpcAccessConnector) + private static final com.google.appengine.v1.VpcAccessConnector DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.VpcAccessConnector(); + } + + public static com.google.appengine.v1.VpcAccessConnector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpcAccessConnector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VpcAccessConnector(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.appengine.v1.VpcAccessConnector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VpcAccessConnectorOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VpcAccessConnectorOrBuilder.java new file mode 100644 index 00000000..7585e02e --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/VpcAccessConnectorOrBuilder.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/appengine/v1/version.proto + +package com.google.appengine.v1; + +public interface VpcAccessConnectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.VpcAccessConnector) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Full Serverless VPC Access Connector name e.g.
+   * /projects/my-project/locations/us-central1/connectors/c1.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Full Serverless VPC Access Connector name e.g.
+   * /projects/my-project/locations/us-central1/connectors/c1.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ZipInfo.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ZipInfo.java new file mode 100644 index 00000000..e32c2d4a --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ZipInfo.java @@ -0,0 +1,741 @@ +/* + * 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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +/** + * + * + *
+ * The zip file information for a zip deployment.
+ * 
+ * + * Protobuf type {@code google.appengine.v1.ZipInfo} + */ +public final class ZipInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.ZipInfo) + ZipInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ZipInfo.newBuilder() to construct. + private ZipInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ZipInfo() { + sourceUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ZipInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ZipInfo( + 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 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceUrl_ = s; + break; + } + case 32: + { + filesCount_ = input.readInt32(); + 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.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ZipInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ZipInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ZipInfo.class, com.google.appengine.v1.ZipInfo.Builder.class); + } + + public static final int SOURCE_URL_FIELD_NUMBER = 3; + private volatile java.lang.Object sourceUrl_; + /** + * + * + *
+   * URL of the zip file to deploy from. Must be a URL to a resource in
+   * Google Cloud Storage in the form
+   * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+   * 
+ * + * string source_url = 3; + * + * @return The sourceUrl. + */ + @java.lang.Override + public java.lang.String getSourceUrl() { + java.lang.Object ref = sourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceUrl_ = s; + return s; + } + } + /** + * + * + *
+   * URL of the zip file to deploy from. Must be a URL to a resource in
+   * Google Cloud Storage in the form
+   * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+   * 
+ * + * string source_url = 3; + * + * @return The bytes for sourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceUrlBytes() { + java.lang.Object ref = sourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILES_COUNT_FIELD_NUMBER = 4; + private int filesCount_; + /** + * + * + *
+   * An estimate of the number of files in a zip for a zip deployment.
+   * If set, must be greater than or equal to the actual number of files.
+   * Used for optimizing performance; if not provided, deployment may be slow.
+   * 
+ * + * int32 files_count = 4; + * + * @return The filesCount. + */ + @java.lang.Override + public int getFilesCount() { + return filesCount_; + } + + 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 (!getSourceUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceUrl_); + } + if (filesCount_ != 0) { + output.writeInt32(4, filesCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceUrl_); + } + if (filesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, filesCount_); + } + 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.appengine.v1.ZipInfo)) { + return super.equals(obj); + } + com.google.appengine.v1.ZipInfo other = (com.google.appengine.v1.ZipInfo) obj; + + if (!getSourceUrl().equals(other.getSourceUrl())) return false; + if (getFilesCount() != other.getFilesCount()) 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_URL_FIELD_NUMBER; + hash = (53 * hash) + getSourceUrl().hashCode(); + hash = (37 * hash) + FILES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getFilesCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.ZipInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ZipInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ZipInfo parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ZipInfo 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.appengine.v1.ZipInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.ZipInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.ZipInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ZipInfo 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.appengine.v1.ZipInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ZipInfo 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.appengine.v1.ZipInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.ZipInfo 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.appengine.v1.ZipInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The zip file information for a zip deployment.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.ZipInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.ZipInfo) + com.google.appengine.v1.ZipInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ZipInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ZipInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.ZipInfo.class, com.google.appengine.v1.ZipInfo.Builder.class); + } + + // Construct using com.google.appengine.v1.ZipInfo.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(); + sourceUrl_ = ""; + + filesCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.DeployProto + .internal_static_google_appengine_v1_ZipInfo_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.ZipInfo getDefaultInstanceForType() { + return com.google.appengine.v1.ZipInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.ZipInfo build() { + com.google.appengine.v1.ZipInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.ZipInfo buildPartial() { + com.google.appengine.v1.ZipInfo result = new com.google.appengine.v1.ZipInfo(this); + result.sourceUrl_ = sourceUrl_; + result.filesCount_ = filesCount_; + 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.appengine.v1.ZipInfo) { + return mergeFrom((com.google.appengine.v1.ZipInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.ZipInfo other) { + if (other == com.google.appengine.v1.ZipInfo.getDefaultInstance()) return this; + if (!other.getSourceUrl().isEmpty()) { + sourceUrl_ = other.sourceUrl_; + onChanged(); + } + if (other.getFilesCount() != 0) { + setFilesCount(other.getFilesCount()); + } + 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.appengine.v1.ZipInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.ZipInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sourceUrl_ = ""; + /** + * + * + *
+     * URL of the zip file to deploy from. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 3; + * + * @return The sourceUrl. + */ + public java.lang.String getSourceUrl() { + java.lang.Object ref = sourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URL of the zip file to deploy from. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 3; + * + * @return The bytes for sourceUrl. + */ + public com.google.protobuf.ByteString getSourceUrlBytes() { + java.lang.Object ref = sourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URL of the zip file to deploy from. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 3; + * + * @param value The sourceUrl to set. + * @return This builder for chaining. + */ + public Builder setSourceUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URL of the zip file to deploy from. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 3; + * + * @return This builder for chaining. + */ + public Builder clearSourceUrl() { + + sourceUrl_ = getDefaultInstance().getSourceUrl(); + onChanged(); + return this; + } + /** + * + * + *
+     * URL of the zip file to deploy from. Must be a URL to a resource in
+     * Google Cloud Storage in the form
+     * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+     * 
+ * + * string source_url = 3; + * + * @param value The bytes for sourceUrl to set. + * @return This builder for chaining. + */ + public Builder setSourceUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceUrl_ = value; + onChanged(); + return this; + } + + private int filesCount_; + /** + * + * + *
+     * An estimate of the number of files in a zip for a zip deployment.
+     * If set, must be greater than or equal to the actual number of files.
+     * Used for optimizing performance; if not provided, deployment may be slow.
+     * 
+ * + * int32 files_count = 4; + * + * @return The filesCount. + */ + @java.lang.Override + public int getFilesCount() { + return filesCount_; + } + /** + * + * + *
+     * An estimate of the number of files in a zip for a zip deployment.
+     * If set, must be greater than or equal to the actual number of files.
+     * Used for optimizing performance; if not provided, deployment may be slow.
+     * 
+ * + * int32 files_count = 4; + * + * @param value The filesCount to set. + * @return This builder for chaining. + */ + public Builder setFilesCount(int value) { + + filesCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An estimate of the number of files in a zip for a zip deployment.
+     * If set, must be greater than or equal to the actual number of files.
+     * Used for optimizing performance; if not provided, deployment may be slow.
+     * 
+ * + * int32 files_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilesCount() { + + filesCount_ = 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.appengine.v1.ZipInfo) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.ZipInfo) + private static final com.google.appengine.v1.ZipInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.ZipInfo(); + } + + public static com.google.appengine.v1.ZipInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ZipInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ZipInfo(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.appengine.v1.ZipInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ZipInfoOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ZipInfoOrBuilder.java new file mode 100644 index 00000000..1b221b2d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/ZipInfoOrBuilder.java @@ -0,0 +1,69 @@ +/* + * 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/appengine/v1/deploy.proto + +package com.google.appengine.v1; + +public interface ZipInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.ZipInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URL of the zip file to deploy from. Must be a URL to a resource in
+   * Google Cloud Storage in the form
+   * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+   * 
+ * + * string source_url = 3; + * + * @return The sourceUrl. + */ + java.lang.String getSourceUrl(); + /** + * + * + *
+   * URL of the zip file to deploy from. Must be a URL to a resource in
+   * Google Cloud Storage in the form
+   * 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
+   * 
+ * + * string source_url = 3; + * + * @return The bytes for sourceUrl. + */ + com.google.protobuf.ByteString getSourceUrlBytes(); + + /** + * + * + *
+   * An estimate of the number of files in a zip for a zip deployment.
+   * If set, must be greater than or equal to the actual number of files.
+   * Used for optimizing performance; if not provided, deployment may be slow.
+   * 
+ * + * int32 files_count = 4; + * + * @return The filesCount. + */ + int getFilesCount(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/firewall/FirewallProto.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/firewall/FirewallProto.java new file mode 100644 index 00000000..1a28ae78 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/firewall/FirewallProto.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/appengine/v1/firewall.proto + +package com.google.appengine.v1.firewall; + +public final class FirewallProto { + private FirewallProto() {} + + 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_appengine_v1_FirewallRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_appengine_v1_FirewallRule_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/appengine/v1/firewall.proto\022\023go" + + "ogle.appengine.v1\032\034google/api/annotation" + + "s.proto\"\274\001\n\014FirewallRule\022\020\n\010priority\030\001 \001" + + "(\005\0228\n\006action\030\002 \001(\0162(.google.appengine.v1" + + ".FirewallRule.Action\022\024\n\014source_range\030\003 \001" + + "(\t\022\023\n\013description\030\004 \001(\t\"5\n\006Action\022\026\n\022UNS" + + "PECIFIED_ACTION\020\000\022\t\n\005ALLOW\020\001\022\010\n\004DENY\020\002B\310" + + "\001\n com.google.appengine.v1.firewallB\rFir" + + "ewallProtoP\001Z + * A single firewall rule that is evaluated against incoming traffic + * and provides an action to take on matched requests. + * + * + * Protobuf type {@code google.appengine.v1.FirewallRule} + */ +public final class FirewallRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.appengine.v1.FirewallRule) + FirewallRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirewallRule.newBuilder() to construct. + private FirewallRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FirewallRule() { + action_ = 0; + sourceRange_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FirewallRule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FirewallRule( + 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: + { + priority_ = input.readInt32(); + break; + } + case 16: + { + int rawValue = input.readEnum(); + + action_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceRange_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = 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.appengine.v1.firewall.FirewallProto + .internal_static_google_appengine_v1_FirewallRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.firewall.FirewallProto + .internal_static_google_appengine_v1_FirewallRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.firewall.FirewallRule.class, + com.google.appengine.v1.firewall.FirewallRule.Builder.class); + } + + /** + * + * + *
+   * Available actions to take on matching requests.
+   * 
+ * + * Protobuf enum {@code google.appengine.v1.FirewallRule.Action} + */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** UNSPECIFIED_ACTION = 0; */ + UNSPECIFIED_ACTION(0), + /** + * + * + *
+     * Matching requests are allowed.
+     * 
+ * + * ALLOW = 1; + */ + ALLOW(1), + /** + * + * + *
+     * Matching requests are denied.
+     * 
+ * + * DENY = 2; + */ + DENY(2), + UNRECOGNIZED(-1), + ; + + /** UNSPECIFIED_ACTION = 0; */ + public static final int UNSPECIFIED_ACTION_VALUE = 0; + /** + * + * + *
+     * Matching requests are allowed.
+     * 
+ * + * ALLOW = 1; + */ + public static final int ALLOW_VALUE = 1; + /** + * + * + *
+     * Matching requests are denied.
+     * 
+ * + * DENY = 2; + */ + public static final int DENY_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 Action 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 Action forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED_ACTION; + case 1: + return ALLOW; + case 2: + return DENY; + 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 Action findValueByNumber(int number) { + return Action.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.appengine.v1.firewall.FirewallRule.getDescriptor().getEnumTypes().get(0); + } + + private static final Action[] VALUES = values(); + + public static Action 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 Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.appengine.v1.FirewallRule.Action) + } + + public static final int PRIORITY_FIELD_NUMBER = 1; + private int priority_; + /** + * + * + *
+   * A positive integer between [1, Int32.MaxValue-1] that defines the order of
+   * rule evaluation. Rules with the lowest priority are evaluated first.
+   * A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic
+   * when no previous rule matches. Only the action of this rule can be modified
+   * by the user.
+   * 
+ * + * int32 priority = 1; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int ACTION_FIELD_NUMBER = 2; + private int action_; + /** + * + * + *
+   * The action to take on matched requests.
+   * 
+ * + * .google.appengine.v1.FirewallRule.Action action = 2; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+   * The action to take on matched requests.
+   * 
+ * + * .google.appengine.v1.FirewallRule.Action action = 2; + * + * @return The action. + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule.Action getAction() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.firewall.FirewallRule.Action result = + com.google.appengine.v1.firewall.FirewallRule.Action.valueOf(action_); + return result == null + ? com.google.appengine.v1.firewall.FirewallRule.Action.UNRECOGNIZED + : result; + } + + public static final int SOURCE_RANGE_FIELD_NUMBER = 3; + private volatile java.lang.Object sourceRange_; + /** + * + * + *
+   * IP address or range, defined using CIDR notation, of requests that this
+   * rule applies to. You can use the wildcard character "*" to match all IPs
+   * equivalent to "0/0" and "::/0" together.
+   * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+   *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+   * <p>Truncation will be silently performed on addresses which are not
+   * properly truncated. For example, `1.2.3.4/24` is accepted as the same
+   * address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted
+   * as the same address as `2001:db8::/32`.
+   * 
+ * + * string source_range = 3; + * + * @return The sourceRange. + */ + @java.lang.Override + public java.lang.String getSourceRange() { + java.lang.Object ref = sourceRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceRange_ = s; + return s; + } + } + /** + * + * + *
+   * IP address or range, defined using CIDR notation, of requests that this
+   * rule applies to. You can use the wildcard character "*" to match all IPs
+   * equivalent to "0/0" and "::/0" together.
+   * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+   *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+   * <p>Truncation will be silently performed on addresses which are not
+   * properly truncated. For example, `1.2.3.4/24` is accepted as the same
+   * address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted
+   * as the same address as `2001:db8::/32`.
+   * 
+ * + * string source_range = 3; + * + * @return The bytes for sourceRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceRangeBytes() { + java.lang.Object ref = sourceRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + * + * + *
+   * An optional string description of this rule.
+   * This field has a maximum length of 100 characters.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * An optional string description of this rule.
+   * This field has a maximum length of 100 characters.
+   * 
+ * + * string description = 4; + * + * @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; + } + } + + 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 (priority_ != 0) { + output.writeInt32(1, priority_); + } + if (action_ + != com.google.appengine.v1.firewall.FirewallRule.Action.UNSPECIFIED_ACTION.getNumber()) { + output.writeEnum(2, action_); + } + if (!getSourceRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceRange_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, priority_); + } + if (action_ + != com.google.appengine.v1.firewall.FirewallRule.Action.UNSPECIFIED_ACTION.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, action_); + } + if (!getSourceRangeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceRange_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + 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.appengine.v1.firewall.FirewallRule)) { + return super.equals(obj); + } + com.google.appengine.v1.firewall.FirewallRule other = + (com.google.appengine.v1.firewall.FirewallRule) obj; + + if (getPriority() != other.getPriority()) return false; + if (action_ != other.action_) return false; + if (!getSourceRange().equals(other.getSourceRange())) return false; + if (!getDescription().equals(other.getDescription())) 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) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + hash = (37 * hash) + SOURCE_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getSourceRange().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.appengine.v1.firewall.FirewallRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.firewall.FirewallRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.firewall.FirewallRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.firewall.FirewallRule 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.appengine.v1.firewall.FirewallRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.appengine.v1.firewall.FirewallRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.appengine.v1.firewall.FirewallRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.firewall.FirewallRule 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.appengine.v1.firewall.FirewallRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.firewall.FirewallRule 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.appengine.v1.firewall.FirewallRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.appengine.v1.firewall.FirewallRule 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.appengine.v1.firewall.FirewallRule 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 single firewall rule that is evaluated against incoming traffic
+   * and provides an action to take on matched requests.
+   * 
+ * + * Protobuf type {@code google.appengine.v1.FirewallRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.appengine.v1.FirewallRule) + com.google.appengine.v1.firewall.FirewallRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.appengine.v1.firewall.FirewallProto + .internal_static_google_appengine_v1_FirewallRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.appengine.v1.firewall.FirewallProto + .internal_static_google_appengine_v1_FirewallRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.appengine.v1.firewall.FirewallRule.class, + com.google.appengine.v1.firewall.FirewallRule.Builder.class); + } + + // Construct using com.google.appengine.v1.firewall.FirewallRule.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(); + priority_ = 0; + + action_ = 0; + + sourceRange_ = ""; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.appengine.v1.firewall.FirewallProto + .internal_static_google_appengine_v1_FirewallRule_descriptor; + } + + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule getDefaultInstanceForType() { + return com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule build() { + com.google.appengine.v1.firewall.FirewallRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule buildPartial() { + com.google.appengine.v1.firewall.FirewallRule result = + new com.google.appengine.v1.firewall.FirewallRule(this); + result.priority_ = priority_; + result.action_ = action_; + result.sourceRange_ = sourceRange_; + result.description_ = description_; + 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.appengine.v1.firewall.FirewallRule) { + return mergeFrom((com.google.appengine.v1.firewall.FirewallRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.appengine.v1.firewall.FirewallRule other) { + if (other == com.google.appengine.v1.firewall.FirewallRule.getDefaultInstance()) return this; + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (!other.getSourceRange().isEmpty()) { + sourceRange_ = other.sourceRange_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + 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.appengine.v1.firewall.FirewallRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.appengine.v1.firewall.FirewallRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int priority_; + /** + * + * + *
+     * A positive integer between [1, Int32.MaxValue-1] that defines the order of
+     * rule evaluation. Rules with the lowest priority are evaluated first.
+     * A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic
+     * when no previous rule matches. Only the action of this rule can be modified
+     * by the user.
+     * 
+ * + * int32 priority = 1; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + /** + * + * + *
+     * A positive integer between [1, Int32.MaxValue-1] that defines the order of
+     * rule evaluation. Rules with the lowest priority are evaluated first.
+     * A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic
+     * when no previous rule matches. Only the action of this rule can be modified
+     * by the user.
+     * 
+ * + * int32 priority = 1; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A positive integer between [1, Int32.MaxValue-1] that defines the order of
+     * rule evaluation. Rules with the lowest priority are evaluated first.
+     * A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic
+     * when no previous rule matches. Only the action of this rule can be modified
+     * by the user.
+     * 
+ * + * int32 priority = 1; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + + priority_ = 0; + onChanged(); + return this; + } + + private int action_ = 0; + /** + * + * + *
+     * The action to take on matched requests.
+     * 
+ * + * .google.appengine.v1.FirewallRule.Action action = 2; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+     * The action to take on matched requests.
+     * 
+ * + * .google.appengine.v1.FirewallRule.Action action = 2; + * + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + + action_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The action to take on matched requests.
+     * 
+ * + * .google.appengine.v1.FirewallRule.Action action = 2; + * + * @return The action. + */ + @java.lang.Override + public com.google.appengine.v1.firewall.FirewallRule.Action getAction() { + @SuppressWarnings("deprecation") + com.google.appengine.v1.firewall.FirewallRule.Action result = + com.google.appengine.v1.firewall.FirewallRule.Action.valueOf(action_); + return result == null + ? com.google.appengine.v1.firewall.FirewallRule.Action.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The action to take on matched requests.
+     * 
+ * + * .google.appengine.v1.FirewallRule.Action action = 2; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(com.google.appengine.v1.firewall.FirewallRule.Action value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The action to take on matched requests.
+     * 
+ * + * .google.appengine.v1.FirewallRule.Action action = 2; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sourceRange_ = ""; + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to. You can use the wildcard character "*" to match all IPs
+     * equivalent to "0/0" and "::/0" together.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * <p>Truncation will be silently performed on addresses which are not
+     * properly truncated. For example, `1.2.3.4/24` is accepted as the same
+     * address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted
+     * as the same address as `2001:db8::/32`.
+     * 
+ * + * string source_range = 3; + * + * @return The sourceRange. + */ + public java.lang.String getSourceRange() { + java.lang.Object ref = sourceRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to. You can use the wildcard character "*" to match all IPs
+     * equivalent to "0/0" and "::/0" together.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * <p>Truncation will be silently performed on addresses which are not
+     * properly truncated. For example, `1.2.3.4/24` is accepted as the same
+     * address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted
+     * as the same address as `2001:db8::/32`.
+     * 
+ * + * string source_range = 3; + * + * @return The bytes for sourceRange. + */ + public com.google.protobuf.ByteString getSourceRangeBytes() { + java.lang.Object ref = sourceRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to. You can use the wildcard character "*" to match all IPs
+     * equivalent to "0/0" and "::/0" together.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * <p>Truncation will be silently performed on addresses which are not
+     * properly truncated. For example, `1.2.3.4/24` is accepted as the same
+     * address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted
+     * as the same address as `2001:db8::/32`.
+     * 
+ * + * string source_range = 3; + * + * @param value The sourceRange to set. + * @return This builder for chaining. + */ + public Builder setSourceRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to. You can use the wildcard character "*" to match all IPs
+     * equivalent to "0/0" and "::/0" together.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * <p>Truncation will be silently performed on addresses which are not
+     * properly truncated. For example, `1.2.3.4/24` is accepted as the same
+     * address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted
+     * as the same address as `2001:db8::/32`.
+     * 
+ * + * string source_range = 3; + * + * @return This builder for chaining. + */ + public Builder clearSourceRange() { + + sourceRange_ = getDefaultInstance().getSourceRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to. You can use the wildcard character "*" to match all IPs
+     * equivalent to "0/0" and "::/0" together.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * <p>Truncation will be silently performed on addresses which are not
+     * properly truncated. For example, `1.2.3.4/24` is accepted as the same
+     * address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted
+     * as the same address as `2001:db8::/32`.
+     * 
+ * + * string source_range = 3; + * + * @param value The bytes for sourceRange to set. + * @return This builder for chaining. + */ + public Builder setSourceRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceRange_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * An optional string description of this rule.
+     * This field has a maximum length of 100 characters.
+     * 
+ * + * string description = 4; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An optional string description of this rule.
+     * This field has a maximum length of 100 characters.
+     * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An optional string description of this rule.
+     * This field has a maximum length of 100 characters.
+     * 
+ * + * string description = 4; + * + * @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; + } + /** + * + * + *
+     * An optional string description of this rule.
+     * This field has a maximum length of 100 characters.
+     * 
+ * + * string description = 4; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * An optional string description of this rule.
+     * This field has a maximum length of 100 characters.
+     * 
+ * + * string description = 4; + * + * @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; + } + + @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.appengine.v1.FirewallRule) + } + + // @@protoc_insertion_point(class_scope:google.appengine.v1.FirewallRule) + private static final com.google.appengine.v1.firewall.FirewallRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.appengine.v1.firewall.FirewallRule(); + } + + public static com.google.appengine.v1.firewall.FirewallRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FirewallRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FirewallRule(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.appengine.v1.firewall.FirewallRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/firewall/FirewallRuleOrBuilder.java b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/firewall/FirewallRuleOrBuilder.java new file mode 100644 index 00000000..ae807fda --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/java/com/google/appengine/v1/firewall/FirewallRuleOrBuilder.java @@ -0,0 +1,135 @@ +/* + * 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/appengine/v1/firewall.proto + +package com.google.appengine.v1.firewall; + +public interface FirewallRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.appengine.v1.FirewallRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A positive integer between [1, Int32.MaxValue-1] that defines the order of
+   * rule evaluation. Rules with the lowest priority are evaluated first.
+   * A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic
+   * when no previous rule matches. Only the action of this rule can be modified
+   * by the user.
+   * 
+ * + * int32 priority = 1; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * The action to take on matched requests.
+   * 
+ * + * .google.appengine.v1.FirewallRule.Action action = 2; + * + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * + * + *
+   * The action to take on matched requests.
+   * 
+ * + * .google.appengine.v1.FirewallRule.Action action = 2; + * + * @return The action. + */ + com.google.appengine.v1.firewall.FirewallRule.Action getAction(); + + /** + * + * + *
+   * IP address or range, defined using CIDR notation, of requests that this
+   * rule applies to. You can use the wildcard character "*" to match all IPs
+   * equivalent to "0/0" and "::/0" together.
+   * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+   *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+   * <p>Truncation will be silently performed on addresses which are not
+   * properly truncated. For example, `1.2.3.4/24` is accepted as the same
+   * address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted
+   * as the same address as `2001:db8::/32`.
+   * 
+ * + * string source_range = 3; + * + * @return The sourceRange. + */ + java.lang.String getSourceRange(); + /** + * + * + *
+   * IP address or range, defined using CIDR notation, of requests that this
+   * rule applies to. You can use the wildcard character "*" to match all IPs
+   * equivalent to "0/0" and "::/0" together.
+   * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+   *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+   * <p>Truncation will be silently performed on addresses which are not
+   * properly truncated. For example, `1.2.3.4/24` is accepted as the same
+   * address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted
+   * as the same address as `2001:db8::/32`.
+   * 
+ * + * string source_range = 3; + * + * @return The bytes for sourceRange. + */ + com.google.protobuf.ByteString getSourceRangeBytes(); + + /** + * + * + *
+   * An optional string description of this rule.
+   * This field has a maximum length of 100 characters.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * An optional string description of this rule.
+   * This field has a maximum length of 100 characters.
+   * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/app_yaml.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/app_yaml.proto new file mode 100644 index 00000000..657ad97f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/app_yaml.proto @@ -0,0 +1,349 @@ +// 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.appengine.v1; + +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "AppYamlProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/) +// configuration for API handlers. +message ApiConfigHandler { + // Action to take when users access resources that require + // authentication. Defaults to `redirect`. + AuthFailAction auth_fail_action = 1; + + // Level of login required to access this resource. Defaults to + // `optional`. + LoginRequirement login = 2; + + // Path to the script from the application root directory. + string script = 3; + + // Security (HTTPS) enforcement for this URL. + SecurityLevel security_level = 4; + + // URL to serve the endpoint at. + string url = 5; +} + +// Custom static error page to be served when an error occurs. +message ErrorHandler { + // Error codes. + enum ErrorCode { + option allow_alias = true; + + // Not specified. ERROR_CODE_DEFAULT is assumed. + ERROR_CODE_UNSPECIFIED = 0; + + // All other error types. + ERROR_CODE_DEFAULT = 0; + + // Application has exceeded a resource quota. + ERROR_CODE_OVER_QUOTA = 1; + + // Client blocked by the application's Denial of Service protection + // configuration. + ERROR_CODE_DOS_API_DENIAL = 2; + + // Deadline reached before the application responds. + ERROR_CODE_TIMEOUT = 3; + } + + // Error condition this handler applies to. + ErrorCode error_code = 1; + + // Static file content to be served for this error. + string static_file = 2; + + // MIME type of file. Defaults to `text/html`. + string mime_type = 3; +} + +// URL pattern and description of how the URL should be handled. App Engine can +// handle URLs by executing application code or by serving static files +// uploaded with the version, such as images, CSS, or JavaScript. +message UrlMap { + // Redirect codes. + enum RedirectHttpResponseCode { + // Not specified. `302` is assumed. + REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED = 0; + + // `301 Moved Permanently` code. + REDIRECT_HTTP_RESPONSE_CODE_301 = 1; + + // `302 Moved Temporarily` code. + REDIRECT_HTTP_RESPONSE_CODE_302 = 2; + + // `303 See Other` code. + REDIRECT_HTTP_RESPONSE_CODE_303 = 3; + + // `307 Temporary Redirect` code. + REDIRECT_HTTP_RESPONSE_CODE_307 = 4; + } + + // URL prefix. Uses regular expression syntax, which means regexp + // special characters must be escaped, but should not contain groupings. + // All URLs that begin with this prefix are handled by this handler, using the + // portion of the URL after the prefix as part of the file path. + string url_regex = 1; + + // Type of handler for this URL pattern. + oneof handler_type { + // Returns the contents of a file, such as an image, as the response. + StaticFilesHandler static_files = 2; + + // Executes a script to handle the requests that match this URL + // pattern. Only the `auto` value is supported for Node.js in the + // App Engine standard environment, for example `"script": "auto"`. + ScriptHandler script = 3; + + // Uses API Endpoints to handle requests. + ApiEndpointHandler api_endpoint = 4; + } + + // Security (HTTPS) enforcement for this URL. + SecurityLevel security_level = 5; + + // Level of login required to access this resource. Not supported for Node.js + // in the App Engine standard environment. + LoginRequirement login = 6; + + // Action to take when users access resources that require + // authentication. Defaults to `redirect`. + AuthFailAction auth_fail_action = 7; + + // `30x` code to use when performing redirects for the `secure` field. + // Defaults to `302`. + RedirectHttpResponseCode redirect_http_response_code = 8; +} + +// Files served directly to the user for a given URL, such as images, CSS +// stylesheets, or JavaScript source files. Static file handlers describe which +// files in the application directory are static files, and which URLs serve +// them. +message StaticFilesHandler { + // Path to the static files matched by the URL pattern, from the + // application root directory. The path can refer to text matched in groupings + // in the URL pattern. + string path = 1; + + // Regular expression that matches the file paths for all files that should be + // referenced by this handler. + string upload_path_regex = 2; + + // HTTP headers to use for all responses from these URLs. + map http_headers = 3; + + // MIME type used to serve all files served by this handler. + // + // Defaults to file-specific MIME types, which are derived from each file's + // filename extension. + string mime_type = 4; + + // Time a static file served by this handler should be cached + // by web proxies and browsers. + google.protobuf.Duration expiration = 5; + + // Whether this handler should match the request if the file + // referenced by the handler does not exist. + bool require_matching_file = 6; + + // Whether files should also be uploaded as code data. By default, files + // declared in static file handlers are uploaded as static + // data and are only served to end users; they cannot be read by the + // application. If enabled, uploads are charged against both your code and + // static data storage resource quotas. + bool application_readable = 7; +} + +// Executes a script to handle the request that matches the URL pattern. +message ScriptHandler { + // Path to the script from the application root directory. + string script_path = 1; +} + +// Uses Google Cloud Endpoints to handle requests. +message ApiEndpointHandler { + // Path to the script from the application root directory. + string script_path = 1; +} + +// Health checking configuration for VM instances. Unhealthy instances +// are killed and replaced with new instances. Only applicable for +// instances in App Engine flexible environment. +message HealthCheck { + // Whether to explicitly disable health checks for this instance. + bool disable_health_check = 1; + + // Host header to send when performing an HTTP health check. + // Example: "myapp.appspot.com" + string host = 2; + + // Number of consecutive successful health checks required before receiving + // traffic. + uint32 healthy_threshold = 3; + + // Number of consecutive failed health checks required before removing + // traffic. + uint32 unhealthy_threshold = 4; + + // Number of consecutive failed health checks required before an instance is + // restarted. + uint32 restart_threshold = 5; + + // Interval between health checks. + google.protobuf.Duration check_interval = 6; + + // Time before the health check is considered failed. + google.protobuf.Duration timeout = 7; +} + +// Readiness checking configuration for VM instances. Unhealthy instances +// are removed from traffic rotation. +message ReadinessCheck { + // The request path. + string path = 1; + + // Host header to send when performing a HTTP Readiness check. + // Example: "myapp.appspot.com" + string host = 2; + + // Number of consecutive failed checks required before removing + // traffic. + uint32 failure_threshold = 3; + + // Number of consecutive successful checks required before receiving + // traffic. + uint32 success_threshold = 4; + + // Interval between health checks. + google.protobuf.Duration check_interval = 5; + + // Time before the check is considered failed. + google.protobuf.Duration timeout = 6; + + // A maximum time limit on application initialization, measured from moment + // the application successfully replies to a healthcheck until it is ready to + // serve traffic. + google.protobuf.Duration app_start_timeout = 7; +} + +// Health checking configuration for VM instances. Unhealthy instances +// are killed and replaced with new instances. +message LivenessCheck { + // The request path. + string path = 1; + + // Host header to send when performing a HTTP Liveness check. + // Example: "myapp.appspot.com" + string host = 2; + + // Number of consecutive failed checks required before considering the + // VM unhealthy. + uint32 failure_threshold = 3; + + // Number of consecutive successful checks required before considering + // the VM healthy. + uint32 success_threshold = 4; + + // Interval between health checks. + google.protobuf.Duration check_interval = 5; + + // Time before the check is considered failed. + google.protobuf.Duration timeout = 6; + + // The initial delay before starting to execute the checks. + google.protobuf.Duration initial_delay = 7; +} + +// Third-party Python runtime library that is required by the application. +message Library { + // Name of the library. Example: "django". + string name = 1; + + // Version of the library to select, or "latest". + string version = 2; +} + +// Actions to take when the user is not logged in. +enum AuthFailAction { + // Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed. + AUTH_FAIL_ACTION_UNSPECIFIED = 0; + + // Redirects user to "accounts.google.com". The user is redirected back to the + // application URL after signing in or creating an account. + AUTH_FAIL_ACTION_REDIRECT = 1; + + // Rejects request with a `401` HTTP status code and an error + // message. + AUTH_FAIL_ACTION_UNAUTHORIZED = 2; +} + +// Methods to restrict access to a URL based on login status. +enum LoginRequirement { + // Not specified. `LOGIN_OPTIONAL` is assumed. + LOGIN_UNSPECIFIED = 0; + + // Does not require that the user is signed in. + LOGIN_OPTIONAL = 1; + + // If the user is not signed in, the `auth_fail_action` is taken. + // In addition, if the user is not an administrator for the + // application, they are given an error message regardless of + // `auth_fail_action`. If the user is an administrator, the handler + // proceeds. + LOGIN_ADMIN = 2; + + // If the user has signed in, the handler proceeds normally. Otherwise, the + // auth_fail_action is taken. + LOGIN_REQUIRED = 3; +} + +// Methods to enforce security (HTTPS) on a URL. +enum SecurityLevel { + option allow_alias = true; + + // Not specified. + SECURE_UNSPECIFIED = 0; + + // Both HTTP and HTTPS requests with URLs that match the handler succeed + // without redirects. The application can examine the request to determine + // which protocol was used, and respond accordingly. + SECURE_DEFAULT = 0; + + // Requests for a URL that match this handler that use HTTPS are automatically + // redirected to the HTTP equivalent URL. + SECURE_NEVER = 1; + + // Both HTTP and HTTPS requests with URLs that match the handler succeed + // without redirects. The application can examine the request to determine + // which protocol was used and respond accordingly. + SECURE_OPTIONAL = 2; + + // Requests for a URL that match this handler that do not use HTTPS are + // automatically redirected to the HTTPS URL with the same path. Query + // parameters are reserved for the redirect. + SECURE_ALWAYS = 3; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/appengine.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/appengine.proto new file mode 100644 index 00000000..76c6d687 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/appengine.proto @@ -0,0 +1,1006 @@ +// 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.appengine.v1; + +import "google/appengine/v1/application.proto"; +import "google/appengine/v1/certificate.proto"; +import "google/appengine/v1/domain.proto"; +import "google/appengine/v1/domain_mapping.proto"; +import "google/appengine/v1/firewall.proto"; +import "google/appengine/v1/instance.proto"; +import "google/appengine/v1/version.proto"; +import "google/appengine/v1/service.proto"; +import "google/api/annotations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "AppengineProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// Manages App Engine applications. +service Applications { + option (google.api.default_host) = "appengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/appengine.admin," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Gets information about an application. + rpc GetApplication(GetApplicationRequest) returns (Application) { + option (google.api.http) = { + get: "/v1/{name=apps/*}" + }; + } + + // Creates an App Engine application for a Google Cloud Platform project. + // Required fields: + // + // * `id` - The ID of the target Cloud Platform project. + // * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located. + // + // For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). + rpc CreateApplication(CreateApplicationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/apps" + body: "application" + }; + option (google.longrunning.operation_info) = { + response_type: "Application" + metadata_type: "OperationMetadataV1" + }; + } + + // Updates the specified Application resource. + // You can update the following fields: + // + // * `auth_domain` - Google authentication domain for controlling user access to the application. + // * `default_cookie_expiration` - Cookie expiration policy for the application. + rpc UpdateApplication(UpdateApplicationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=apps/*}" + body: "application" + }; + option (google.longrunning.operation_info) = { + response_type: "Application" + metadata_type: "OperationMetadataV1" + }; + } + + // Recreates the required App Engine features for the specified App Engine + // application, for example a Cloud Storage bucket or App Engine service + // account. + // Use this method if you receive an error message about a missing feature, + // for example, *Error retrieving the App Engine service account*. + // If you have deleted your App Engine service account, this will + // not be able to recreate it. Instead, you should attempt to use the + // IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . + // If the deletion was recent, the numeric ID can be found in the Cloud + // Console Activity Log. + rpc RepairApplication(RepairApplicationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=apps/*}:repair" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Application" + metadata_type: "OperationMetadataV1" + }; + } +} + +// Request message for `Applications.GetApplication`. +message GetApplicationRequest { + // Name of the Application resource to get. Example: `apps/myapp`. + string name = 1; +} + +// Request message for `Applications.CreateApplication`. +message CreateApplicationRequest { + // Application configuration. + Application application = 2; +} + +// Request message for `Applications.UpdateApplication`. +message UpdateApplicationRequest { + // Name of the Application resource to update. Example: `apps/myapp`. + string name = 1; + + // An Application containing the updated resource. + Application application = 2; + + // Standard field mask for the set of fields to be updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for 'Applications.RepairApplication'. +message RepairApplicationRequest { + // Name of the application to repair. Example: `apps/myapp` + string name = 1; +} + +// Manages services of an application. +service Services { + option (google.api.default_host) = "appengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/appengine.admin," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Lists all the services in the application. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1/{parent=apps/*}/services" + }; + } + + // Gets the current configuration of the specified service. + rpc GetService(GetServiceRequest) returns (Service) { + option (google.api.http) = { + get: "/v1/{name=apps/*/services/*}" + }; + } + + // Updates the configuration of the specified service. + rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=apps/*/services/*}" + body: "service" + }; + option (google.longrunning.operation_info) = { + response_type: "Service" + metadata_type: "OperationMetadataV1" + }; + } + + // Deletes the specified service and all enclosed versions. + rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=apps/*/services/*}" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadataV1" + }; + } +} + +// Request message for `Services.ListServices`. +message ListServicesRequest { + // Name of the parent Application resource. Example: `apps/myapp`. + string parent = 1; + + // Maximum results to return per page. + int32 page_size = 2; + + // Continuation token for fetching the next page of results. + string page_token = 3; +} + +// Response message for `Services.ListServices`. +message ListServicesResponse { + // The services belonging to the requested application. + repeated Service services = 1; + + // Continuation token for fetching the next page of results. + string next_page_token = 2; +} + +// Request message for `Services.GetService`. +message GetServiceRequest { + // Name of the resource requested. Example: `apps/myapp/services/default`. + string name = 1; +} + +// Request message for `Services.UpdateService`. +message UpdateServiceRequest { + // Name of the resource to update. Example: `apps/myapp/services/default`. + string name = 1; + + // A Service resource containing the updated service. Only fields set in the + // field mask will be updated. + Service service = 2; + + // Standard field mask for the set of fields to be updated. + google.protobuf.FieldMask update_mask = 3; + + // Set to `true` to gradually shift traffic to one or more versions that you + // specify. By default, traffic is shifted immediately. + // For gradual traffic migration, the target versions + // must be located within instances that are configured for both + // [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) + // and + // [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). + // You must specify the + // [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) + // field in the Service resource. Gradual traffic migration is not + // supported in the App Engine flexible environment. For examples, see + // [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + bool migrate_traffic = 4; +} + +// Request message for `Services.DeleteService`. +message DeleteServiceRequest { + // Name of the resource requested. Example: `apps/myapp/services/default`. + string name = 1; +} + +// Manages versions of a service. +service Versions { + option (google.api.default_host) = "appengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/appengine.admin," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Lists the versions of a service. + rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=apps/*/services/*}/versions" + }; + } + + // Gets the specified Version resource. + // By default, only a `BASIC_VIEW` will be returned. + // Specify the `FULL_VIEW` parameter to get the full resource. + rpc GetVersion(GetVersionRequest) returns (Version) { + option (google.api.http) = { + get: "/v1/{name=apps/*/services/*/versions/*}" + }; + } + + // Deploys code and resource files to a new version. + rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=apps/*/services/*}/versions" + body: "version" + }; + option (google.longrunning.operation_info) = { + response_type: "Version" + metadata_type: "CreateVersionMetadataV1" + }; + } + + // Updates the specified Version resource. + // You can specify the following fields depending on the App Engine + // environment and type of scaling that the version resource uses: + // + // **Standard environment** + // + // * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) + // + // *automatic scaling* in the standard environment: + // + // * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + // * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + // * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + // * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + // * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + // * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + // + // *basic scaling* or *manual scaling* in the standard environment: + // + // * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + // * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + // + // **Flexible environment** + // + // * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + // + // *automatic scaling* in the flexible environment: + // + // * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + // * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + // * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + // * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + // + // *manual scaling* in the flexible environment: + // + // * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + rpc UpdateVersion(UpdateVersionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=apps/*/services/*/versions/*}" + body: "version" + }; + option (google.longrunning.operation_info) = { + response_type: "Version" + metadata_type: "OperationMetadataV1" + }; + } + + // Deletes an existing Version resource. + rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=apps/*/services/*/versions/*}" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadataV1" + }; + } +} + +// Request message for `Versions.ListVersions`. +message ListVersionsRequest { + // Name of the parent Service resource. Example: + // `apps/myapp/services/default`. + string parent = 1; + + // Controls the set of fields returned in the `List` response. + VersionView view = 2; + + // Maximum results to return per page. + int32 page_size = 3; + + // Continuation token for fetching the next page of results. + string page_token = 4; +} + +// Response message for `Versions.ListVersions`. +message ListVersionsResponse { + // The versions belonging to the requested service. + repeated Version versions = 1; + + // Continuation token for fetching the next page of results. + string next_page_token = 2; +} + +// Request message for `Versions.GetVersion`. +message GetVersionRequest { + // Name of the resource requested. Example: + // `apps/myapp/services/default/versions/v1`. + string name = 1; + + // Controls the set of fields returned in the `Get` response. + VersionView view = 2; +} + +// Request message for `Versions.CreateVersion`. +message CreateVersionRequest { + // Name of the parent resource to create this version under. Example: + // `apps/myapp/services/default`. + string parent = 1; + + // Application deployment configuration. + Version version = 2; +} + +// Request message for `Versions.UpdateVersion`. +message UpdateVersionRequest { + // Name of the resource to update. Example: + // `apps/myapp/services/default/versions/1`. + string name = 1; + + // A Version containing the updated resource. Only fields set in the field + // mask will be updated. + Version version = 2; + + // Standard field mask for the set of fields to be updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Fields that should be returned when [Version][google.appengine.v1.Version] resources +// are retrieved. +enum VersionView { + // Basic version information including scaling and inbound services, + // but not detailed deployment information. + BASIC = 0; + + // The information from `BASIC`, plus detailed information about the + // deployment. This format is required when creating resources, but + // is not returned in `Get` or `List` by default. + FULL = 1; +} + +// Request message for `Versions.DeleteVersion`. +message DeleteVersionRequest { + // Name of the resource requested. Example: + // `apps/myapp/services/default/versions/v1`. + string name = 1; +} + +// Request message for `Instances.ListInstances`. +message ListInstancesRequest { + // Name of the parent Version resource. Example: + // `apps/myapp/services/default/versions/v1`. + string parent = 1; + + // Maximum results to return per page. + int32 page_size = 2; + + // Continuation token for fetching the next page of results. + string page_token = 3; +} + +// Response message for `Instances.ListInstances`. +message ListInstancesResponse { + // The instances belonging to the requested version. + repeated Instance instances = 1; + + // Continuation token for fetching the next page of results. + string next_page_token = 2; +} + +// Request message for `Instances.GetInstance`. +message GetInstanceRequest { + // Name of the resource requested. Example: + // `apps/myapp/services/default/versions/v1/instances/instance-1`. + string name = 1; +} + +// Request message for `Instances.DeleteInstance`. +message DeleteInstanceRequest { + // Name of the resource requested. Example: + // `apps/myapp/services/default/versions/v1/instances/instance-1`. + string name = 1; +} + +// Request message for `Instances.DebugInstance`. +message DebugInstanceRequest { + // Name of the resource requested. Example: + // `apps/myapp/services/default/versions/v1/instances/instance-1`. + string name = 1; + + // Public SSH key to add to the instance. Examples: + // + // * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]` + // * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}` + // + // For more information, see + // [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). + string ssh_key = 2; +} + +// Request message for `Firewall.ListIngressRules`. +message ListIngressRulesRequest { + // Name of the Firewall collection to retrieve. + // Example: `apps/myapp/firewall/ingressRules`. + string parent = 1; + + // Maximum results to return per page. + int32 page_size = 2; + + // Continuation token for fetching the next page of results. + string page_token = 3; + + // A valid IP Address. If set, only rules matching this address will be + // returned. The first returned rule will be the rule that fires on requests + // from this IP. + string matching_address = 4; +} + +// Manages instances of a version. +service Instances { + option (google.api.default_host) = "appengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/appengine.admin," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Lists the instances of a version. + // + // Tip: To aggregate details about instances over time, see the + // [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v1/{parent=apps/*/services/*/versions/*}/instances" + }; + } + + // Gets instance information. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1/{name=apps/*/services/*/versions/*/instances/*}" + }; + } + + // Stops a running instance. + // + // The instance might be automatically recreated based on the scaling settings + // of the version. For more information, see "How Instances are Managed" + // ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | + // [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). + // + // To ensure that instances are not re-created and avoid getting billed, you + // can stop all instances within the target version by changing the serving + // status of the version to `STOPPED` with the + // [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) + // method. + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=apps/*/services/*/versions/*/instances/*}" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadataV1" + }; + } + + // Enables debugging on a VM instance. This allows you to use the SSH + // command to connect to the virtual machine where the instance lives. + // While in "debug mode", the instance continues to serve live traffic. + // You should delete the instance when you are done debugging and then + // allow the system to take over and determine if another instance + // should be started. + // + // Only applicable for instances in App Engine flexible environment. + rpc DebugInstance(DebugInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=apps/*/services/*/versions/*/instances/*}:debug" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadataV1" + }; + } +} + +// Response message for `Firewall.ListIngressRules`. +message ListIngressRulesResponse { + // The ingress FirewallRules for this application. + repeated google.appengine.v1.FirewallRule ingress_rules = 1; + + // Continuation token for fetching the next page of results. + string next_page_token = 2; +} + +// Request message for `Firewall.BatchUpdateIngressRules`. +message BatchUpdateIngressRulesRequest { + // Name of the Firewall collection to set. + // Example: `apps/myapp/firewall/ingressRules`. + string name = 1; + + // A list of FirewallRules to replace the existing set. + repeated google.appengine.v1.FirewallRule ingress_rules = 2; +} + +// Response message for `Firewall.UpdateAllIngressRules`. +message BatchUpdateIngressRulesResponse { + // The full list of ingress FirewallRules for this application. + repeated google.appengine.v1.FirewallRule ingress_rules = 1; +} + +// Request message for `Firewall.CreateIngressRule`. +message CreateIngressRuleRequest { + // Name of the parent Firewall collection in which to create a new rule. + // Example: `apps/myapp/firewall/ingressRules`. + string parent = 1; + + // A FirewallRule containing the new resource. + // + // The user may optionally provide a position at which the new rule will be + // placed. The positions define a sequential list starting at 1. If a rule + // already exists at the given position, rules greater than the provided + // position will be moved forward by one. + // + // If no position is provided, the server will place the rule as the second to + // last rule in the sequence before the required default allow-all or deny-all + // rule. + google.appengine.v1.FirewallRule rule = 2; +} + +// Request message for `Firewall.GetIngressRule`. +message GetIngressRuleRequest { + // Name of the Firewall resource to retrieve. + // Example: `apps/myapp/firewall/ingressRules/100`. + string name = 1; +} + +// Request message for `Firewall.UpdateIngressRule`. +message UpdateIngressRuleRequest { + // Name of the Firewall resource to update. + // Example: `apps/myapp/firewall/ingressRules/100`. + string name = 1; + + // A FirewallRule containing the updated resource + google.appengine.v1.FirewallRule rule = 2; + + // Standard field mask for the set of fields to be updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for `Firewall.DeleteIngressRule`. +message DeleteIngressRuleRequest { + // Name of the Firewall resource to delete. + // Example: `apps/myapp/firewall/ingressRules/100`. + string name = 1; +} + +// Request message for `AuthorizedDomains.ListAuthorizedDomains`. +message ListAuthorizedDomainsRequest { + // Name of the parent Application resource. Example: `apps/myapp`. + string parent = 1; + + // Maximum results to return per page. + int32 page_size = 2; + + // Continuation token for fetching the next page of results. + string page_token = 3; +} + +// Response message for `AuthorizedDomains.ListAuthorizedDomains`. +message ListAuthorizedDomainsResponse { + // The authorized domains belonging to the user. + repeated google.appengine.v1.AuthorizedDomain domains = 1; + + // Continuation token for fetching the next page of results. + string next_page_token = 2; +} + +// Request message for `AuthorizedCertificates.ListAuthorizedCertificates`. +message ListAuthorizedCertificatesRequest { + // Name of the parent `Application` resource. Example: `apps/myapp`. + string parent = 1; + + // Controls the set of fields returned in the `LIST` response. + AuthorizedCertificateView view = 4; + + // Maximum results to return per page. + int32 page_size = 2; + + // Continuation token for fetching the next page of results. + string page_token = 3; +} + +// Response message for `AuthorizedCertificates.ListAuthorizedCertificates`. +message ListAuthorizedCertificatesResponse { + // The SSL certificates the user is authorized to administer. + repeated google.appengine.v1.AuthorizedCertificate certificates = 1; + + // Continuation token for fetching the next page of results. + string next_page_token = 2; +} + +// Firewall resources are used to define a collection of access control rules +// for an Application. Each rule is defined with a position which specifies +// the rule's order in the sequence of rules, an IP range to be matched against +// requests, and an action to take upon matching requests. +// +// Every request is evaluated against the Firewall rules in priority order. +// Processesing stops at the first rule which matches the request's IP address. +// A final rule always specifies an action that applies to all remaining +// IP addresses. The default final rule for a newly-created application will be +// set to "allow" if not otherwise specified by the user. +service Firewall { + option (google.api.default_host) = "appengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/appengine.admin," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Lists the firewall rules of an application. + rpc ListIngressRules(ListIngressRulesRequest) returns (ListIngressRulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=apps/*}/firewall/ingressRules" + }; + } + + // Replaces the entire firewall ruleset in one bulk operation. This overrides + // and replaces the rules of an existing firewall with the new rules. + // + // If the final rule does not match traffic with the '*' wildcard IP range, + // then an "allow all" rule is explicitly added to the end of the list. + rpc BatchUpdateIngressRules(BatchUpdateIngressRulesRequest) returns (BatchUpdateIngressRulesResponse) { + option (google.api.http) = { + post: "/v1/{name=apps/*/firewall/ingressRules}:batchUpdate" + body: "*" + }; + } + + // Creates a firewall rule for the application. + rpc CreateIngressRule(CreateIngressRuleRequest) returns (google.appengine.v1.FirewallRule) { + option (google.api.http) = { + post: "/v1/{parent=apps/*}/firewall/ingressRules" + body: "rule" + }; + } + + // Gets the specified firewall rule. + rpc GetIngressRule(GetIngressRuleRequest) returns (google.appengine.v1.FirewallRule) { + option (google.api.http) = { + get: "/v1/{name=apps/*/firewall/ingressRules/*}" + }; + } + + // Updates the specified firewall rule. + rpc UpdateIngressRule(UpdateIngressRuleRequest) returns (google.appengine.v1.FirewallRule) { + option (google.api.http) = { + patch: "/v1/{name=apps/*/firewall/ingressRules/*}" + body: "rule" + }; + } + + // Deletes the specified firewall rule. + rpc DeleteIngressRule(DeleteIngressRuleRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=apps/*/firewall/ingressRules/*}" + }; + } +} + +// Request message for `AuthorizedCertificates.GetAuthorizedCertificate`. +message GetAuthorizedCertificateRequest { + // Name of the resource requested. Example: + // `apps/myapp/authorizedCertificates/12345`. + string name = 1; + + // Controls the set of fields returned in the `GET` response. + AuthorizedCertificateView view = 2; +} + +// Request message for `AuthorizedCertificates.CreateAuthorizedCertificate`. +message CreateAuthorizedCertificateRequest { + // Name of the parent `Application` resource. Example: `apps/myapp`. + string parent = 1; + + // SSL certificate data. + google.appengine.v1.AuthorizedCertificate certificate = 2; +} + +// Request message for `AuthorizedCertificates.UpdateAuthorizedCertificate`. +message UpdateAuthorizedCertificateRequest { + // Name of the resource to update. Example: + // `apps/myapp/authorizedCertificates/12345`. + string name = 1; + + // An `AuthorizedCertificate` containing the updated resource. Only fields set + // in the field mask will be updated. + google.appengine.v1.AuthorizedCertificate certificate = 2; + + // Standard field mask for the set of fields to be updated. Updates are only + // supported on the `certificate_raw_data` and `display_name` fields. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for `AuthorizedCertificates.DeleteAuthorizedCertificate`. +message DeleteAuthorizedCertificateRequest { + // Name of the resource to delete. Example: + // `apps/myapp/authorizedCertificates/12345`. + string name = 1; +} + +// Request message for `DomainMappings.ListDomainMappings`. +message ListDomainMappingsRequest { + // Name of the parent Application resource. Example: `apps/myapp`. + string parent = 1; + + // Maximum results to return per page. + int32 page_size = 2; + + // Continuation token for fetching the next page of results. + string page_token = 3; +} + +// Response message for `DomainMappings.ListDomainMappings`. +message ListDomainMappingsResponse { + // The domain mappings for the application. + repeated google.appengine.v1.DomainMapping domain_mappings = 1; + + // Continuation token for fetching the next page of results. + string next_page_token = 2; +} + +// Request message for `DomainMappings.GetDomainMapping`. +message GetDomainMappingRequest { + // Name of the resource requested. Example: + // `apps/myapp/domainMappings/example.com`. + string name = 1; +} + +// Request message for `DomainMappings.CreateDomainMapping`. +message CreateDomainMappingRequest { + // Name of the parent Application resource. Example: `apps/myapp`. + string parent = 1; + + // Domain mapping configuration. + google.appengine.v1.DomainMapping domain_mapping = 2; + + // Whether the domain creation should override any existing mappings for this + // domain. By default, overrides are rejected. + DomainOverrideStrategy override_strategy = 4; +} + +// Manages domains a user is authorized to administer. To authorize use of a +// domain, verify ownership via +// [Webmaster Central](https://www.google.com/webmasters/verification/home). +service AuthorizedDomains { + option (google.api.default_host) = "appengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/appengine.admin," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Lists all domains the user is authorized to administer. + rpc ListAuthorizedDomains(ListAuthorizedDomainsRequest) returns (ListAuthorizedDomainsResponse) { + option (google.api.http) = { + get: "/v1/{parent=apps/*}/authorizedDomains" + }; + } +} + +// Request message for `DomainMappings.UpdateDomainMapping`. +message UpdateDomainMappingRequest { + // Name of the resource to update. Example: + // `apps/myapp/domainMappings/example.com`. + string name = 1; + + // A domain mapping containing the updated resource. Only fields set + // in the field mask will be updated. + google.appengine.v1.DomainMapping domain_mapping = 2; + + // Standard field mask for the set of fields to be updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for `DomainMappings.DeleteDomainMapping`. +message DeleteDomainMappingRequest { + // Name of the resource to delete. Example: + // `apps/myapp/domainMappings/example.com`. + string name = 1; +} + +// Manages SSL certificates a user is authorized to administer. A user can +// administer any SSL certificates applicable to their authorized domains. +service AuthorizedCertificates { + option (google.api.default_host) = "appengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/appengine.admin," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Lists all SSL certificates the user is authorized to administer. + rpc ListAuthorizedCertificates(ListAuthorizedCertificatesRequest) returns (ListAuthorizedCertificatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=apps/*}/authorizedCertificates" + }; + } + + // Gets the specified SSL certificate. + rpc GetAuthorizedCertificate(GetAuthorizedCertificateRequest) returns (google.appengine.v1.AuthorizedCertificate) { + option (google.api.http) = { + get: "/v1/{name=apps/*/authorizedCertificates/*}" + }; + } + + // Uploads the specified SSL certificate. + rpc CreateAuthorizedCertificate(CreateAuthorizedCertificateRequest) returns (google.appengine.v1.AuthorizedCertificate) { + option (google.api.http) = { + post: "/v1/{parent=apps/*}/authorizedCertificates" + body: "certificate" + }; + } + + // Updates the specified SSL certificate. To renew a certificate and maintain + // its existing domain mappings, update `certificate_data` with a new + // certificate. The new certificate must be applicable to the same domains as + // the original certificate. The certificate `display_name` may also be + // updated. + rpc UpdateAuthorizedCertificate(UpdateAuthorizedCertificateRequest) returns (google.appengine.v1.AuthorizedCertificate) { + option (google.api.http) = { + patch: "/v1/{name=apps/*/authorizedCertificates/*}" + body: "certificate" + }; + } + + // Deletes the specified SSL certificate. + rpc DeleteAuthorizedCertificate(DeleteAuthorizedCertificateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=apps/*/authorizedCertificates/*}" + }; + } +} + +// Fields that should be returned when an AuthorizedCertificate resource is +// retrieved. +enum AuthorizedCertificateView { + // Basic certificate information, including applicable domains and expiration + // date. + BASIC_CERTIFICATE = 0; + + // The information from `BASIC_CERTIFICATE`, plus detailed information on the + // domain mappings that have this certificate mapped. + FULL_CERTIFICATE = 1; +} + +// Override strategy for mutating an existing mapping. +enum DomainOverrideStrategy { + // Strategy unspecified. Defaults to `STRICT`. + UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY = 0; + + // Overrides not allowed. If a mapping already exists for the + // specified domain, the request will return an ALREADY_EXISTS (409). + STRICT = 1; + + // Overrides allowed. If a mapping already exists for the specified domain, + // the request will overwrite it. Note that this might stop another + // Google product from serving. For example, if the domain is + // mapped to another App Engine application, that app will no + // longer serve from that domain. + OVERRIDE = 2; +} + +// Manages domains serving an application. +service DomainMappings { + option (google.api.default_host) = "appengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/appengine.admin," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Lists the domain mappings on an application. + rpc ListDomainMappings(ListDomainMappingsRequest) returns (ListDomainMappingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=apps/*}/domainMappings" + }; + } + + // Gets the specified domain mapping. + rpc GetDomainMapping(GetDomainMappingRequest) returns (google.appengine.v1.DomainMapping) { + option (google.api.http) = { + get: "/v1/{name=apps/*/domainMappings/*}" + }; + } + + // Maps a domain to an application. A user must be authorized to administer a + // domain in order to map it to an application. For a list of available + // authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`](). + rpc CreateDomainMapping(CreateDomainMappingRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=apps/*}/domainMappings" + body: "domain_mapping" + }; + option (google.longrunning.operation_info) = { + response_type: "DomainMapping" + metadata_type: "OperationMetadataV1" + }; + } + + // Updates the specified domain mapping. To map an SSL certificate to a + // domain mapping, update `certificate_id` to point to an `AuthorizedCertificate` + // resource. A user must be authorized to administer the associated domain + // in order to update a `DomainMapping` resource. + rpc UpdateDomainMapping(UpdateDomainMappingRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=apps/*/domainMappings/*}" + body: "domain_mapping" + }; + option (google.longrunning.operation_info) = { + response_type: "DomainMapping" + metadata_type: "OperationMetadataV1" + }; + } + + // Deletes the specified domain mapping. A user must be authorized to + // administer the associated domain in order to delete a `DomainMapping` + // resource. + rpc DeleteDomainMapping(DeleteDomainMappingRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=apps/*/domainMappings/*}" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadataV1" + }; + } +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/application.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/application.proto new file mode 100644 index 00000000..ca4e6b0b --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/application.proto @@ -0,0 +1,194 @@ +// 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.appengine.v1; + +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "ApplicationProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// An Application resource contains the top-level configuration of an App +// Engine application. +message Application { + // Identity-Aware Proxy + message IdentityAwareProxy { + // Whether the serving infrastructure will authenticate and + // authorize all incoming requests. + // + // If true, the `oauth2_client_id` and `oauth2_client_secret` + // fields must be non-empty. + bool enabled = 1; + + // OAuth2 client ID to use for the authentication flow. + string oauth2_client_id = 2; + + // OAuth2 client secret to use for the authentication flow. + // + // For security reasons, this value cannot be retrieved via the API. + // Instead, the SHA-256 hash of the value is returned in the + // `oauth2_client_secret_sha256` field. + // + // @InputOnly + string oauth2_client_secret = 3; + + // Hex-encoded SHA-256 hash of the client secret. + // + // @OutputOnly + string oauth2_client_secret_sha256 = 4; + } + + // The feature specific settings to be used in the application. These define + // behaviors that are user configurable. + message FeatureSettings { + // Boolean value indicating if split health checks should be used instead + // of the legacy health checks. At an app.yaml level, this means defaulting + // to 'readiness_check' and 'liveness_check' values instead of + // 'health_check' ones. Once the legacy 'health_check' behavior is + // deprecated, and this value is always true, this setting can + // be removed. + bool split_health_checks = 1; + + // If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/) + // base image for VMs, rather than a base Debian image. + bool use_container_optimized_os = 2; + } + + enum ServingStatus { + // Serving status is unspecified. + UNSPECIFIED = 0; + + // Application is serving. + SERVING = 1; + + // Application has been disabled by the user. + USER_DISABLED = 2; + + // Application has been disabled by the system. + SYSTEM_DISABLED = 3; + } + + enum DatabaseType { + // Database type is unspecified. + DATABASE_TYPE_UNSPECIFIED = 0; + + // Cloud Datastore + CLOUD_DATASTORE = 1; + + // Cloud Firestore Native + CLOUD_FIRESTORE = 2; + + // Cloud Firestore in Datastore Mode + CLOUD_DATASTORE_COMPATIBILITY = 3; + } + + // Full path to the Application resource in the API. + // Example: `apps/myapp`. + // + // @OutputOnly + string name = 1; + + // Identifier of the Application resource. This identifier is equivalent + // to the project ID of the Google Cloud Platform project where you want to + // deploy your application. + // Example: `myapp`. + string id = 2; + + // HTTP path dispatch rules for requests to the application that do not + // explicitly target a service or version. Rules are order-dependent. + // Up to 20 dispatch rules can be supported. + repeated UrlDispatchRule dispatch_rules = 3; + + // Google Apps authentication domain that controls which users can access + // this application. + // + // Defaults to open access for any Google Account. + string auth_domain = 6; + + // Location from which this application runs. Application instances + // run out of the data centers in the specified location, which is also where + // all of the application's end user content is stored. + // + // Defaults to `us-central`. + // + // View the list of + // [supported locations](https://cloud.google.com/appengine/docs/locations). + string location_id = 7; + + // Google Cloud Storage bucket that can be used for storing files + // associated with this application. This bucket is associated with the + // application and can be used by the gcloud deployment commands. + // + // @OutputOnly + string code_bucket = 8; + + // Cookie expiration policy for this application. + google.protobuf.Duration default_cookie_expiration = 9; + + // Serving status of this application. + ServingStatus serving_status = 10; + + // Hostname used to reach this application, as resolved by App Engine. + // + // @OutputOnly + string default_hostname = 11; + + // Google Cloud Storage bucket that can be used by this application to store + // content. + // + // @OutputOnly + string default_bucket = 12; + + IdentityAwareProxy iap = 14; + + // The Google Container Registry domain used for storing managed build docker + // images for this application. + string gcr_domain = 16; + + // The type of the Cloud Firestore or Cloud Datastore database associated with + // this application. + DatabaseType database_type = 17; + + // The feature specific settings to be used in the application. + FeatureSettings feature_settings = 18; +} + +// Rules to match an HTTP request and dispatch that request to a service. +message UrlDispatchRule { + // Domain name to match against. The wildcard "`*`" is supported if + // specified before a period: "`*.`". + // + // Defaults to matching all domains: "`*`". + string domain = 1; + + // Pathname within the host. Must start with a "`/`". A + // single "`*`" can be included at the end of the path. + // + // The sum of the lengths of the domain and path may not + // exceed 100 characters. + string path = 2; + + // Resource ID of a service in this application that should + // serve the matched request. The service must already + // exist. Example: `default`. + string service = 3; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/audit_data.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/audit_data.proto new file mode 100644 index 00000000..101dd71c --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/audit_data.proto @@ -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. + +syntax = "proto3"; + +package google.appengine.v1; + +import "google/appengine/v1/appengine.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "AuditDataProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// App Engine admin service audit log. +message AuditData { + // Detailed information about methods that require it. Does not include + // simple Get, List or Delete methods because all significant information + // (resource name, number of returned elements for List operations) is already + // included in parent audit log message. + oneof method { + // Detailed information about UpdateService call. + UpdateServiceMethod update_service = 1; + + // Detailed information about CreateVersion call. + CreateVersionMethod create_version = 2; + } +} + +// Detailed information about UpdateService call. +message UpdateServiceMethod { + // Update service request. + UpdateServiceRequest request = 1; +} + +// Detailed information about CreateVersion call. +message CreateVersionMethod { + // Create version request. + CreateVersionRequest request = 1; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/certificate.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/certificate.proto new file mode 100644 index 00000000..9ce5e72d --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/certificate.proto @@ -0,0 +1,173 @@ +// 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. + +syntax = "proto3"; + +package google.appengine.v1; + +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "CertificateProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// An SSL certificate that a user has been authorized to administer. A user +// is authorized to administer any certificate that applies to one of their +// authorized domains. +message AuthorizedCertificate { + // Full path to the `AuthorizedCertificate` resource in the API. Example: + // `apps/myapp/authorizedCertificates/12345`. + // + // @OutputOnly + string name = 1; + + // Relative name of the certificate. This is a unique value autogenerated + // on `AuthorizedCertificate` resource creation. Example: `12345`. + // + // @OutputOnly + string id = 2; + + // The user-specified display name of the certificate. This is not + // guaranteed to be unique. Example: `My Certificate`. + string display_name = 3; + + // Topmost applicable domains of this certificate. This certificate + // applies to these domains and their subdomains. Example: `example.com`. + // + // @OutputOnly + repeated string domain_names = 4; + + // The time when this certificate expires. To update the renewal time on this + // certificate, upload an SSL certificate with a different expiration time + // using [`AuthorizedCertificates.UpdateAuthorizedCertificate`](). + // + // @OutputOnly + google.protobuf.Timestamp expire_time = 5; + + // The SSL certificate serving the `AuthorizedCertificate` resource. This + // must be obtained independently from a certificate authority. + CertificateRawData certificate_raw_data = 6; + + // Only applicable if this certificate is managed by App Engine. Managed + // certificates are tied to the lifecycle of a `DomainMapping` and cannot be + // updated or deleted via the `AuthorizedCertificates` API. If this + // certificate is manually administered by the user, this field will be empty. + // + // @OutputOnly + ManagedCertificate managed_certificate = 7; + + // The full paths to user visible Domain Mapping resources that have this + // certificate mapped. Example: `apps/myapp/domainMappings/example.com`. + // + // This may not represent the full list of mapped domain mappings if the user + // does not have `VIEWER` permissions on all of the applications that have + // this certificate mapped. See `domain_mappings_count` for a complete count. + // + // Only returned by `GET` or `LIST` requests when specifically requested by + // the `view=FULL_CERTIFICATE` option. + // + // @OutputOnly + repeated string visible_domain_mappings = 8; + + // Aggregate count of the domain mappings with this certificate mapped. This + // count includes domain mappings on applications for which the user does not + // have `VIEWER` permissions. + // + // Only returned by `GET` or `LIST` requests when specifically requested by + // the `view=FULL_CERTIFICATE` option. + // + // @OutputOnly + int32 domain_mappings_count = 9; +} + +// An SSL certificate obtained from a certificate authority. +message CertificateRawData { + // PEM encoded x.509 public key certificate. This field is set once on + // certificate creation. Must include the header and footer. Example: + //
+  // -----BEGIN CERTIFICATE-----
+  // 
+  // -----END CERTIFICATE-----
+  // 
+ string public_certificate = 1; + + // Unencrypted PEM encoded RSA private key. This field is set once on + // certificate creation and then encrypted. The key size must be 2048 + // bits or fewer. Must include the header and footer. Example: + //
+  // -----BEGIN RSA PRIVATE KEY-----
+  // 
+  // -----END RSA PRIVATE KEY-----
+  // 
+ // @InputOnly + string private_key = 2; +} + +// State of certificate management. Refers to the most recent certificate +// acquisition or renewal attempt. +enum ManagementStatus { + MANAGEMENT_STATUS_UNSPECIFIED = 0; + + // Certificate was successfully obtained and inserted into the serving + // system. + OK = 1; + + // Certificate is under active attempts to acquire or renew. + PENDING = 2; + + // Most recent renewal failed due to an invalid DNS setup and will be + // retried. Renewal attempts will continue to fail until the certificate + // domain's DNS configuration is fixed. The last successfully provisioned + // certificate may still be serving. + FAILED_RETRYING_NOT_VISIBLE = 4; + + // All renewal attempts have been exhausted, likely due to an invalid DNS + // setup. + FAILED_PERMANENT = 6; + + // Most recent renewal failed due to an explicit CAA record that does not + // include one of the in-use CAs (Google CA and Let's Encrypt). Renewals will + // continue to fail until the CAA is reconfigured. The last successfully + // provisioned certificate may still be serving. + FAILED_RETRYING_CAA_FORBIDDEN = 7; + + // Most recent renewal failed due to a CAA retrieval failure. This means that + // the domain's DNS provider does not properly handle CAA records, failing + // requests for CAA records when no CAA records are defined. Renewals will + // continue to fail until the DNS provider is changed or a CAA record is + // added for the given domain. The last successfully provisioned certificate + // may still be serving. + FAILED_RETRYING_CAA_CHECKING = 8; +} + +// A certificate managed by App Engine. +message ManagedCertificate { + // Time at which the certificate was last renewed. The renewal process is + // fully managed. Certificate renewal will automatically occur before the + // certificate expires. Renewal errors can be tracked via `ManagementStatus`. + // + // @OutputOnly + google.protobuf.Timestamp last_renewal_time = 1; + + // Status of certificate management. Refers to the most recent certificate + // acquisition or renewal attempt. + // + // @OutputOnly + ManagementStatus status = 2; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/deploy.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/deploy.proto new file mode 100644 index 00000000..4d9d2c16 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/deploy.proto @@ -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 +// +// 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.appengine.v1; + +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "DeployProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// Code and application artifacts used to deploy a version to App Engine. +message Deployment { + // Manifest of the files stored in Google Cloud Storage that are included + // as part of this version. All files must be readable using the + // credentials supplied with this call. + map files = 1; + + // The Docker image for the container that runs the version. + // Only applicable for instances running in the App Engine flexible environment. + ContainerInfo container = 2; + + // The zip file for this deployment, if this is a zip deployment. + ZipInfo zip = 3; + + // Options for any Google Cloud Build builds created as a part of this + // deployment. + // + // These options will only be used if a new build is created, such as when + // deploying to the App Engine flexible environment using files or zip. + CloudBuildOptions cloud_build_options = 6; +} + +// Single source file that is part of the version to be deployed. Each source +// file that is deployed must be specified separately. +message FileInfo { + // URL source to use to fetch this file. Must be a URL to a resource in + // Google Cloud Storage in the form + // 'http(s)://storage.googleapis.com/\/\'. + string source_url = 1; + + // The SHA1 hash of the file, in hex. + string sha1_sum = 2; + + // The MIME type of the file. + // + // Defaults to the value from Google Cloud Storage. + string mime_type = 3; +} + +// Docker image that is used to create a container and start a VM instance for +// the version that you deploy. Only applicable for instances running in the App +// Engine flexible environment. +message ContainerInfo { + // URI to the hosted container image in Google Container Registry. The URI + // must be fully qualified and include a tag or digest. + // Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" + string image = 1; +} + +// Options for the build operations performed as a part of the version +// deployment. Only applicable for App Engine flexible environment when creating +// a version using source code directly. +message CloudBuildOptions { + // Path to the yaml file used in deployment, used to determine runtime + // configuration details. + // + // Required for flexible environment builds. + // + // See https://cloud.google.com/appengine/docs/standard/python/config/appref + // for more details. + string app_yaml_path = 1; + + // The Cloud Build timeout used as part of any dependent builds performed by + // version creation. Defaults to 10 minutes. + google.protobuf.Duration cloud_build_timeout = 2; +} + +// The zip file information for a zip deployment. +message ZipInfo { + // URL of the zip file to deploy from. Must be a URL to a resource in + // Google Cloud Storage in the form + // 'http(s)://storage.googleapis.com/\/\'. + string source_url = 3; + + // An estimate of the number of files in a zip for a zip deployment. + // If set, must be greater than or equal to the actual number of files. + // Used for optimizing performance; if not provided, deployment may be slow. + int32 files_count = 4; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/deployed_files.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/deployed_files.proto new file mode 100644 index 00000000..b9024c86 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/deployed_files.proto @@ -0,0 +1,27 @@ +// 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. + +syntax = "proto3"; + +package google.appengine.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "DeployedFilesProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/domain.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/domain.proto new file mode 100644 index 00000000..70951382 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/domain.proto @@ -0,0 +1,42 @@ +// 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. + +syntax = "proto3"; + +package google.appengine.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "DomainProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// A domain that a user has been authorized to administer. To authorize use +// of a domain, verify ownership via +// [Webmaster Central](https://www.google.com/webmasters/verification/home). +message AuthorizedDomain { + // Full path to the `AuthorizedDomain` resource in the API. Example: + // `apps/myapp/authorizedDomains/example.com`. + // + // @OutputOnly + string name = 1; + + // Fully qualified domain name of the domain authorized for use. Example: + // `example.com`. + string id = 2; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/domain_mapping.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/domain_mapping.proto new file mode 100644 index 00000000..d0cfec75 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/domain_mapping.proto @@ -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 +// +// 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.appengine.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "DomainMappingProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// A domain serving an App Engine application. +message DomainMapping { + // Full path to the `DomainMapping` resource in the API. Example: + // `apps/myapp/domainMapping/example.com`. + // + // @OutputOnly + string name = 1; + + // Relative name of the domain serving the application. Example: + // `example.com`. + string id = 2; + + // SSL configuration for this domain. If unconfigured, this domain will not + // serve with SSL. + SslSettings ssl_settings = 3; + + // The resource records required to configure this domain mapping. These + // records must be added to the domain's DNS configuration in order to + // serve the application via this domain mapping. + // + // @OutputOnly + repeated ResourceRecord resource_records = 4; +} + +// SSL configuration for a `DomainMapping` resource. +message SslSettings { + // The SSL management type for this domain. + enum SslManagementType { + // Defaults to `AUTOMATIC`. + SSL_MANAGEMENT_TYPE_UNSPECIFIED = 0; + + // SSL support for this domain is configured automatically. The mapped SSL + // certificate will be automatically renewed. + AUTOMATIC = 1; + + // SSL support for this domain is configured manually by the user. Either + // the domain has no SSL support or a user-obtained SSL certificate has been + // explictly mapped to this domain. + MANUAL = 2; + } + + // ID of the `AuthorizedCertificate` resource configuring SSL for the + // application. Clearing this field will remove SSL support. + // + // By default, a managed certificate is automatically created for every + // domain mapping. To omit SSL support or to configure SSL manually, specify + // `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must + // be authorized to administer the `AuthorizedCertificate` resource to + // manually map it to a `DomainMapping` resource. + // Example: `12345`. + string certificate_id = 1; + + // SSL management type for this domain. If `AUTOMATIC`, a managed certificate + // is automatically provisioned. If `MANUAL`, `certificate_id` must be + // manually specified in order to configure SSL for this domain. + SslManagementType ssl_management_type = 3; + + // ID of the managed `AuthorizedCertificate` resource currently being + // provisioned, if applicable. Until the new managed certificate has been + // successfully provisioned, the previous SSL state will be preserved. Once + // the provisioning process completes, the `certificate_id` field will reflect + // the new managed certificate and this field will be left empty. To remove + // SSL support while there is still a pending managed certificate, clear the + // `certificate_id` field with an `UpdateDomainMappingRequest`. + // + // @OutputOnly + string pending_managed_certificate_id = 4; +} + +// A DNS resource record. +message ResourceRecord { + // A resource record type. + enum RecordType { + // An unknown resource record. + RECORD_TYPE_UNSPECIFIED = 0; + + // An A resource record. Data is an IPv4 address. + A = 1; + + // An AAAA resource record. Data is an IPv6 address. + AAAA = 2; + + // A CNAME resource record. Data is a domain name to be aliased. + CNAME = 3; + } + + // Relative name of the object affected by this record. Only applicable for + // `CNAME` records. Example: 'www'. + string name = 1; + + // Data for this record. Values vary by record type, as defined in RFC 1035 + // (section 5) and RFC 1034 (section 3.6.1). + string rrdata = 2; + + // Resource record type. Example: `AAAA`. + RecordType type = 3; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/firewall.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/firewall.proto new file mode 100644 index 00000000..ba4e9634 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/firewall.proto @@ -0,0 +1,70 @@ +// 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. + +syntax = "proto3"; + +package google.appengine.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "FirewallProto"; +option java_package = "com.google.appengine.v1.firewall"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// A single firewall rule that is evaluated against incoming traffic +// and provides an action to take on matched requests. +message FirewallRule { + // Available actions to take on matching requests. + enum Action { + UNSPECIFIED_ACTION = 0; + + // Matching requests are allowed. + ALLOW = 1; + + // Matching requests are denied. + DENY = 2; + } + + // A positive integer between [1, Int32.MaxValue-1] that defines the order of + // rule evaluation. Rules with the lowest priority are evaluated first. + // + // A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic + // when no previous rule matches. Only the action of this rule can be modified + // by the user. + int32 priority = 1; + + // The action to take on matched requests. + Action action = 2; + + // IP address or range, defined using CIDR notation, of requests that this + // rule applies to. You can use the wildcard character "*" to match all IPs + // equivalent to "0/0" and "::/0" together. + // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + // + // + //

Truncation will be silently performed on addresses which are not + // properly truncated. For example, `1.2.3.4/24` is accepted as the same + // address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted + // as the same address as `2001:db8::/32`. + string source_range = 3; + + // An optional string description of this rule. + // This field has a maximum length of 100 characters. + string description = 4; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/instance.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/instance.proto new file mode 100644 index 00000000..d2f314f8 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/instance.proto @@ -0,0 +1,144 @@ +// 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.appengine.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "InstanceProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// An Instance resource is the computing unit that App Engine uses to +// automatically scale an application. +message Instance { + option (google.api.resource) = { + type: "appengine.googleapis.com/Instance" + pattern: "apps/{app}/services/{service}/versions/{version}/instances/{instance}" + }; + + // Wrapper for LivenessState enum. + message Liveness { + // Liveness health check status for Flex instances. + enum LivenessState { + // There is no liveness health check for the instance. Only applicable for + // instances in App Engine standard environment. + LIVENESS_STATE_UNSPECIFIED = 0; + + // The health checking system is aware of the instance but its health is + // not known at the moment. + UNKNOWN = 1; + + // The instance is reachable i.e. a connection to the application health + // checking endpoint can be established, and conforms to the requirements + // defined by the health check. + HEALTHY = 2; + + // The instance is reachable, but does not conform to the requirements + // defined by the health check. + UNHEALTHY = 3; + + // The instance is being drained. The existing connections to the instance + // have time to complete, but the new ones are being refused. + DRAINING = 4; + + // The instance is unreachable i.e. a connection to the application health + // checking endpoint cannot be established, or the server does not respond + // within the specified timeout. + TIMEOUT = 5; + } + + + } + + // Availability of the instance. + enum Availability { + UNSPECIFIED = 0; + + RESIDENT = 1; + + DYNAMIC = 2; + } + + // Output only. Full path to the Instance resource in the API. + // Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Relative name of the instance within the version. + // Example: `instance-1`. + string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. App Engine release this instance is running on. + string app_engine_release = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Availability of the instance. + Availability availability = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the virtual machine where this instance lives. Only applicable + // for instances in App Engine flexible environment. + string vm_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Zone where the virtual machine is located. Only applicable for instances + // in App Engine flexible environment. + string vm_zone_name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Virtual machine ID of this instance. Only applicable for instances in + // App Engine flexible environment. + string vm_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time that this instance was started. + // + // @OutputOnly + google.protobuf.Timestamp start_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of requests since this instance was started. + int32 requests = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of errors since this instance was started. + int32 errors = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Average queries per second (QPS) over the last minute. + float qps = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Average latency (ms) over the last minute. + int32 average_latency = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total memory in use (bytes). + int64 memory_usage = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status of the virtual machine where this instance lives. Only applicable + // for instances in App Engine flexible environment. + string vm_status = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether this instance is in debug mode. Only applicable for instances in + // App Engine flexible environment. + bool vm_debug_enabled = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IP address of this instance. Only applicable for instances in App + // Engine flexible environment. + string vm_ip = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The liveness health check of this instance. Only applicable for instances + // in App Engine flexible environment. + Liveness.LivenessState vm_liveness = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/location.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/location.proto new file mode 100644 index 00000000..f150188f --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/location.proto @@ -0,0 +1,45 @@ +// 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.appengine.v1; + +import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "LocationProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// Metadata for the given [google.cloud.location.Location][google.cloud.location.Location]. +message LocationMetadata { + // App Engine standard environment is available in the given location. + // + // @OutputOnly + bool standard_environment_available = 2; + + // App Engine flexible environment is available in the given location. + // + // @OutputOnly + bool flexible_environment_available = 4; + + // Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search) + // is available in the given location. + bool search_api_available = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/network_settings.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/network_settings.proto new file mode 100644 index 00000000..b6dab212 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/network_settings.proto @@ -0,0 +1,49 @@ +// 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.appengine.v1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "NetworkSettingsProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// A NetworkSettings resource is a container for ingress settings for a version +// or service. +message NetworkSettings { + // If unspecified, INGRESS_TRAFFIC_ALLOWED_ALL will be used. + enum IngressTrafficAllowed { + // Unspecified + INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED = 0; + + // Allow HTTP traffic from public and private sources. + INGRESS_TRAFFIC_ALLOWED_ALL = 1; + + // Allow HTTP traffic from only private VPC sources. + INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY = 2; + + // Allow HTTP traffic from private VPC sources and through load balancers. + INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB = 3; + } + + // The ingress settings for version or service. + IngressTrafficAllowed ingress_traffic_allowed = 1; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/operation.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/operation.proto new file mode 100644 index 00000000..a8d4f7cd --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/operation.proto @@ -0,0 +1,81 @@ +// 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.appengine.v1; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "OperationProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation]. +message OperationMetadataV1 { + // API method that initiated this operation. Example: + // `google.appengine.v1.Versions.CreateVersion`. + // + // @OutputOnly + string method = 1; + + // Time that this operation was created. + // + // @OutputOnly + google.protobuf.Timestamp insert_time = 2; + + // Time that this operation completed. + // + // @OutputOnly + google.protobuf.Timestamp end_time = 3; + + // User who requested this operation. + // + // @OutputOnly + string user = 4; + + // Name of the resource that this operation is acting on. Example: + // `apps/myapp/services/default`. + // + // @OutputOnly + string target = 5; + + // Ephemeral message that may change every time the operation is polled. + // @OutputOnly + string ephemeral_message = 6; + + // Durable messages that persist on every operation poll. + // @OutputOnly + repeated string warning = 7; + + // Metadata specific to the type of operation in progress. + // @OutputOnly + oneof method_metadata { + CreateVersionMetadataV1 create_version_metadata = 8; + } +} + +// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation] during a +// [google.appengine.v1.CreateVersionRequest][google.appengine.v1.CreateVersionRequest]. +message CreateVersionMetadataV1 { + // The Cloud Build ID if one was created as part of the version create. + // @OutputOnly + string cloud_build_id = 1; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/service.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/service.proto new file mode 100644 index 00000000..7c03d835 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/service.proto @@ -0,0 +1,94 @@ +// 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.appengine.v1; + +import "google/appengine/v1/network_settings.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// A Service resource is a logical component of an application that can share +// state and communicate in a secure fashion with other services. +// For example, an application that handles customer requests might +// include separate services to handle tasks such as backend data +// analysis or API requests from mobile devices. Each service has a +// collection of versions that define a specific set of code used to +// implement the functionality of that service. +message Service { + // Full path to the Service resource in the API. + // Example: `apps/myapp/services/default`. + // + // @OutputOnly + string name = 1; + + // Relative name of the service within the application. + // Example: `default`. + // + // @OutputOnly + string id = 2; + + // Mapping that defines fractional HTTP traffic diversion to + // different versions within the service. + TrafficSplit split = 3; + + // Ingress settings for this service. Will apply to all versions. + NetworkSettings network_settings = 6; +} + +// Traffic routing configuration for versions within a single service. Traffic +// splits define how traffic directed to the service is assigned to versions. +message TrafficSplit { + // Available sharding mechanisms. + enum ShardBy { + // Diversion method unspecified. + UNSPECIFIED = 0; + + // Diversion based on a specially named cookie, "GOOGAPPUID." The cookie + // must be set by the application itself or no diversion will occur. + COOKIE = 1; + + // Diversion based on applying the modulus operation to a fingerprint + // of the IP address. + IP = 2; + + // Diversion based on weighted random assignment. An incoming request is + // randomly routed to a version in the traffic split, with probability + // proportional to the version's traffic share. + RANDOM = 3; + } + + // Mechanism used to determine which version a request is sent to. + // The traffic selection algorithm will + // be stable for either type until allocations are changed. + ShardBy shard_by = 1; + + // Mapping from version IDs within the service to fractional + // (0.000, 1] allocations of traffic for that version. Each version can + // be specified only once, but some versions in the service may not + // have any traffic allocation. Services that have traffic allocated + // cannot be deleted until either the service is deleted or + // their traffic allocation is removed. Allocations must sum to 1. + // Up to two decimal place precision is supported for IP-based splits and + // up to three decimal places is supported for cookie-based splits. + map allocations = 2; +} diff --git a/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/version.proto b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/version.proto new file mode 100644 index 00000000..4f253b02 --- /dev/null +++ b/proto-google-cloud-appengine-admin-v1/src/main/proto/google/appengine/v1/version.proto @@ -0,0 +1,574 @@ +// 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.appengine.v1; + +import "google/appengine/v1/app_yaml.proto"; +import "google/appengine/v1/deploy.proto"; +import "google/appengine/v1/network_settings.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.AppEngine.V1"; +option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine"; +option java_multiple_files = true; +option java_outer_classname = "VersionProto"; +option java_package = "com.google.appengine.v1"; +option php_namespace = "Google\\Cloud\\AppEngine\\V1"; +option ruby_package = "Google::Cloud::AppEngine::V1"; + +// A Version resource is a specific set of source code and configuration files +// that are deployed into a service. +message Version { + // Full path to the Version resource in the API. Example: + // `apps/myapp/services/default/versions/v1`. + // + // @OutputOnly + string name = 1; + + // Relative name of the version within the service. Example: `v1`. + // Version names can contain only lowercase letters, numbers, or hyphens. + // Reserved names: "default", "latest", and any name with the prefix "ah-". + string id = 2; + + // Controls how instances are created, scaled, and reaped. + // + // Defaults to `AutomaticScaling`. + oneof scaling { + // Automatic scaling is based on request rate, response latencies, and other + // application metrics. Instances are dynamically created and destroyed as + // needed in order to handle traffic. + AutomaticScaling automatic_scaling = 3; + + // A service with basic scaling will create an instance when the application + // receives a request. The instance will be turned down when the app becomes + // idle. Basic scaling is ideal for work that is intermittent or driven by + // user activity. + BasicScaling basic_scaling = 4; + + // A service with manual scaling runs continuously, allowing you to perform + // complex initialization and rely on the state of its memory over time. + // Manually scaled versions are sometimes referred to as "backends". + ManualScaling manual_scaling = 5; + } + + // Before an application can receive email or XMPP messages, the application + // must be configured to enable the service. + repeated InboundServiceType inbound_services = 6; + + // Instance class that is used to run this version. Valid values are: + // + // * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G` + // * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G` + // + // Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or + // BasicScaling. + string instance_class = 7; + + // Extra network settings. + // Only applicable in the App Engine flexible environment. + Network network = 8; + + // The Google Compute Engine zones that are supported by this version in the + // App Engine flexible environment. Deprecated. + repeated string zones = 118; + + // Machine resources for this version. + // Only applicable in the App Engine flexible environment. + Resources resources = 9; + + // Desired runtime. Example: `python27`. + string runtime = 10; + + // The channel of the runtime to use. Only available for some + // runtimes. Defaults to the `default` channel. + string runtime_channel = 117; + + // Whether multiple requests can be dispatched to this version at once. + bool threadsafe = 11; + + // Whether to deploy this version in a container on a virtual machine. + bool vm = 12; + + // Metadata settings that are supplied to this version to enable + // beta runtime features. + map beta_settings = 13; + + // App Engine execution environment for this version. + // + // Defaults to `standard`. + string env = 14; + + // Current serving status of this version. Only the versions with a + // `SERVING` status create instances and can be billed. + // + // `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`. + ServingStatus serving_status = 15; + + // Email address of the user who created this version. + // + // @OutputOnly + string created_by = 16; + + // Time that this version was created. + // + // @OutputOnly + google.protobuf.Timestamp create_time = 17; + + // Total size in bytes of all the files that are included in this version + // and currently hosted on the App Engine disk. + // + // @OutputOnly + int64 disk_usage_bytes = 18; + + // The version of the API in the given runtime environment. Please see the + // app.yaml reference for valid values at + // https://cloud.google.com/appengine/docs/standard//config/appref + string runtime_api_version = 21; + + // The path or name of the app's main executable. + string runtime_main_executable_path = 22; + + // The identity that the deployed version will run as. + // Admin API will use the App Engine Appspot service account as default if + // this field is neither provided in app.yaml file nor through CLI flag. + string service_account = 127; + + // An ordered list of URL-matching patterns that should be applied to incoming + // requests. The first matching URL handles the request and other request + // handlers are not attempted. + // + // Only returned in `GET` requests if `view=FULL` is set. + repeated UrlMap handlers = 100; + + // Custom static error pages. Limited to 10KB per page. + // + // Only returned in `GET` requests if `view=FULL` is set. + repeated ErrorHandler error_handlers = 101; + + // Configuration for third-party Python runtime libraries that are required + // by the application. + // + // Only returned in `GET` requests if `view=FULL` is set. + repeated Library libraries = 102; + + // Serving configuration for + // [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/). + // + // Only returned in `GET` requests if `view=FULL` is set. + ApiConfigHandler api_config = 103; + + // Environment variables available to the application. + // + // Only returned in `GET` requests if `view=FULL` is set. + map env_variables = 104; + + // Environment variables available to the build environment. + // + // Only returned in `GET` requests if `view=FULL` is set. + map build_env_variables = 125; + + // Duration that static files should be cached by web proxies and browsers. + // Only applicable if the corresponding + // [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler) + // does not specify its own expiration time. + // + // Only returned in `GET` requests if `view=FULL` is set. + google.protobuf.Duration default_expiration = 105; + + // Configures health checking for instances. Unhealthy instances are + // stopped and replaced with new instances. + // Only applicable in the App Engine flexible environment. + // + // Only returned in `GET` requests if `view=FULL` is set. + HealthCheck health_check = 106; + + // Configures readiness health checking for instances. + // Unhealthy instances are not put into the backend traffic rotation. + // + // Only returned in `GET` requests if `view=FULL` is set. + ReadinessCheck readiness_check = 112; + + // Configures liveness health checking for instances. + // Unhealthy instances are stopped and replaced with new instances + // + // Only returned in `GET` requests if `view=FULL` is set. + LivenessCheck liveness_check = 113; + + // Files that match this pattern will not be built into this version. + // Only applicable for Go runtimes. + // + // Only returned in `GET` requests if `view=FULL` is set. + string nobuild_files_regex = 107; + + // Code and application artifacts that make up this version. + // + // Only returned in `GET` requests if `view=FULL` is set. + Deployment deployment = 108; + + // Serving URL for this version. Example: + // "https://myversion-dot-myservice-dot-myapp.appspot.com" + // + // @OutputOnly + string version_url = 109; + + // Cloud Endpoints configuration. + // + // If endpoints_api_service is set, the Cloud Endpoints Extensible Service + // Proxy will be provided to serve the API implemented by the app. + EndpointsApiService endpoints_api_service = 110; + + // The entrypoint for the application. + Entrypoint entrypoint = 122; + + // Enables VPC connectivity for standard apps. + VpcAccessConnector vpc_access_connector = 121; +} + +// [Cloud Endpoints](https://cloud.google.com/endpoints) configuration. +// The Endpoints API Service provides tooling for serving Open API and gRPC +// endpoints via an NGINX proxy. Only valid for App Engine Flexible environment +// deployments. +// +// The fields here refer to the name and configuration ID of a "service" +// resource in the [Service Management API](https://cloud.google.com/service-management/overview). +message EndpointsApiService { + // Available rollout strategies. + enum RolloutStrategy { + // Not specified. Defaults to `FIXED`. + UNSPECIFIED_ROLLOUT_STRATEGY = 0; + + // Endpoints service configuration ID will be fixed to the configuration ID + // specified by `config_id`. + FIXED = 1; + + // Endpoints service configuration ID will be updated with each rollout. + MANAGED = 2; + } + + // Endpoints service name which is the name of the "service" resource in the + // Service Management API. For example "myapi.endpoints.myproject.cloud.goog" + string name = 1; + + // Endpoints service configuration ID as specified by the Service Management + // API. For example "2016-09-19r1". + // + // By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`. + // This means that Endpoints starts up with a particular configuration ID. + // When a new configuration is rolled out, Endpoints must be given the new + // configuration ID. The `config_id` field is used to give the configuration + // ID and is required in this case. + // + // Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`. + // When using this, Endpoints fetches the latest configuration and does not + // need the configuration ID. In this case, `config_id` must be omitted. + string config_id = 2; + + // Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If + // `MANAGED`, `config_id` must be omitted. + RolloutStrategy rollout_strategy = 3; + + // Enable or disable trace sampling. By default, this is set to false for + // enabled. + bool disable_trace_sampling = 4; +} + +// Automatic scaling is based on request rate, response latencies, and other +// application metrics. +message AutomaticScaling { + // The time period that the + // [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/) + // should wait before it starts collecting information from a new instance. + // This prevents the autoscaler from collecting information when the instance + // is initializing, during which the collected usage would not be reliable. + // Only applicable in the App Engine flexible environment. + google.protobuf.Duration cool_down_period = 1; + + // Target scaling by CPU usage. + CpuUtilization cpu_utilization = 2; + + // Number of concurrent requests an automatic scaling instance can accept + // before the scheduler spawns a new instance. + // + // Defaults to a runtime-specific value. + int32 max_concurrent_requests = 3; + + // Maximum number of idle instances that should be maintained for this + // version. + int32 max_idle_instances = 4; + + // Maximum number of instances that should be started to handle requests for + // this version. + int32 max_total_instances = 5; + + // Maximum amount of time that a request should wait in the pending queue + // before starting a new instance to handle it. + google.protobuf.Duration max_pending_latency = 6; + + // Minimum number of idle instances that should be maintained for + // this version. Only applicable for the default version of a service. + int32 min_idle_instances = 7; + + // Minimum number of running instances that should be maintained for this + // version. + int32 min_total_instances = 8; + + // Minimum amount of time a request should wait in the pending queue before + // starting a new instance to handle it. + google.protobuf.Duration min_pending_latency = 9; + + // Target scaling by request utilization. + RequestUtilization request_utilization = 10; + + // Target scaling by disk usage. + DiskUtilization disk_utilization = 11; + + // Target scaling by network usage. + NetworkUtilization network_utilization = 12; + + // Scheduler settings for standard environment. + StandardSchedulerSettings standard_scheduler_settings = 20; +} + +// A service with basic scaling will create an instance when the application +// receives a request. The instance will be turned down when the app becomes +// idle. Basic scaling is ideal for work that is intermittent or driven by +// user activity. +message BasicScaling { + // Duration of time after the last request that an instance must wait before + // the instance is shut down. + google.protobuf.Duration idle_timeout = 1; + + // Maximum number of instances to create for this version. + int32 max_instances = 2; +} + +// A service with manual scaling runs continuously, allowing you to perform +// complex initialization and rely on the state of its memory over time. +message ManualScaling { + // Number of instances to assign to the service at the start. This number + // can later be altered by using the + // [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions) + // `set_num_instances()` function. + int32 instances = 1; +} + +// Target scaling by CPU usage. +message CpuUtilization { + // Period of time over which CPU utilization is calculated. + google.protobuf.Duration aggregation_window_length = 1; + + // Target CPU utilization ratio to maintain when scaling. Must be between 0 + // and 1. + double target_utilization = 2; +} + +// Target scaling by request utilization. +// Only applicable in the App Engine flexible environment. +message RequestUtilization { + // Target requests per second. + int32 target_request_count_per_second = 1; + + // Target number of concurrent requests. + int32 target_concurrent_requests = 2; +} + +// Target scaling by disk usage. +// Only applicable in the App Engine flexible environment. +message DiskUtilization { + // Target bytes written per second. + int32 target_write_bytes_per_second = 14; + + // Target ops written per second. + int32 target_write_ops_per_second = 15; + + // Target bytes read per second. + int32 target_read_bytes_per_second = 16; + + // Target ops read per seconds. + int32 target_read_ops_per_second = 17; +} + +// Target scaling by network usage. +// Only applicable in the App Engine flexible environment. +message NetworkUtilization { + // Target bytes sent per second. + int32 target_sent_bytes_per_second = 1; + + // Target packets sent per second. + int32 target_sent_packets_per_second = 11; + + // Target bytes received per second. + int32 target_received_bytes_per_second = 12; + + // Target packets received per second. + int32 target_received_packets_per_second = 13; +} + +// Scheduler settings for standard environment. +message StandardSchedulerSettings { + // Target CPU utilization ratio to maintain when scaling. + double target_cpu_utilization = 1; + + // Target throughput utilization ratio to maintain when scaling + double target_throughput_utilization = 2; + + // Minimum number of instances to run for this version. Set to zero to disable + // `min_instances` configuration. + int32 min_instances = 3; + + // Maximum number of instances to run for this version. Set to zero to disable + // `max_instances` configuration. + int32 max_instances = 4; +} + +// Extra network settings. +// Only applicable in the App Engine flexible environment. +message Network { + // List of ports, or port pairs, to forward from the virtual machine to the + // application container. + // Only applicable in the App Engine flexible environment. + repeated string forwarded_ports = 1; + + // Tag to apply to the instance during creation. + // Only applicable in the App Engine flexible environment. + string instance_tag = 2; + + // Google Compute Engine network where the virtual machines are created. + // Specify the short name, not the resource path. + // + // Defaults to `default`. + string name = 3; + + // Google Cloud Platform sub-network where the virtual machines are created. + // Specify the short name, not the resource path. + // + // If a subnetwork name is specified, a network name will also be required + // unless it is for the default network. + // + // * If the network that the instance is being created in is a Legacy network, + // then the IP address is allocated from the IPv4Range. + // * If the network that the instance is being created in is an auto Subnet + // Mode Network, then only network name should be specified (not the + // subnetwork_name) and the IP address is created from the IPCidrRange of the + // subnetwork that exists in that zone for that network. + // * If the network that the instance is being created in is a custom Subnet + // Mode Network, then the subnetwork_name must be specified and the + // IP address is created from the IPCidrRange of the subnetwork. + // + // If specified, the subnetwork must exist in the same region as the + // App Engine flexible environment application. + string subnetwork_name = 4; + + // Enable session affinity. + // Only applicable in the App Engine flexible environment. + bool session_affinity = 5; +} + +// Volumes mounted within the app container. +// Only applicable in the App Engine flexible environment. +message Volume { + // Unique name for the volume. + string name = 1; + + // Underlying volume type, e.g. 'tmpfs'. + string volume_type = 2; + + // Volume size in gigabytes. + double size_gb = 3; +} + +// Machine resources for a version. +message Resources { + // Number of CPU cores needed. + double cpu = 1; + + // Disk size (GB) needed. + double disk_gb = 2; + + // Memory (GB) needed. + double memory_gb = 3; + + // User specified volumes. + repeated Volume volumes = 4; + + // The name of the encryption key that is stored in Google Cloud KMS. + // Only should be used by Cloud Composer to encrypt the vm disk + string kms_key_reference = 5; +} + +// VPC access connector specification. +message VpcAccessConnector { + // Full Serverless VPC Access Connector name e.g. + // /projects/my-project/locations/us-central1/connectors/c1. + string name = 1; +} + +// The entrypoint for the application. +message Entrypoint { + // The command to run. + oneof command { + // The format should be a shell command that can be fed to `bash -c`. + string shell = 1; + } +} + +// Available inbound services. +enum InboundServiceType { + // Not specified. + INBOUND_SERVICE_UNSPECIFIED = 0; + + // Allows an application to receive mail. + INBOUND_SERVICE_MAIL = 1; + + // Allows an application to receive email-bound notifications. + INBOUND_SERVICE_MAIL_BOUNCE = 2; + + // Allows an application to receive error stanzas. + INBOUND_SERVICE_XMPP_ERROR = 3; + + // Allows an application to receive instant messages. + INBOUND_SERVICE_XMPP_MESSAGE = 4; + + // Allows an application to receive user subscription POSTs. + INBOUND_SERVICE_XMPP_SUBSCRIBE = 5; + + // Allows an application to receive a user's chat presence. + INBOUND_SERVICE_XMPP_PRESENCE = 6; + + // Registers an application for notifications when a client connects or + // disconnects from a channel. + INBOUND_SERVICE_CHANNEL_PRESENCE = 7; + + // Enables warmup requests. + INBOUND_SERVICE_WARMUP = 9; +} + +// Run states of a version. +enum ServingStatus { + // Not specified. + SERVING_STATUS_UNSPECIFIED = 0; + + // Currently serving. Instances are created according to the + // scaling settings of the version. + SERVING = 1; + + // Disabled. No instances will be created and the scaling + // settings are ignored until the state of the version changes + // to `SERVING`. + STOPPED = 2; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..2b778108 --- /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-appengine-admin", + "^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..1150f6d9 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + appengine-admin-install-without-bom + jar + Google App Engine Admin API Install Without Bom + https://github.com/googleapis/java-appengine-admin + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-appengine-admin + 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..15fc7d8b --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-appengine-admin-samples + 0.0.1-SNAPSHOT + pom + Google App Engine Admin API Samples Parent + https://github.com/googleapis/java-appengine-admin + + 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..6a25c477 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + appengine-admin-snapshot + jar + Google App Engine Admin API Snapshot Samples + https://github.com/googleapis/java-appengine-admin + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-appengine-admin + 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..db06059d --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + appengine-admin-snippets + jar + Google App Engine Admin API Snippets + https://github.com/googleapis/java-appengine-admin + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-appengine-admin + 0.0.0 + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/synth.metadata b/synth.metadata new file mode 100644 index 00000000..4e843b12 --- /dev/null +++ b/synth.metadata @@ -0,0 +1,23 @@ +{ + "sources": [ + { + "git": { + "name": "." + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "572ef8f70edd9041f5bcfa71511aed6aecfc2098" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "572ef8f70edd9041f5bcfa71511aed6aecfc2098" + } + } + ] +} \ No newline at end of file diff --git a/synth.py b/synth.py new file mode 100644 index 00000000..892e8d91 --- /dev/null +++ b/synth.py @@ -0,0 +1,17 @@ +# 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. + +import synthtool.languages.java as java + +java.common_templates() \ No newline at end of file diff --git a/versions.txt b/versions.txt new file mode 100644 index 00000000..59227428 --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-appengine-admin:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-appengine-admin-v1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-appengine-admin-v1:0.0.0:0.0.1-SNAPSHOT